API  0.9.10
CPResponder Class Reference

#import <CPResponder.h>

+ Inheritance diagram for CPResponder:

Instance Methods

(BOOL) - acceptsFirstResponder
 
(BOOL) - becomeFirstResponder
 
(void) - cursorUpdate:
 
(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:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(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:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

Subclasses of CPResonder can be part of the responder chain.

Definition at line 2 of file CPResponder.h.

Method Documentation

◆ acceptsFirstResponder()

- (BOOL) acceptsFirstResponder
implementation

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

Reimplemented in CPWindow.

Definition at line 54 of file CPResponder.j.

◆ becomeFirstResponder()

- (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.

Definition at line 64 of file CPResponder.j.

◆ cursorUpdate:()

- (void) cursorUpdate: (CPEvent anEvent
implementation

Notifies the receiver that the mouse entered the receiver's area and that it can adapt the cursor.

Parameters
anEventcontains information about the exit

Definition at line 201 of file CPResponder.j.

◆ doCommandBySelector:()

- (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, and CPApplication.

Definition at line 304 of file CPResponder.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Archives the responder to a coder.

Parameters
aCoderthe coder to which the responder will be archived

Reimplemented in CPViewController, and CPPopover.

Provided by category CPResponder(CPCoding).

Definition at line 390 of file CPResponder.j.

◆ flagsChanged:()

- (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 240 of file CPResponder.j.

◆ initWithCoder:()

- (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 CPViewController, and CPPopover.

Provided by category CPResponder(CPCoding).

Definition at line 373 of file CPResponder.j.

◆ insertBackTab:()

- (void) insertBackTab: (id)  sender
implementation

Definition at line 286 of file CPResponder.j.

◆ insertLineBreak:()

- (void) insertLineBreak: (id)  aSender
implementation

Insert a line break at the caret position or selection.

Parameters
aSenderthe object requesting this

Definition at line 268 of file CPResponder.j.

◆ insertNewline:()

- (void) insertNewline: (id)  aSender
implementation

Insert a line break at the caret position or selection.

Parameters
aSenderthe object requesting this

Definition at line 277 of file CPResponder.j.

◆ insertTab:()

- (void) insertTab: (id)  sender
implementation

Definition at line 282 of file CPResponder.j.

◆ insertText:()

- (void) insertText: (CPString aString
implementation

Inserts some text at the caret position or selection.

Parameters
aStringthe string to insert

Definition at line 294 of file CPResponder.j.

◆ interpretKeyEvents:()

- (void) interpretKeyEvents: (CPArray)  events
implementation

Called to interpret a series of key events.

Parameters
eventsan array of key CPEvents

Definition at line 100 of file CPResponder.j.

◆ keyDown:()

- (void) keyDown: (CPEvent anEvent
implementation

Notifies the receiver that the user has pressed a key.

Parameters
anEventinformation about the key press

Reimplemented in CPWindow.

Definition at line 222 of file CPResponder.j.

◆ keyUp:()

- (void) keyUp: (CPEvent anEvent
implementation

Notifies the receiver that the user has released a key.

Parameters
anEventinformation about the key press

Definition at line 231 of file CPResponder.j.

◆ menu()

- (CPMenu) menu
implementation

Definition at line 338 of file CPResponder.j.

◆ mouseDown:()

- (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

Definition at line 132 of file CPResponder.j.

◆ mouseDragged:()

- (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

Definition at line 151 of file CPResponder.j.

◆ mouseEntered:()

- (void) mouseEntered: (CPEvent anEvent
implementation

Definition at line 183 of file CPResponder.j.

◆ mouseExited:()

- (void) mouseExited: (CPEvent anEvent
implementation

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

Parameters
anEventcontains information about the exit

Definition at line 192 of file CPResponder.j.

◆ mouseMoved:()

- (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

Definition at line 178 of file CPResponder.j.

◆ mouseUp:()

- (void) mouseUp: (CPEvent anEvent
implementation

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

Parameters
anEventcontains information about the release

Definition at line 160 of file CPResponder.j.

◆ nextResponder()

- (CPResponder) nextResponder
implementation

Returns the responder after the receiver.

Definition at line 91 of file CPResponder.j.

◆ noResponderFor:()

- (void) noResponderFor: (SEL)  anEventSelector
implementation

Called when an event finds no suitable responder.

Parameters
anEventSelectorthe command that failed

Definition at line 357 of file CPResponder.j.

◆ performKeyEquivalent:()

- (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.

Definition at line 258 of file CPResponder.j.

◆ resignFirstResponder()

- (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.

Definition at line 73 of file CPResponder.j.

◆ rightMouseDown:()

- (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

Definition at line 141 of file CPResponder.j.

◆ rightMouseUp:()

- (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.

◆ scrollWheel:()

- (void) scrollWheel: (CPEvent anEvent
implementation

Notifies the receiver that the mouse scroll wheel has moved.

Parameters
anEventinformation about the scroll

Definition at line 213 of file CPResponder.j.

◆ setMenu:()

- (void) setMenu: (CPMenu aMenu
implementation

Reimplemented in CPApplication.

Definition at line 333 of file CPResponder.j.

◆ setNextResponder:()

- (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.

◆ tryToPerform:with:()

- (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 319 of file CPResponder.j.

◆ undoManager()

- (CPUndoManager) undoManager
implementation

Returns the undo manager for the receiver.

Reimplemented in CPWindow, and CPDocument.

Definition at line 347 of file CPResponder.j.


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