CPObjectCPResponder
CPView
CPControl
@implementation CPControl : CPView
CPControl
is an abstract superclass used to implement user interface elements. As a subclass of CPView
and CPResponder
it has the ability to handle screen drawing and handling user input.
Method Summary | |
---|---|
-(id) | initWithCoder:(CPCoder)aCoder Initializes the control by unarchiving it from a coder. |
-(id) | initWithFrame:(CGRect)aFrame Initializes the receiver for usage with the specified bounding rectangle. |
-(id) | NS_initWithCoder:(CPCoder)aCoder |
-(SEL) | action Returns the receiver's target action. |
-(CPTextAlignment) | alignment Returns the receiver's alignment. |
-(CPColor) | backgroundColorForName:(CPString)aName |
-(void) | encodeWithCoder:(CPCoder)aCoder Archives the control to the provided coder. |
-(float) | floatValue Returns the receiver's float value. |
-(CPFont) | font Returns the receiver's font. |
-(BOOL) | isEnabled Returns YES if the receiver responds to mouse events. |
-(void) | mouseUp:(CPEvent)anEvent Notifies the receiver that the user has released the left mouse button. |
-(void) | sendAction:(SEL)anAction to:(id)anObject Causes anAction to be sent to anObject . |
-(void) | setAction:(SEL)anAction Sets the receiver's target action. |
-(void) | setAlignment:(CPTextAlignment)anAlignment Sets the receiver's alignment. |
-(void) | setBackgroundColor:(CPColor)aColor Sets the background color of the receiver. |
-(void) | setBackgroundColorWithName:(CPString)aName |
-(void) | setBackgroundColor:(CPColor)aColor forName:(CPString)aName |
-(void) | setEnabled:(BOOL)isEnabled Sets whether the receiver responds to mouse events. |
-(void) | setFloatValue:(float)aValue Sets the receiver's float value. |
-(void) | setFont:(CPFont)aFont Sets the receiver's font. |
-(void) | setTarget:(id)aTarget Sets the receiver's target. |
-(void) | setTextColor:(CPColor)aColor Sets the color of the receiver's text. |
-(void) | setTextShadow:(CPShadow)aTextShadow Sets the shadow for the receiver's text. |
-(id) | target Returns the receiver's target. |
-(CPColor) | textColor Returns the color of the receiver's text. |
-(CPShadow) | textShadow Returns the receiver's text shadow. |
Method Detail |
---|
-(id)initWithCoder:(CPCoder)aCoder
aCoder
- the coder from which to unarchive the control-(id)initWithFrame:(CGRect)aFrame
aFrame
-(id)NS_initWithCoder:(CPCoder)aCoder
aCoder
-(SEL)action
-(CPTextAlignment)alignment
-(CPColor)backgroundColorForName:(CPString)aName
aName
-(void)encodeWithCoder:(CPCoder)aCoder
aCoder
- the coder to which the control will be archived.-(float)floatValue
-(CPFont)font
-(BOOL)isEnabled
YES
if the receiver responds to mouse events.-(void)mouseUp:(CPEvent)anEvent
anEvent
- contains information about the release-(void)sendAction:(SEL)anAction to:(id)anObject
anAction
to be sent to anObject
.anAction
- the action to sendanObject
- the object to which the action will be sent-(void)setAction:(SEL)anAction
anAction
- Sets the action message that gets sent to the target.-(void)setAlignment:(CPTextAlignment)anAlignment
anAlignment
- the receiver's alignment-(void)setBackgroundColor:(CPColor)aColor
aColor
- the new color for the receiver's background-(void)setBackgroundColorWithName:(CPString)aName
aName
-(void)setBackgroundColor:(CPColor)aColor forName:(CPString)aName
aColor
aName
-(void)setEnabled:(BOOL)isEnabled
isEnabled
- whether the receiver will respond to mouse events-(void)setFloatValue:(float)aValue
aValue
-(void)setFont:(CPFont)aFont
aFont
- the font for the receiver-(void)setTarget:(id)aTarget
aTarget
- the object that will receive the message specified by action-(void)setTextColor:(CPColor)aColor
aColor
-(void)setTextShadow:(CPShadow)aTextShadow
aTextShadow
- the text shadow-(id)target
-(CPColor)textColor
-(CPShadow)textShadow
Created on Sat Sep 13 14:15:43 PDT 2008