CPButton Class Reference

List of all members.

Public Member Functions

(void) - setButtonType: [implementation]
(id) - initWithFrame: [implementation]
(void) - setImagePosition: [implementation]
(CPCellImagePosition) - imagePosition [implementation]
(void) - setImageScaling: [implementation]
(CPImageScaling) - imageScaling [implementation]
(void) - setTextColor: [implementation]
(void) - setFont: [implementation]
(BOOL) - allowsMixedState [implementation]
(void) - setAllowsMixedState: [implementation]
(void) - setNextState [implementation]
(void) - setState: [implementation]
(int) - state [implementation]
(void) - setAlignment: [implementation]
(void) - setImage: [implementation]
(CPImage- image [implementation]
(void) - setAlternateImage: [implementation]
(CPImage- alternateImage [implementation]
(void) - setTitle: [implementation]
(CPString- title [implementation]
(void) - tile [implementation]
(void) - sizeToFit [implementation]
(void) - setFrameSize: [implementation]
(void) - highlight: [implementation]
(void) - setTag: [implementation]
(int) - tag [implementation]
(void) - mouseDown: [implementation]
(void) - mouseDragged: [implementation]
(void) - mouseUp: [implementation]
(void) - setControlSize: [implementation]
(CPControlSize) - controlSize [implementation]
(void) - setBordered: [implementation]
(BOOL) - isBordered [implementation]
(void) - setBezelStyle: [implementation]
(int) - bezelStyle [implementation]
(void) - updateBackgroundColors [implementation]
(void) - drawBezelWithHighlight: [implementation]
(void) - drawContentsWithHighlight: [implementation]
(void) - viewDidMoveToWindow [implementation]
(id) - initWithCoder: [implementation]
(void) - encodeWithCoder: [implementation]

Static Public Member Functions

(void) + initialize [implementation]


Detailed Description

CPButton is a subclass of CPControl that intercepts mouse-down events and sends an action message to a target object when it's clicked or pressed.

Definition at line 229 of file CPButton.j.


Member Function Documentation

- (BOOL) allowsMixedState   [implementation]

Returns YES if the button has a 'mixed' state in addition to on and off.

Definition at line 413 of file CPButton.j.

- (CPImage) alternateImage   [implementation]

Returns the image used when the button is in an alternate state.

Definition at line 501 of file CPButton.j.

- (int) bezelStyle   [implementation]

Returns the current bezel style

Definition at line 731 of file CPButton.j.

- (CPControlSize) controlSize   [implementation]

Returns the button's control size.

Definition at line 664 of file CPButton.j.

- (void) drawBezelWithHighlight: (BOOL)  shouldHighlight   [implementation]

Definition at line 764 of file CPButton.j.

- (void) drawContentsWithHighlight: (BOOL)  isHighlighted   [implementation]

Definition at line 775 of file CPButton.j.

- (void) encodeWithCoder: (CPCoder aCoder   [implementation]

Archives this button into the provided coder.

Parameters:
aCoder the coder to which the button's instance data will be written.

Definition at line 862 of file CPButton.j.

- (void) highlight: (BOOL)  aFlag   [implementation]

Highlights the receiver based on aFlag.

Parameters:
If YES the button will highlight, NO the button will unhighlight.

Definition at line 588 of file CPButton.j.

- (CPImage) image   [implementation]

Returns the image that will be drawn on the button

Definition at line 484 of file CPButton.j.

- (CPCellImagePosition) imagePosition   [implementation]

Returns the buton's image position

Definition at line 360 of file CPButton.j.

- (CPImageScaling) imageScaling   [implementation]

Returns the button's image scaling method

Definition at line 382 of file CPButton.j.

+ (void) initialize   [implementation]

Initializes the CPButton class.

Definition at line 258 of file CPButton.j.

- (id) initWithCoder: (CPCoder aCoder   [implementation]

Initializes the button by unarchiving data from aCoder.

Parameters:
aCoder the coder containing the archived CPButton.

Definition at line 835 of file CPButton.j.

- (id) initWithFrame: (CGRect)  aFrame   [implementation]

Definition at line 323 of file CPButton.j.

- (BOOL) isBordered   [implementation]

Returns YES if the border is bezeled.

Definition at line 689 of file CPButton.j.

- (void) mouseDown: (CPEvent anEvent   [implementation]

Called when the user clicks on this button.

Parameters:
anEvent the event with information about the click

Definition at line 615 of file CPButton.j.

- (void) mouseDragged: (CPEvent anEvent   [implementation]

Called when the user drags on the button.

Parameters:
anEvent the event with information about the drag

Definition at line 626 of file CPButton.j.

- (void) mouseUp: (CPEvent anEvent   [implementation]

Called when the user releases the mouse button

Parameters:
anEvent the event with information about the mouse release

Definition at line 637 of file CPButton.j.

- (void) setAlignment: (CPTextAlignment)  anAlignment   [implementation]

Sets the alignment of the text on the button.

Parameters:
anAlignment an alignment object

Definition at line 460 of file CPButton.j.

- (void) setAllowsMixedState: (BOOL)  aFlag   [implementation]

Sets whether the button can have a 'mixed' state.

Parameters:
aFlag specifies whether a 'mixed' state is allowed or not

Definition at line 422 of file CPButton.j.

- (void) setAlternateImage: (CPImage anImage   [implementation]

Sets the button's image which is used in its alternate state.

Parameters:
anImage the image to be used while the button is in an alternate state

Definition at line 493 of file CPButton.j.

- (void) setBezelStyle: (CPBezelStyle)  aBezelStyle   [implementation]

Sets the button's bezel style.

Parameters:
aBezelStye one of the predefined bezel styles

Definition at line 698 of file CPButton.j.

- (void) setBordered: (BOOL)  isBordered   [implementation]

Sets whether the button has a bezeled border.

Parameters:
If YES, the the button will have a bezeled border.

Definition at line 673 of file CPButton.j.

- (void) setButtonType: (CPButtonType)  aButtonType   [implementation]

Sets how the button highlights and shows its state.

Parameters:
aButtonType Defines the behavior of the button.

Definition at line 312 of file CPButton.j.

- (void) setControlSize: (CPControlSize)  aControlSize   [implementation]

Sets the button's control size.

Parameters:
aControlSize the button's new control size

Definition at line 650 of file CPButton.j.

- (void) setFont: (CPFont aFont   [implementation]

Sets the font that will be used to draw the button text

Parameters:
aFont the font used to draw the button text

Definition at line 402 of file CPButton.j.

- (void) setFrameSize: (CGSize)  aSize   [implementation]

Sets the frame size for the button.

Parameters:
the new frame size

Definition at line 577 of file CPButton.j.

- (void) setImage: (CPImage anImage   [implementation]

Sets the image that will be drawn on the button.

Parameters:
anImage the image that will be drawn

Definition at line 471 of file CPButton.j.

- (void) setImagePosition: (CPCellImagePosition)  anImagePosition   [implementation]

Sets the position of the button's image to anImagePosition.

Parameters:
anImagePosition the position for the button's image

Definition at line 347 of file CPButton.j.

- (void) setImageScaling: (CPImageScaling)  anImageScaling   [implementation]

Sets the button's images scaling method

Parameters:
anImageScaling the image scaling method

Definition at line 369 of file CPButton.j.

- (void) setNextState   [implementation]

Sets the button to its next state.

Definition at line 430 of file CPButton.j.

- (void) setState: (int)  aState   [implementation]

Sets the button's state to aState.

Parameters:
aState Possible states are any of the CPButton globals: CPOffState, CPOnState, CPMixedState

Definition at line 443 of file CPButton.j.

- (void) setTag: (int)  aTag   [implementation]

Sets button's tag.

Parameters:
aTag the button's new tag

Definition at line 598 of file CPButton.j.

- (void) setTextColor: (CPColor)  aColor   [implementation]

Sets the color of the button's text

Parameters:
aColor the color to use for drawing the button text

Definition at line 391 of file CPButton.j.

- (void) setTitle: (CPString aTitle   [implementation]

Sets the button's title.

Parameters:
aTitle the new title for the button

Definition at line 510 of file CPButton.j.

- (void) sizeToFit   [implementation]

Compacts the button's frame to fit its contents.

Definition at line 555 of file CPButton.j.

- (int) state   [implementation]

Returns the button's current state

Definition at line 451 of file CPButton.j.

- (int) tag   [implementation]

Returns the button's tag.

Definition at line 606 of file CPButton.j.

- (void) tile   [implementation]

Lays out the button.

Definition at line 531 of file CPButton.j.

- (CPString) title   [implementation]

Returns the button's title string

Definition at line 523 of file CPButton.j.

- (void) updateBackgroundColors   [implementation]

Definition at line 737 of file CPButton.j.

- (void) viewDidMoveToWindow   [implementation]

Definition at line 799 of file CPButton.j.


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

Generated on Thu Dec 11 01:55:49 2008 for Cappuccino by  doxygen 1.5.7.1