#import <CPControl.h>
Class Methods | |
(void) | + initialize |
(CPDictionary) | + themeAttributes |
Class Methods inherited from CPView | |
(Class) | + animatorClass |
(CAAnimation) | + defaultAnimationForKey: |
(CPMenu) | + defaultMenu |
(CPString) | + defaultThemeClass |
(BOOL) | + isHighDPIDrawingEnabled |
(CPSet) | + keyPathsForValuesAffectingBounds |
(CPSet) | + keyPathsForValuesAffectingFrame |
(void) | + setHighDPIDrawingEnabled: |
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.
|
implementation |
Enabled controls accept first mouse by default.
Reimplemented from CPView.
Reimplemented in CPTextField.
Definition at line 491 of file CPControl.j.
|
implementation |
Returns the receiver's target action.
Definition at line 290 of file CPControl.j.
|
implementation |
Returns the text alignment of the control.
Definition at line 784 of file CPControl.j.
|
implementation |
Synthesized accessor method.
Provided by category CPControl(CPSynthesizedAccessors).
Definition at line 1255 of file CPControl.j.
|
implementation |
Reimplemented in CPTableView, and CPSlider.
Definition at line 475 of file CPControl.j.
|
implementation |
Returns the control's control size
Definition at line 202 of file CPControl.j.
|
implementation |
Returns the receiver's double value.
Definition at line 562 of file CPControl.j.
|
implementation |
Archives the view to a coder.
aCoder | the object into which the view's data will be archived. |
Reimplemented from CPView.
Reimplemented in CPTokenField, CPSearchField, CPRadio, CPTableView, CPOutlineView, CPTextField, CPButton, CPBrowser, CPScroller, CPComboBox, CPDatePicker, CPImageView, CPLevelIndicator, CPSegmentedControl, CPSlider, CPColorWell, and CPStepper.
Provided by category CPControl(CPCoding).
Definition at line 1121 of file CPControl.j.
|
implementation |
Returns the receiver's float value.
Definition at line 545 of file CPControl.j.
|
implementation |
Returns the font of the control.
Definition at line 899 of file CPControl.j.
|
implementation |
Synthesized accessor method.
Provided by category CPControl(CPSynthesizedAccessors).
Definition at line 1223 of file CPControl.j.
|
implementation |
Highlights the receiver.
BOOL | - YES if the receiver should be highlighted, otherwise NO. |
Definition at line 980 of file CPControl.j.
|
implementation |
Returns the image position of the receiver.
Definition at line 925 of file CPControl.j.
|
implementation |
Returns the image scaling of the control.
Reimplemented in CPImageView.
Definition at line 948 of file CPControl.j.
|
implementation |
Reimplemented from CPView.
Reimplemented in CPImageView.
Definition at line 137 of file CPControl.j.
|
implementation |
Initializes the view from an archive.
aCoder | the coder from which to initialize |
Reimplemented from CPView.
Reimplemented in CPTokenField, CPSearchField, CPRadio, CPTableView, CPOutlineView, CPTextField, CPButton, CPBrowser, CPScroller, CPComboBox, CPDatePicker, CPImageView, CPLevelIndicator, CPSegmentedControl, CPSlider, CPColorWell, CPStepper, and CPPopUpButton.
Provided by category CPControl(CPCoding).
Definition at line 1092 of file CPControl.j.
|
implementation |
Initializes the receiver for usage with the specified bounding rectangle
Reimplemented from CPView.
Reimplemented in CPRadio, CPTableView, CPOutlineView, CPDisclosureButton, CPTextField, CPButton, CPBrowser, CPTokenField, CPScroller, CPComboBox, CPDatePicker, CPImageView, CPLevelIndicator, CPSearchField, CPSegmentedControl, CPSlider, CPColorWell, CPStepper, CPPopUpButton, and CPCheckBox.
Definition at line 183 of file CPControl.j.
|
implementation |
Returns the receiver's int value.
Definition at line 596 of file CPControl.j.
|
implementation |
Returns the receiver's int value.
Definition at line 579 of file CPControl.j.
|
implementation |
Returns whether the control can continuously send its action messages.
Reimplemented in CPSlider.
Definition at line 341 of file CPControl.j.
|
implementation |
Returns YES if the receiver is enabled, otherwise NO.
Definition at line 970 of file CPControl.j.
|
implementation |
Returns YES if the control is highlighted, otherwise NO.
Definition at line 1001 of file CPControl.j.
|
implementation |
Returns the line break mode of the control.
Definition at line 831 of file CPControl.j.
|
implementation |
Reimplemented from CPView.
Reimplemented in CPTextField, CPButton, CPTokenField, CPScroller, CPImageView, CPLevelIndicator, CPSearchField, CPSegmentedControl, and CPPopUpButton.
Definition at line 496 of file CPControl.j.
|
implementation |
Returns the mask of modifier keys held down when the user clicked.
Definition at line 463 of file CPControl.j.
|
implementation |
Reimplemented in CPScroller.
Definition at line 504 of file CPControl.j.
|
implementation |
Reimplemented in CPScroller.
Definition at line 512 of file CPControl.j.
|
implementation |
Reimplemented in CPRadio, and CPButton.
Definition at line 419 of file CPControl.j.
|
implementation |
Returns the receiver's object value.
Reimplemented in CPTextField, CPTokenField, CPDatePicker, and CPPopUpButton.
Definition at line 526 of file CPControl.j.
|
implementation |
Perform a click on the receiver.
sender | - The sender object |
Reimplemented in CPButton.
Definition at line 429 of file CPControl.j.
|
implementation |
Causes anAction
to be sent to anObject
.
anAction | the action to send |
anObject | the object to which the action will be sent |
Reimplemented in CPRadio, CPTokenField, CPComboBox, and CPSearchField.
Definition at line 319 of file CPControl.j.
|
implementation |
Definition at line 329 of file CPControl.j.
|
implementation |
Synthesized accessor method.
Provided by category CPControl(CPSynthesizedAccessors).
Definition at line 1239 of file CPControl.j.
|
implementation |
Sets the receiver's target action.
anAction | Sets the action message that gets sent to the target. |
Definition at line 282 of file CPControl.j.
|
implementation |
Sets the text alignment of the control.
CPLeftTextAlignment CPCenterTextAlignment CPRightTextAlignment CPJustifiedTextAlignment CPNaturalTextAlignment
Reimplemented in CPComboBox.
Definition at line 776 of file CPControl.j.
|
implementation |
Sets the initial writing direction of the receiver
writingDirection | - It could be CPWritingDirectionNatural, CPWritingDirectionLeftToRight, CPWritingDirectionRightToLeft |
Provided by category CPControl(CPSynthesizedAccessors).
Definition at line 1014 of file CPControl.j.
|
implementation |
Sets whether the cell can continuously send its action messages.
Reimplemented in CPSlider.
Definition at line 350 of file CPControl.j.
|
implementation |
Sets the control's size.
aControlSize | the control's size |
Reimplemented in CPTextField, CPButton, CPDatePicker, CPSegmentedControl, and CPStepper.
Definition at line 211 of file CPControl.j.
|
implementation |
Sets the receiver's double value.
Reimplemented in CPStepper.
Definition at line 571 of file CPControl.j.
|
implementation |
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.
BOOL | - YES if the control should be enabled, otherwise NO. |
Reimplemented in CPTextField, CPTokenField, CPDatePicker, and CPStepper.
Definition at line 959 of file CPControl.j.
|
implementation |
Sets the receiver's float value.
Definition at line 554 of file CPControl.j.
|
implementation |
Sets the font of the control.
Reimplemented in CPComboBox, and CPSegmentedControl.
Definition at line 891 of file CPControl.j.
|
implementation |
Synthesized accessor method.
Provided by category CPControl(CPSynthesizedAccessors).
Definition at line 1231 of file CPControl.j.
|
implementation |
Highlights the receiver.
BOOL | - YES if the receiver should be highlighted, otherwise NO. |
Definition at line 990 of file CPControl.j.
|
implementation |
Sets the image position of the control.
CPNoImage CPImageOnly CPImageLeft CPImageRight CPImageBelow CPImageAbove CPImageOverlaps
Definition at line 917 of file CPControl.j.
|
implementation |
Sets the image scaling of the control.
CPImageScaleProportionallyDown CPImageScaleAxesIndependently CPImageScaleNone CPImageScaleProportionallyUpOrDown
Reimplemented in CPImageView.
Definition at line 940 of file CPControl.j.
|
implementation |
Sets the receiver's int value.
Definition at line 605 of file CPControl.j.
|
implementation |
Sets the receiver's int value.
Definition at line 588 of file CPControl.j.
|
implementation |
Sets the line break mode of the receiver.
CPLineBreakByWordWrapping CPLineBreakByCharWrapping CPLineBreakByClipping CPLineBreakByTruncatingHead CPLineBreakByTruncatingTail CPLineBreakByTruncatingMiddle
Definition at line 823 of file CPControl.j.
|
implementation |
Sets the receiver's object value.
Reimplemented in CPRadio, CPTextField, CPButton, CPTokenField, CPScroller, CPComboBox, CPSlider, and CPPopUpButton.
Definition at line 534 of file CPControl.j.
|
implementation |
Synthesized accessor method.
Provided by category CPControl(CPSynthesizedAccessors).
Definition at line 1247 of file CPControl.j.
|
implementation |
Reimplemented in CPDisclosureButton, and CPButton.
Definition at line 415 of file CPControl.j.
|
implementation |
Sets the receiver's string value.
Definition at line 629 of file CPControl.j.
|
implementation |
Sets the receiver's target. The target receives action messages from the receiver.
aTarget | the object that will receive the message specified by action |
Definition at line 300 of file CPControl.j.
|
implementation |
Sets the text color of the receiver.
aColor | - A CPColor object. |
Reimplemented in CPTextField.
Definition at line 841 of file CPControl.j.
|
implementation |
Sets the shadow color of the text for the receiver.
Definition at line 857 of file CPControl.j.
|
implementation |
Sets the shadow offset for the text.
offset | - a CGSize with the x and y offsets. |
Definition at line 875 of file CPControl.j.
|
implementation |
Set the vertical text alignment of the control.
CPTopVerticalTextAlignment CPCenterVerticalTextAlignment CPBottomVerticalTextAlignment
Definition at line 798 of file CPControl.j.
|
implementation |
Reimplemented in CPRadio, CPTableView, CPButton, CPSlider, and CPCheckBox.
Definition at line 468 of file CPControl.j.
|
implementation |
Reimplemented in CPTableView, CPButton, CPSlider, and CPColorWell.
Definition at line 480 of file CPControl.j.
|
implementation |
Returns the receiver's string value.
Reimplemented in CPTokenField.
Definition at line 613 of file CPControl.j.
|
implementation |
Definition at line 657 of file CPControl.j.
|
implementation |
Definition at line 664 of file CPControl.j.
|
implementation |
Definition at line 670 of file CPControl.j.
|
implementation |
Definition at line 676 of file CPControl.j.
|
implementation |
Definition at line 682 of file CPControl.j.
|
implementation |
Definition at line 688 of file CPControl.j.
|
implementation |
Returns the receiver's target. The target receives action messages from the receiver.
Definition at line 308 of file CPControl.j.
|
implementation |
Returns the text color of the receiver.
Definition at line 849 of file CPControl.j.
|
implementation |
Reimplemented in CPTextField.
Definition at line 694 of file CPControl.j.
|
implementation |
Reimplemented in CPTextField, CPTokenField, and CPComboBox.
Definition at line 703 of file CPControl.j.
|
implementation |
Reimplemented in CPTextField.
Definition at line 712 of file CPControl.j.
|
implementation |
Returns the shadow color of the text for the control.
Definition at line 865 of file CPControl.j.
|
implementation |
Returns the text shadow offset of the receiver.
Definition at line 883 of file CPControl.j.
|
implementation |
Reimplemented from CPView.
Reimplemented in CPTableView, CPTextField, CPButton, CPBrowser, CPTokenField, CPScroller, CPComboBox, CPDatePicker, CPLevelIndicator, CPSearchField, CPSegmentedControl, CPSlider, CPColorWell, and CPStepper.
Definition at line 119 of file CPControl.j.
|
implementation |
Reimplemented in CPTableView, and CPBrowser.
Definition at line 367 of file CPControl.j.
|
implementation |
Returns YES if the receiver tracks the mouse outside the frame, otherwise NO.
Reimplemented in CPTableView, and CPSlider.
Definition at line 362 of file CPControl.j.
|
implementation |
Fired when the button timer finished, usually after the user hits enter.
Definition at line 455 of file CPControl.j.
|
implementation |
Invoked automatically when the view’s geometry changes such that its tracking areas need to be recalculated.
You should override this method to remove out of date tracking areas, add recomputed tracking areas and then call super;
Cocoa calls this on every view, whereas they have tracking area(s) or not. Cappuccino behaves differently :
Please note that it is the owner of a tracking area who is called for updateTrackingAreas. But, if a view without any tracking area is inserted in the view hierarchy (that is, in a window), the view is called for updateTrackingAreas. This enables you to use updateTrackingArea to initially attach your tracking areas to the view.
Reimplemented from CPView.
Reimplemented in CPTextField, and CPSearchField.
Provided by category CPControl(CPTrackingArea).
Definition at line 1056 of file CPControl.j.
|
implementation |
Returns the vertical text alignment of the receiver.
Definition at line 806 of file CPControl.j.