API 0.9.5
CPControl Class Reference

#import <CPControl.h>

Inheritance diagram for CPControl:

List of all members.

Instance Methods

(SEL) - action
(CPTextAlignment) - alignment
(BOOL) - continueTracking:at:
(double) - doubleValue
(void) - encodeWithCoder:
(float) - floatValue
(CPFont- font
(CPFormatter- formatter
(void) - highlight:
(CPCellImagePosition) - imagePosition
(CPImageScaling) - imageScaling
(id) - initWithCoder:
(id) - initWithFrame:
(int) - integerValue
(int) - intValue
(BOOL) - isContinuous
(BOOL) - isEnabled
(BOOL) - isHighlighted
(CPLineBreakMode) - lineBreakMode
(void) - mouseDown:
(unsigned) - mouseDownFlags
(void) - mouseEntered:
(void) - mouseExited:
(int) - nextState
(id) - objectValue
(void) - performClick:
(BOOL) - sendAction:to:
(int) - sendActionOn:
(BOOL) - sendsActionOnEndEditing
(void) - setAction:
(void) - setAlignment:
(void) - setContinuous:
(void) - setDoubleValue:
(void) - setEnabled:
(void) - setFloatValue:
(void) - setFont:
(void) - setFormatter:
(void) - setHighlighted:
(void) - setImagePosition:
(void) - setImageScaling:
(void) - setIntegerValue:
(void) - setIntValue:
(void) - setLineBreakMode:
(void) - setObjectValue:
(void) - setSendsActionOnEndEditing:
(void) - setState:
(void) - setStringValue:
(void) - setTarget:
(void) - setTextColor:
(void) - setTextShadowColor:
(void) - setTextShadowOffset:
(void) - setVerticalAlignment:
(BOOL) - startTrackingAt:
(void) - stopTracking:at:mouseIsUp:
(CPString- stringValue
(void) - takeDoubleValueFrom:
(void) - takeFloatValueFrom:
(void) - takeIntegerValueFrom:
(void) - takeIntValueFrom:
(void) - takeObjectValueFrom:
(void) - takeStringValueFrom:
(id) - target
(CPColor- textColor
(void) - textDidBeginEditing:
(void) - textDidChange:
(void) - textDidEndEditing:
(CPColor- textShadowColor
(CGSize) - textShadowOffset
(void) - trackMouse:
(BOOL) - tracksMouseOutsideOfFrame
(void) - unhighlightButtonTimerDidFinish:
(CPTextVerticalAlignment) - verticalAlignment

Class Methods

(void) + initialize
(CPDictionary+ themeAttributes

Detailed Description

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.

Definition at line 2 of file CPControl.h.


Method Documentation

- (SEL) action

Returns the receiver's target action.

Definition at line 194 of file CPControl.j.

- (CPTextAlignment) alignment

Returns the text alignment of the control.

Definition at line 632 of file CPControl.j.

- (BOOL) continueTracking: (CGPoint)  lastPoint
at: (CGPoint)  aPoint 

Reimplemented in CPSlider, and CPTableView.

Definition at line 376 of file CPControl.j.

- (double) doubleValue

Returns the receiver's double value.

Definition at line 452 of file CPControl.j.

- (void) encodeWithCoder: (CPCoder aCoder

Archives the view to a coder.

Parameters:
aCoderthe object into which the view's data will be archived.

Reimplemented from CPView.

Reimplemented in CPBrowser, CPButton, CPColorWell, CPImageView, CPLevelIndicator, CPOutlineView, CPRadio, CPScroller, CPSearchField, CPSegmentedControl, CPSlider, CPStepper, CPTableView, CPTextField, and CPTokenField.

Definition at line 898 of file CPControl.j.

- (float) floatValue

Returns the receiver's float value.

Definition at line 435 of file CPControl.j.

- (CPFont) font

Returns the font of the control.

Definition at line 747 of file CPControl.j.

- (CPFormatter) formatter

Synthesized accessor method.

Definition at line 992 of file CPControl.j.

- (void) highlight: (BOOL)  shouldHighlight

Highlights the receiver.

Parameters:
BOOL- YES if the receiver should be highlighted, otherwise NO.

Definition at line 827 of file CPControl.j.

- (CPCellImagePosition) imagePosition

Returns the image position of the receiver.

Definition at line 773 of file CPControl.j.

- (CPImageScaling) imageScaling

Returns the image scaling of the control.

Reimplemented in CPImageView.

Definition at line 795 of file CPControl.j.

+ (void) initialize

Reimplemented from CPView.

Reimplemented in CPImageView, CPLevelIndicator, and CPSearchField.

Definition at line 124 of file CPControl.j.

- (id) initWithCoder: (CPCoder aCoder

Initializes the view from an archive.

Parameters:
aCoderthe coder from which to initialize
Returns:
the initialized view

Reimplemented from CPView.

Reimplemented in CPBrowser, CPButton, CPColorWell, CPImageView, CPLevelIndicator, CPOutlineView, CPPopUpButton, CPRadio, CPScroller, CPSearchField, CPSegmentedControl, CPSlider, CPStepper, CPTableView, CPTextField, and CPTokenField.

Definition at line 875 of file CPControl.j.

- (id) initWithFrame: (CGRect)  aFrame

Initializes the receiver for usage with the specified bounding rectangle

Returns:
the initialized view

Reimplemented from CPView.

Reimplemented in CPBrowser, CPButton, CPCheckBox, CPColorWell, CPImageView, CPLevelIndicator, CPOutlineView, CPPopUpButton, CPRadio, CPScroller, CPSearchField, CPSegmentedControl, CPSlider, CPStepper, CPTableView, and CPTextField.

Definition at line 168 of file CPControl.j.

- (int) integerValue

Returns the receiver's int value.

Definition at line 486 of file CPControl.j.

- (int) intValue

Returns the receiver's int value.

Definition at line 469 of file CPControl.j.

- (BOOL) isContinuous

Returns whether the control can continuously send its action messages.

Reimplemented in CPSlider.

Definition at line 242 of file CPControl.j.

- (BOOL) isEnabled

Returns YES if the receiver is enabled, otherwise NO.

Definition at line 817 of file CPControl.j.

- (BOOL) isHighlighted

Returns YES if the control is highlighted, otherwise NO.

Definition at line 848 of file CPControl.j.

- (CPLineBreakMode) lineBreakMode

Returns the line break mode of the control.

Definition at line 679 of file CPControl.j.

- (void) mouseDown: (CPEvent anEvent

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

Parameters:
anEventcontains information about the click

Reimplemented from CPView.

Reimplemented in CPButton, CPColorWell, CPImageView, CPLevelIndicator, CPPopUpButton, CPScroller, CPSearchField, CPSegmentedControl, CPTextField, and CPTokenField.

Definition at line 386 of file CPControl.j.

- (unsigned) mouseDownFlags

Returns the mask of modifier keys held down when the user clicked.

Definition at line 364 of file CPControl.j.

- (void) mouseEntered: (CPEvent anEvent

Reimplemented from CPResponder.

Reimplemented in CPScroller.

Definition at line 394 of file CPControl.j.

- (void) mouseExited: (CPEvent anEvent

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

Parameters:
anEventcontains information about the exit

Reimplemented from CPResponder.

Reimplemented in CPScroller.

Definition at line 402 of file CPControl.j.

- (int) nextState

Reimplemented in CPButton, and CPRadio.

Definition at line 320 of file CPControl.j.

- (id) objectValue

Returns the receiver's object value.

Reimplemented in CPPopUpButton, CPTextField, and CPTokenField.

Definition at line 416 of file CPControl.j.

- (void) performClick: (id)  sender

Perform a click on the receiver.

Parameters:
sender- The sender object

Definition at line 330 of file CPControl.j.

- (BOOL) sendAction: (SEL)  anAction
to: (id)  anObject 

Causes anAction to be sent to anObject.

Parameters:
anActionthe action to send
anObjectthe object to which the action will be sent

Reimplemented in CPRadio, CPSearchField, and CPTokenField.

Definition at line 223 of file CPControl.j.

- (int) sendActionOn: (int)  mask

Definition at line 230 of file CPControl.j.

- (BOOL) sendsActionOnEndEditing

Synthesized accessor method.

Definition at line 1008 of file CPControl.j.

- (void) setAction: (SEL)  anAction

Sets the receiver's target action.

Parameters:
anActionSets the action message that gets sent to the target.

Definition at line 186 of file CPControl.j.

- (void) setAlignment: (CPTextAlignment)  alignment

Sets the text alignment of the control.

    CPLeftTextAlignment
    CPCenterTextAlignment
    CPRightTextAlignment
    CPJustifiedTextAlignment
    CPNaturalTextAlignment
    

Definition at line 624 of file CPControl.j.

- (void) setContinuous: (BOOL)  flag

Sets whether the cell can continuously send its action messages.

Reimplemented in CPSlider.

Definition at line 251 of file CPControl.j.

- (void) setDoubleValue: (double)  anObject

Sets the receiver's double value.

Definition at line 461 of file CPControl.j.

- (void) setEnabled: (BOOL)  isEnabled

Sets the enabled status of the control. Controls that are not enabled can not be used by the user and obtain the CPThemeStateDisabled theme state.

Parameters:
BOOL- YES if the control should be enabled, otherwise NO.

Reimplemented in CPStepper, and CPTextField.

Definition at line 806 of file CPControl.j.

- (void) setFloatValue: (float)  aValue

Sets the receiver's float value.

Definition at line 444 of file CPControl.j.

- (void) setFont: (CPFont aFont

Sets the font of the control.

Reimplemented in CPSegmentedControl.

Definition at line 739 of file CPControl.j.

- (void) setFormatter: (CPFormatter aValue

Synthesized accessor method.

Definition at line 1000 of file CPControl.j.

- (void) setHighlighted: (BOOL)  isHighlighted

Highlights the receiver.

Parameters:
BOOL- YES if the receiver should be highlighted, otherwise NO.

Definition at line 837 of file CPControl.j.

- (void) setImagePosition: (CPCellImagePosition)  position

Sets the image position of the control.

    CPNoImage
    CPImageOnly
    CPImageLeft
    CPImageRight
    CPImageBelow
    CPImageAbove
    CPImageOverlaps
    

Definition at line 765 of file CPControl.j.

- (void) setImageScaling: (CPImageScaling)  scaling

Sets the image scaling of the control.

    CPScaleProportionally
    CPScaleToFit
    CPScaleNone
    

Reimplemented in CPImageView.

Definition at line 787 of file CPControl.j.

- (void) setIntegerValue: (int)  anObject

Sets the receiver's int value.

Definition at line 495 of file CPControl.j.

- (void) setIntValue: (int)  anObject

Sets the receiver's int value.

Definition at line 478 of file CPControl.j.

- (void) setLineBreakMode: (CPLineBreakMode)  mode

Sets the line break mode of the receiver.

    CPLineBreakByWordWrapping
    CPLineBreakByCharWrapping
    CPLineBreakByClipping
    CPLineBreakByTruncatingHead
    CPLineBreakByTruncatingTail
    CPLineBreakByTruncatingMiddle
    

Definition at line 671 of file CPControl.j.

- (void) setObjectValue: (id)  anObject

Sets the receiver's object value.

Reimplemented in CPButton, CPRadio, CPScroller, CPSlider, CPTextField, and CPTokenField.

Definition at line 424 of file CPControl.j.

- (void) setSendsActionOnEndEditing: (BOOL)  aValue

Synthesized accessor method.

Definition at line 1016 of file CPControl.j.

- (void) setState: (int)  state

Definition at line 316 of file CPControl.j.

- (void) setStringValue: (CPString aString

Sets the receiver's string value.

Definition at line 519 of file CPControl.j.

- (void) setTarget: (id)  aTarget

Sets the receiver's target. The target receives action messages from the receiver.

Parameters:
aTargetthe object that will receive the message specified by action

Definition at line 204 of file CPControl.j.

- (void) setTextColor: (CPColor aColor

Sets the text color of the receiver.

Parameters:
aColor- A CPColor object.

Definition at line 689 of file CPControl.j.

- (void) setTextShadowColor: (CPColor aColor

Sets the shadow color of the text for the receiver.

Definition at line 705 of file CPControl.j.

- (void) setTextShadowOffset: (CGSize)  offset

Sets the shadow offset for the text.

Parameters:
offset- a CGSize with the x and y offsets.

Definition at line 723 of file CPControl.j.

- (void) setVerticalAlignment: (CPTextVerticalAlignment)  alignment

Set the vertical text alignment of the control.

    CPTopVerticalTextAlignment
    CPCenterVerticalTextAlignment
    CPBottomVerticalTextAlignment
    

Definition at line 646 of file CPControl.j.

- (BOOL) startTrackingAt: (CGPoint)  aPoint

Reimplemented in CPButton, CPSlider, and CPTableView.

Definition at line 369 of file CPControl.j.

- (void) stopTracking: (CGPoint)  lastPoint
at: (CGPoint)  aPoint
mouseIsUp: (BOOL)  mouseIsUp 

Reimplemented in CPButton, CPSlider, and CPTableView.

Definition at line 381 of file CPControl.j.

- (CPString) stringValue

Returns the receiver's string value.

Reimplemented in CPTokenField.

Definition at line 503 of file CPControl.j.

- (void) takeDoubleValueFrom: (id)  sender

Definition at line 547 of file CPControl.j.

- (void) takeFloatValueFrom: (id)  sender

Definition at line 554 of file CPControl.j.

- (void) takeIntegerValueFrom: (id)  sender

Definition at line 560 of file CPControl.j.

- (void) takeIntValueFrom: (id)  sender

Definition at line 566 of file CPControl.j.

- (void) takeObjectValueFrom: (id)  sender

Definition at line 572 of file CPControl.j.

- (void) takeStringValueFrom: (id)  sender

Definition at line 578 of file CPControl.j.

- (id) target

Returns the receiver's target. The target receives action messages from the receiver.

Definition at line 212 of file CPControl.j.

- (CPColor) textColor

Returns the text color of the receiver.

Definition at line 697 of file CPControl.j.

- (void) textDidBeginEditing: (CPNotification note

Definition at line 584 of file CPControl.j.

- (void) textDidChange: (CPNotification note

Reimplemented in CPTextField.

Definition at line 593 of file CPControl.j.

- (void) textDidEndEditing: (CPNotification note

Definition at line 602 of file CPControl.j.

- (CPColor) textShadowColor

Returns the shadow color of the text for the control.

Definition at line 713 of file CPControl.j.

- (CGSize) textShadowOffset

Returns the text shadow offset of the receiver.

Definition at line 731 of file CPControl.j.

+ (CPDictionary) themeAttributes

Reimplemented from CPView.

Reimplemented in CPButton, CPScroller, CPSegmentedControl, CPSlider, CPStepper, CPTableView, and CPTextField.

Definition at line 98 of file CPControl.j.

- (void) trackMouse: (CPEvent anEvent

Reimplemented in CPBrowser, and CPTableView.

Definition at line 268 of file CPControl.j.

- (BOOL) tracksMouseOutsideOfFrame

Returns YES if the receiver tracks the mouse outside the frame, otherwise NO.

Reimplemented in CPSlider, and CPTableView.

Definition at line 263 of file CPControl.j.

- (void) unhighlightButtonTimerDidFinish: (id)  sender

Fired when the button timer finished, usually after the user hits enter.

Definition at line 356 of file CPControl.j.

- (CPTextVerticalAlignment) verticalAlignment

Returns the vertical text alignment of the receiver.

Definition at line 654 of file CPControl.j.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines