CPObjectCPResponder
@implementation CPResponder : CPObject
Method Summary | |
---|---|
-(id) | initWithCoder:(CPCoder)aCoder Initializes the responder with data from a coder. |
-(id) | NS_initWithCoder:(CPCoder)aCoder |
-(BOOL) | acceptsFirstResponder Returns YES if the receiver is able to become the first responder. |
-(BOOL) | becomeFirstResponder Notifies the receiver that it will become the first responder. |
-(void) | deleteBackward:(id)aSender Deletes one character backward, or the selection if anything is selected. |
-(void) | doCommandBySelector:(SEL)aSelector The receiver will attempt to perform the command, if it responds to it. |
-(void) | encodeWithCoder:(CPCoder)aCoder Archives the responder to a coder. |
-(void) | insertLineBreak:(id)aSender Insert a line break at the caret position or selection. |
-(void) | insertText:(CPString)aString Inserts some text at the caret position or selection. |
-(void) | interpretKeyEvents:(CPArray)events Called to interpret a series of key events. |
-(void) | keyDown:(CPEvent)anEvent Notifies the receiver that the user has pressed a key. |
-(void) | keyUp:(CPEvent)anEvent Notifies the receiver that the user has released a key. |
-(CPMenu) | menu |
-(void) | mouseDown:(CPEvent)anEvent Notifies the receiver that the user has clicked the mouse down in its area. |
-(void) | mouseDragged:(CPEvent)anEvent Notifies the receiver that the user has initiated a drag over it. |
-(void) | mouseEntered:(CPEvent)anEvent |
-(void) | mouseExited:(CPEvent)anEvent Notifies the receiver that the mouse exited the receiver's area. |
-(void) | mouseMoved:(CPEvent)anEvent Notifies the receiver that the user has moved the mouse (with no buttons down). |
-(void) | mouseUp:(CPEvent)anEvent Notifies the receiver that the user has released the left mouse button. |
-(CPResponder) | nextResponder Returns the responder after the receiver. |
-(void) | noResponderFor:(SEL)anEventSelector Called when an event finds no suitable responder. |
-(BOOL) | performKeyEquivalent:(CPEvent)anEvent FIXME This description is bad. |
-(BOOL) | resignFirstResponder Notifies the receiver that it has been asked to give up first responder status. |
-(void) | scrollWheel:(CPEvent)anEvent Notifies the receiver that the mouse scroll wheel has moved. |
-(void) | setMenu:(CPMenu)aMenu |
-(void) | setNextResponder:(CPResponder)aResponder Sets the receiver's next responder. |
-(BOOL) | tryToPerform:(SEL)aSelector with:(id)anObject The receiver will attempt to perform the command, or pass it on to the next responder if it doesn't respond to it. |
-(CPUndoManager) | undoManager Returns the undo manager for the receiver. |
Method Detail |
---|
-(id)initWithCoder:(CPCoder)aCoder
aCoder
- the coder from which data will be read-(id)NS_initWithCoder:(CPCoder)aCoder
aCoder
-(BOOL)acceptsFirstResponder
YES
if the receiver is able to become the first responder. NO
otherwise.-(BOOL)becomeFirstResponder
NO
. The default implementation always returns YES
.YES
if the receiver accepts first responder status.
-(void)deleteBackward:(id)aSender
aSender
- the object requesting this-(void)doCommandBySelector:(SEL)aSelector
nextResponder
will be called to do it.aSelector
- the command to attempt-(void)encodeWithCoder:(CPCoder)aCoder
aCoder
- the coder to which the responder will be archived-(void)insertLineBreak:(id)aSender
aSender
- the object requesting this-(void)insertText:(CPString)aString
aString
- the string to insert-(void)interpretKeyEvents:(CPArray)events
events
- an array of key CPEvent
s-(void)keyDown:(CPEvent)anEvent
anEvent
- information about the key press-(void)keyUp:(CPEvent)anEvent
anEvent
- information about the key press-(CPMenu)menu
-(void)mouseDown:(CPEvent)anEvent
anEvent
- contains information about the click-(void)mouseDragged:(CPEvent)anEvent
anEvent
- contains information about the drag-(void)mouseEntered:(CPEvent)anEvent
anEvent
-(void)mouseExited:(CPEvent)anEvent
anEvent
- contains information about the exit-(void)mouseMoved:(CPEvent)anEvent
anEvent
- contains information about the movement-(void)mouseUp:(CPEvent)anEvent
anEvent
- contains information about the release-(CPResponder)nextResponder
-(void)noResponderFor:(SEL)anEventSelector
anEventSelector
- the command that failed-(BOOL)performKeyEquivalent:(CPEvent)anEvent
anEvent
, the receiver should simulate the event.anEvent
- the event to simulateYES
if the event receiver simulated the event
-(BOOL)resignFirstResponder
YES
if the receiver is willing to give up first responder status.
-(void)scrollWheel:(CPEvent)anEvent
anEvent
- information about the scroll-(void)setMenu:(CPMenu)aMenu
aMenu
-(void)setNextResponder:(CPResponder)aResponder
aResponder
- the responder after the receiver-(BOOL)tryToPerform:(SEL)aSelector with:(id)anObject
aSelector
- the command to performanObject
- the argument to the methodYES
if the receiver was able to perform the command, or a responder down the chain was
able to perform the command.
-(CPUndoManager)undoManager
Created on Sat Sep 13 14:15:43 PDT 2008