API  0.9.6
 All Classes Files Functions Variables Macros Modules Pages
CPResponder Class Reference

#import <CPResponder.h>

+ Inheritance diagram for CPResponder:

Instance Methods

(BOOL) - acceptsFirstResponder
 
(BOOL) - becomeFirstResponder
 
(void) - doCommandBySelector:
 
(void) - encodeWithCoder:
 
(void) - flagsChanged:
 
(id) - initWithCoder:
 
(void) - insertBackTab:
 
(void) - insertLineBreak:
 
(void) - insertNewline:
 
(void) - insertTab:
 
(void) - insertText:
 
(void) - interpretKeyEvents:
 
(void) - keyDown:
 
(void) - keyUp:
 
(CPMenu- menu
 
(void) - mouseDown:
 
(void) - mouseDragged:
 
(void) - mouseEntered:
 
(void) - mouseExited:
 
(void) - mouseMoved:
 
(void) - mouseUp:
 
(CPResponder- nextResponder
 
(void) - noResponderFor:
 
(BOOL) - performKeyEquivalent:
 
(BOOL) - resignFirstResponder
 
(void) - rightMouseDown:
 
(void) - rightMouseUp:
 
(void) - scrollWheel:
 
(void) - setMenu:
 
(void) - setNextResponder:
 
(BOOL) - tryToPerform:with:
 
(CPUndoManager- undoManager
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray- exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(id) - init
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Additional Inherited Members

- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(Class) + class
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isSubclassOfClass:
 
(CPSet+ keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 
- Instance Variables inherited from CPObject
Class isa
 

Detailed Description

Subclasses of CPResonder can be part of the responder chain.

Definition at line 2 of file CPResponder.h.

Method Documentation

- (BOOL) acceptsFirstResponder
implementation

Returns YES if the receiver is able to become the first responder. NO otherwise.

Reimplemented in CPWindow, CPTableView, CPTextField, CPCollectionView, and CPBrowser.

Definition at line 54 of file CPResponder.j.

- (BOOL) becomeFirstResponder
implementation

Notifies the receiver that it will become the first responder. The receiver can reject first responder if it returns NO. The default implementation always returns YES.

Returns
YES if the receiver accepts first responder status.

Reimplemented in CPTableView, CPTextField, and CPTokenField.

Definition at line 64 of file CPResponder.j.

- (void) doCommandBySelector: (SEL)  aSelector
implementation

The receiver will attempt to perform the command, if it responds to it. If not, the -nextResponder will be called to do it.

Parameters
aSelectorthe command to attempt

Reimplemented in CPWindow, CPTextField, and CPApplication.

Definition at line 292 of file CPResponder.j.

- (void) encodeWithCoder: (CPCoder aCoder
implementation
- (void) flagsChanged: (CPEvent anEvent
implementation

Notifies the receiver that the user has pressed or released a modifier key (Shift, Control, and so on).

Parameters
anEventinformation about the key press

Definition at line 228 of file CPResponder.j.

- (id) initWithCoder: (CPCoder aCoder
implementation

Initializes the responder with data from a coder.

Parameters
aCoderthe coder from which data will be read
Returns
the initialized responder

Reimplemented in CPTokenField, CPRadio, CPTableView, CPClipView, CPTableHeaderView, CPView, CPOutlineView, CPWebView, CPTextField, CPScrollView, CPButton, CPControl, CPSplitView, CPCollectionView, CPScroller, CPViewController, CPProgressIndicator, CPBox, CPPopover, CPSearchField, CPLevelIndicator, CPBrowser, CPTabView, CPImageView, CPComboBox, CPSegmentedControl, CPColorWell, CPSlider, CPStepper, CPPopUpButton, and CPButtonBar.

Provided by category CPResponder(CPCoding).

Definition at line 361 of file CPResponder.j.

- (void) insertBackTab: (id)  sender
implementation

Definition at line 274 of file CPResponder.j.

- (void) insertLineBreak: (id)  aSender
implementation

Insert a line break at the caret position or selection.

Parameters
aSenderthe object requesting this

Definition at line 256 of file CPResponder.j.

- (void) insertNewline: (id)  aSender
implementation

Insert a line break at the caret position or selection.

Parameters
aSenderthe object requesting this

Reimplemented in CPTextField, and CPTokenField.

Definition at line 265 of file CPResponder.j.

- (void) insertTab: (id)  sender
implementation

Reimplemented in CPTokenField.

Definition at line 270 of file CPResponder.j.

- (void) insertText: (CPString aString
implementation

Inserts some text at the caret position or selection.

Parameters
aStringthe string to insert

Reimplemented in CPTokenField.

Definition at line 282 of file CPResponder.j.

- (void) interpretKeyEvents: (CPArray events
implementation

Called to interpret a series of key events.

Parameters
eventsan array of key CPEvents

Reimplemented in CPComboBox.

Definition at line 100 of file CPResponder.j.

- (void) keyDown: (CPEvent anEvent
implementation

Notifies the receiver that the user has pressed a key.

Parameters
anEventinformation about the key press

Reimplemented in CPWindow, CPTableView, CPOutlineView, CPTextField, CPCollectionView, CPTokenField, and CPBrowser.

Definition at line 210 of file CPResponder.j.

- (void) keyUp: (CPEvent anEvent
implementation

Notifies the receiver that the user has released a key.

Parameters
anEventinformation about the key press

Reimplemented in CPTextField, and CPTokenField.

Definition at line 219 of file CPResponder.j.

- (CPMenu) menu
implementation

Reimplemented in CPSearchField.

Definition at line 326 of file CPResponder.j.

- (void) mouseDown: (CPEvent anEvent
implementation

Notifies the receiver that the user has clicked the mouse down in its area.

Parameters
anEventcontains information about the click

Reimplemented in CPTableHeaderView, CPView, CPTextField, CPButton, CPControl, CPSplitView, CPCollectionView, CPScroller, CPTokenField, CPSearchField, CPLevelIndicator, CPTabView, CPImageView, CPSegmentedControl, CPPopUpButton, and CPFlashView.

Definition at line 132 of file CPResponder.j.

- (void) mouseDragged: (CPEvent anEvent
implementation

Notifies the receiver that the user has initiated a drag over it. A drag is a mouse movement while the left button is down.

Parameters
anEventcontains information about the drag

Reimplemented in CPTextField, CPCollectionView, and CPFlashView.

Definition at line 151 of file CPResponder.j.

- (void) mouseEntered: (CPEvent anEvent
implementation

Reimplemented in CPTableHeaderView, CPControl, CPSplitView, and CPScroller.

Definition at line 183 of file CPResponder.j.

- (void) mouseExited: (CPEvent anEvent
implementation

Notifies the receiver that the mouse exited the receiver's area.

Parameters
anEventcontains information about the exit

Reimplemented in CPTableHeaderView, CPControl, CPSplitView, and CPScroller.

Definition at line 192 of file CPResponder.j.

- (void) mouseMoved: (CPEvent anEvent
implementation

Notifies the receiver that the user has moved the mouse (with no buttons down).

Parameters
anEventcontains information about the movement

Reimplemented in CPTableHeaderView, and CPSplitView.

Definition at line 178 of file CPResponder.j.

- (void) mouseUp: (CPEvent anEvent
implementation

Notifies the receiver that the user has released the left mouse button.

Parameters
anEventcontains information about the release

Reimplemented in CPTextField, CPCollectionView, CPTokenField, CPSegmentedControl, and CPFlashView.

Definition at line 160 of file CPResponder.j.

- (CPResponder) nextResponder
implementation

Returns the responder after the receiver.

Definition at line 91 of file CPResponder.j.

- (void) noResponderFor: (SEL)  anEventSelector
implementation

Called when an event finds no suitable responder.

Parameters
anEventSelectorthe command that failed

Definition at line 345 of file CPResponder.j.

- (BOOL) performKeyEquivalent: (CPEvent anEvent
implementation

Overridden by subclasses to handle a key equivalent.

If the character code or codes in anEvent match the receiver’s key equivalent, the receiver should respond to the event and return YES. The default implementation does nothing and returns NO.

You should extract the characters for a key equivalent using [anEvent charactersIgnoringModifiers].

Parameters
anEventAn event object that represents the key equivalent pressed
Returns
YES if theEvent is a key equivalent that the receiver handled, NO if it is not a key equivalent that it should handle.

Reimplemented in CPWindow, CPView, CPButton, and CPComboBox.

Definition at line 246 of file CPResponder.j.

- (BOOL) resignFirstResponder
implementation

Notifies the receiver that it has been asked to give up first responder status.

Returns
YES if the receiver is willing to give up first responder status.

Reimplemented in CPTextField, CPTokenField, CPSearchField, and CPComboBox.

Definition at line 73 of file CPResponder.j.

- (void) rightMouseDown: (CPEvent anEvent
implementation

Notifies the receiver that the user has clicked the right mouse down in its area.

Parameters
anEventcontains information about the right click

Reimplemented in CPView, and CPPopUpButton.

Definition at line 141 of file CPResponder.j.

- (void) rightMouseUp: (CPEvent anEvent
implementation

Notifies the receiver that the user has released the right mouse button.

Parameters
anEventcontains information about the release

Definition at line 169 of file CPResponder.j.

- (void) scrollWheel: (CPEvent anEvent
implementation

Notifies the receiver that the mouse scroll wheel has moved.

Parameters
anEventinformation about the scroll

Reimplemented in CPScrollView.

Definition at line 201 of file CPResponder.j.

- (void) setMenu: (CPMenu aMenu
implementation

Reimplemented in CPApplication.

Definition at line 321 of file CPResponder.j.

- (void) setNextResponder: (CPResponder aResponder
implementation

Sets the receiver's next responder.

Parameters
aResponderthe responder after the receiver

Definition at line 83 of file CPResponder.j.

- (BOOL) tryToPerform: (SEL)  aSelector
with: (id)  anObject 
implementation

The receiver will attempt to perform the command, or pass it on to the next responder if it doesn't respond to it.

Parameters
aSelectorthe command to perform
anObjectthe argument to the method
Returns
YES if the receiver was able to perform the command, or a responder down the chain was able to perform the command.

Reimplemented in CPApplication.

Definition at line 307 of file CPResponder.j.

- (CPUndoManager) undoManager
implementation

Returns the undo manager for the receiver.

Reimplemented in CPWindow, and CPDocument.

Definition at line 335 of file CPResponder.j.


The documentation for this class was generated from the following files: