#import <CPControl.h>
Class Methods | |
(void) | + initialize |
(CPDictionary) | + themeAttributes |
![]() | |
(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 497 of file CPControl.j.
|
implementation |
Returns the receiver's target action.
Definition at line 296 of file CPControl.j.
|
implementation |
Returns the text alignment of the control.
Definition at line 790 of file CPControl.j.
|
implementation |
Reimplemented in CPTableView, and CPSlider.
Definition at line 481 of file CPControl.j.
|
implementation |
Returns the control's control size
Definition at line 208 of file CPControl.j.
|
implementation |
Returns the receiver's double value.
Definition at line 568 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, CPRadio, CPTableView, CPOutlineView, CPTextField, CPButton, CPBrowser, CPScroller, CPComboBox, CPDatePicker, CPImageView, CPLevelIndicator, CPSearchField, CPSegmentedControl, CPSlider, CPColorWell, and CPStepper.
Provided by category CPControl(CPCoding).
Definition at line 1061 of file CPControl.j.
|
implementation |
Returns the receiver's float value.
Definition at line 551 of file CPControl.j.
|
implementation |
Returns the font of the control.
Definition at line 905 of file CPControl.j.
|
implementation |
Synthesized accessor method.
Provided by category CPControl(CPSynthesizedAccessors).
Definition at line 1160 of file CPControl.j.
|
implementation |
Highlights the receiver.
BOOL | - YES if the receiver should be highlighted, otherwise NO. |
Definition at line 986 of file CPControl.j.
|
implementation |
Returns the image position of the receiver.
Definition at line 931 of file CPControl.j.
|
implementation |
Returns the image scaling of the control.
Reimplemented in CPImageView.
Definition at line 954 of file CPControl.j.
|
implementation |
Reimplemented from CPView.
Reimplemented in CPImageView.
Definition at line 142 of file CPControl.j.
|
implementation |
Initializes the view from an archive.
aCoder | the coder from which to initialize |
Reimplemented from CPView.
Reimplemented in CPTokenField, CPRadio, CPTableView, CPOutlineView, CPTextField, CPButton, CPBrowser, CPScroller, CPComboBox, CPDatePicker, CPImageView, CPLevelIndicator, CPSearchField, CPSegmentedControl, CPSlider, CPColorWell, CPStepper, and CPPopUpButton.
Provided by category CPControl(CPCoding).
Definition at line 1034 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 188 of file CPControl.j.
|
implementation |
Returns the receiver's int value.
Definition at line 602 of file CPControl.j.
|
implementation |
Returns the receiver's int value.
Definition at line 585 of file CPControl.j.
|
implementation |
Returns whether the control can continuously send its action messages.
Reimplemented in CPSlider.
Definition at line 347 of file CPControl.j.
|
implementation |
Returns YES if the receiver is enabled, otherwise NO.
Definition at line 976 of file CPControl.j.
|
implementation |
Returns YES if the control is highlighted, otherwise NO.
Definition at line 1007 of file CPControl.j.
|
implementation |
Returns the line break mode of the control.
Definition at line 837 of file CPControl.j.
|
implementation |
Notifies the receiver that the user has clicked the mouse down in its area.
anEvent | contains information about the click |
Reimplemented from CPView.
Reimplemented in CPTextField, CPButton, CPTokenField, CPScroller, CPImageView, CPLevelIndicator, CPSearchField, CPSegmentedControl, and CPPopUpButton.
Definition at line 502 of file CPControl.j.
|
implementation |
Returns the mask of modifier keys held down when the user clicked.
Definition at line 469 of file CPControl.j.
|
implementation |
Reimplemented from CPResponder.
Reimplemented in CPScroller.
Definition at line 510 of file CPControl.j.
|
implementation |
Notifies the receiver that the mouse exited the receiver's area.
anEvent | contains information about the exit |
Reimplemented from CPResponder.
Reimplemented in CPScroller.
Definition at line 518 of file CPControl.j.
|
implementation |
Reimplemented in CPRadio, and CPButton.
Definition at line 425 of file CPControl.j.
|
implementation |
Returns the receiver's object value.
Reimplemented in CPTextField, CPTokenField, CPDatePicker, and CPPopUpButton.
Definition at line 532 of file CPControl.j.
|
implementation |
Perform a click on the receiver.
sender | - The sender object |
Reimplemented in CPButton.
Definition at line 435 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 325 of file CPControl.j.
|
implementation |
Definition at line 335 of file CPControl.j.
|
implementation |
Synthesized accessor method.
Provided by category CPControl(CPSynthesizedAccessors).
Definition at line 1176 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 288 of file CPControl.j.
|
implementation |
Sets the text alignment of the control.
CPLeftTextAlignment CPCenterTextAlignment CPRightTextAlignment CPJustifiedTextAlignment CPNaturalTextAlignment
Reimplemented in CPComboBox.
Definition at line 782 of file CPControl.j.
|
implementation |
Sets whether the cell can continuously send its action messages.
Reimplemented in CPSlider.
Definition at line 356 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 217 of file CPControl.j.
|
implementation |
Sets the receiver's double value.
Reimplemented in CPStepper.
Definition at line 577 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 965 of file CPControl.j.
|
implementation |
Sets the receiver's float value.
Definition at line 560 of file CPControl.j.
|
implementation |
Sets the font of the control.
Reimplemented in CPComboBox, and CPSegmentedControl.
Definition at line 897 of file CPControl.j.
|
implementation |
Synthesized accessor method.
Provided by category CPControl(CPSynthesizedAccessors).
Definition at line 1168 of file CPControl.j.
|
implementation |
Highlights the receiver.
BOOL | - YES if the receiver should be highlighted, otherwise NO. |
Definition at line 996 of file CPControl.j.
|
implementation |
Sets the image position of the control.
CPNoImage CPImageOnly CPImageLeft CPImageRight CPImageBelow CPImageAbove CPImageOverlaps
Definition at line 923 of file CPControl.j.
|
implementation |
Sets the image scaling of the control.
CPImageScaleProportionallyDown CPImageScaleAxesIndependently CPImageScaleNone CPImageScaleProportionallyUpOrDown
Reimplemented in CPImageView.
Definition at line 946 of file CPControl.j.
|
implementation |
Sets the receiver's int value.
Definition at line 611 of file CPControl.j.
|
implementation |
Sets the receiver's int value.
Definition at line 594 of file CPControl.j.
|
implementation |
Sets the line break mode of the receiver.
CPLineBreakByWordWrapping CPLineBreakByCharWrapping CPLineBreakByClipping CPLineBreakByTruncatingHead CPLineBreakByTruncatingTail CPLineBreakByTruncatingMiddle
Definition at line 829 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 540 of file CPControl.j.
|
implementation |
Synthesized accessor method.
Provided by category CPControl(CPSynthesizedAccessors).
Definition at line 1184 of file CPControl.j.
|
implementation |
Reimplemented in CPDisclosureButton, and CPButton.
Definition at line 421 of file CPControl.j.
|
implementation |
Sets the receiver's string value.
Definition at line 635 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 306 of file CPControl.j.
|
implementation |
Sets the text color of the receiver.
aColor | - A CPColor object. |
Reimplemented in CPTextField.
Definition at line 847 of file CPControl.j.
|
implementation |
Sets the shadow color of the text for the receiver.
Definition at line 863 of file CPControl.j.
|
implementation |
Sets the shadow offset for the text.
offset | - a CGSize with the x and y offsets. |
Definition at line 881 of file CPControl.j.
|
implementation |
Set the vertical text alignment of the control.
CPTopVerticalTextAlignment CPCenterVerticalTextAlignment CPBottomVerticalTextAlignment
Definition at line 804 of file CPControl.j.
|
implementation |
Reimplemented in CPRadio, CPTableView, CPButton, CPSlider, and CPCheckBox.
Definition at line 474 of file CPControl.j.
|
implementation |
Reimplemented in CPTableView, CPButton, CPSlider, and CPColorWell.
Definition at line 486 of file CPControl.j.
|
implementation |
Returns the receiver's string value.
Reimplemented in CPTokenField.
Definition at line 619 of file CPControl.j.
|
implementation |
Definition at line 663 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 |
Definition at line 694 of file CPControl.j.
|
implementation |
Returns the receiver's target. The target receives action messages from the receiver.
Definition at line 314 of file CPControl.j.
|
implementation |
Returns the text color of the receiver.
Definition at line 855 of file CPControl.j.
|
implementation |
Reimplemented in CPTextField.
Definition at line 700 of file CPControl.j.
|
implementation |
Reimplemented in CPTextField, CPTokenField, and CPComboBox.
Definition at line 709 of file CPControl.j.
|
implementation |
Reimplemented in CPTextField.
Definition at line 718 of file CPControl.j.
|
implementation |
Returns the shadow color of the text for the control.
Definition at line 871 of file CPControl.j.
|
implementation |
Returns the text shadow offset of the receiver.
Definition at line 889 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 124 of file CPControl.j.
|
implementation |
Reimplemented in CPTableView, and CPBrowser.
Definition at line 373 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 368 of file CPControl.j.
|
implementation |
Fired when the button timer finished, usually after the user hits enter.
Definition at line 461 of file CPControl.j.
|
implementation |
Returns the vertical text alignment of the receiver.
Definition at line 812 of file CPControl.j.