#import <CPTextField.h>
Class Methods | |
(CPString) | + defaultThemeClass |
(CPTextField) | + labelWithTitle: |
(CPTextField) | + labelWithTitle:theme: |
(CPTextField) | + roundedTextFieldWithStringValue:placeholder:width: |
(CPTextField) | + roundedTextFieldWithStringValue:placeholder:width:theme: |
(CPTextField) | + textFieldWithStringValue:placeholder:width: |
(CPTextField) | + textFieldWithStringValue:placeholder:width:theme: |
(CPDictionary) | + themeAttributes |
Class Methods inherited from CPControl | |
(void) | + initialize |
Class Methods inherited from CPView | |
(Class) | + animatorClass |
(CAAnimation) | + defaultAnimationForKey: |
(CPMenu) | + defaultMenu |
(BOOL) | + isHighDPIDrawingEnabled |
(CPSet) | + keyPathsForValuesAffectingBounds |
(CPSet) | + keyPathsForValuesAffectingFrame |
(void) | + setHighDPIDrawingEnabled: |
This control displays editable text in a Cappuccino application.
Definition at line 2 of file CPTextField.h.
|
implementation |
Only text fields that can become first responder accept first mouse.
Reimplemented from CPControl.
Definition at line 980 of file CPTextField.j.
|
implementation |
Definition at line 590 of file CPTextField.j.
|
implementation |
Reimplemented from CPView.
Reimplemented in CPTokenField.
Definition at line 596 of file CPTextField.j.
|
implementation |
Definition at line 1815 of file CPTextField.j.
|
implementation |
Returns the textfield's bezel style.
Definition at line 497 of file CPTextField.j.
|
implementation |
Reimplemented in CPSearchField.
Definition at line 1808 of file CPTextField.j.
|
implementation |
Definition at line 1509 of file CPTextField.j.
Reimplemented from CPView.
Reimplemented in CPComboBox.
Definition at line 1833 of file CPTextField.j.
|
implementation |
Reimplemented in CPSearchField.
Provided by category CPTextField(CPTrackingArea).
Definition at line 2210 of file CPTextField.j.
|
implementation |
Definition at line 1544 of file CPTextField.j.
|
implementation |
Reimplemented from CPView.
Reimplemented in CPTokenField, CPComboBox, and CPSearchField.
Definition at line 215 of file CPTextField.j.
|
implementation |
Reimplemented in CPComboBox.
Definition at line 1803 of file CPTextField.j.
|
implementation |
Definition at line 1719 of file CPTextField.j.
|
implementation |
Reimplemented in CPTokenField.
Definition at line 1699 of file CPTextField.j.
|
implementation |
Reimplemented in CPTokenField.
Definition at line 1733 of file CPTextField.j.
|
implementation |
Invoke the action specified by aSelector on the current responder.
This is implemented by CPResponder and by default it passes any unrecognized actions on to the next responder but text fields apparently aren't supposed to do that according to this documentation by Apple:
Definition at line 1114 of file CPTextField.j.
|
implementation |
Returns YES
if the textfield draws a background.
Definition at line 543 of file CPTextField.j.
|
implementation |
Encodes the data of this textfield into the provided coder.
aCoder | the coder into which the data will be written |
Reimplemented from CPControl.
Reimplemented in CPTokenField, CPSearchField, and CPComboBox.
Provided by category CPTextField(CPCoding).
Definition at line 2090 of file CPTextField.j.
|
implementation |
Initializes the textfield with data from a coder.
aCoder | the coder from which to read the textfield data |
Reimplemented from CPControl.
Reimplemented in CPTokenField, CPSearchField, and CPComboBox.
Provided by category CPTextField(CPCoding).
Definition at line 2060 of file CPTextField.j.
|
implementation |
Initializes the receiver for usage with the specified bounding rectangle
Reimplemented from CPControl.
Reimplemented in CPTokenField, CPComboBox, and CPSearchField.
Definition at line 350 of file CPTextField.j.
|
implementation |
Reimplemented in CPTokenField.
Definition at line 1120 of file CPTextField.j.
|
implementation |
Definition at line 1157 of file CPTextField.j.
|
implementation |
Definition at line 1162 of file CPTextField.j.
|
implementation |
Returns YES
if the textfield draws a bezeled border.
Definition at line 475 of file CPTextField.j.
|
implementation |
Returns YES
if the textfield has a border.
Definition at line 520 of file CPTextField.j.
|
implementation |
Returns YES
if the textfield is currently editable by the user.
Definition at line 403 of file CPTextField.j.
|
implementation |
Returns YES
if the field's text is secure (password entry).
Reimplemented in CPSecureTextField.
Definition at line 454 of file CPTextField.j.
|
implementation |
Returns YES
if the field's text is selectable by the user.
Definition at line 437 of file CPTextField.j.
|
implementation |
Reimplemented in CPTokenField.
Definition at line 1085 of file CPTextField.j.
|
implementation |
Reimplemented in CPTokenField.
Definition at line 1067 of file CPTextField.j.
|
implementation |
Definition at line 200 of file CPTextField.j.
|
implementation |
Definition at line 205 of file CPTextField.j.
|
implementation |
Reimplemented from CPView.
Reimplemented in CPTokenField, and CPComboBox.
Definition at line 1855 of file CPTextField.j.
|
implementation |
Reimplemented from CPControl.
Reimplemented in CPTokenField, and CPSearchField.
Definition at line 996 of file CPTextField.j.
|
implementation |
Definition at line 1059 of file CPTextField.j.
|
implementation |
Reimplemented in CPTokenField.
Definition at line 1024 of file CPTextField.j.
|
implementation |
Text fields require panels to become key window, so this returns YES
if the text field is ready to become the first responder as well.
Reimplemented from CPView.
Definition at line 972 of file CPTextField.j.
|
implementation |
Returns the string in the text field.
Reimplemented from CPControl.
Reimplemented in CPTokenField.
Definition at line 1258 of file CPTextField.j.
|
implementation |
Reimplemented in CPComboBox.
Definition at line 1569 of file CPTextField.j.
|
implementation |
Returns the receiver's placeholder string
Definition at line 1384 of file CPTextField.j.
|
implementation |
Reimplemented from CPView.
Reimplemented in CPComboBox.
Definition at line 1822 of file CPTextField.j.
|
implementation |
Reimplemented from CPView.
Reimplemented in CPTokenField, CPComboBox, and CPSearchField.
Definition at line 792 of file CPTextField.j.
|
implementation |
Reimplemented from CPView.
Definition at line 1051 of file CPTextField.j.
|
implementation |
Definition at line 178 of file CPTextField.j.
|
implementation |
Definition at line 183 of file CPTextField.j.
|
implementation |
Definition at line 1694 of file CPTextField.j.
|
implementation |
Definition at line 1602 of file CPTextField.j.
|
implementation |
Make the receiver the first responder and select all the text in the field.
Definition at line 1468 of file CPTextField.j.
|
implementation |
Sets whether the textfield will have a bezeled border.
shouldBeBezeled | YES means the textfield will draw a bezeled border |
Definition at line 464 of file CPTextField.j.
|
implementation |
Sets the textfield's bezel style.
aBezelStyle | the constant for the desired bezel style |
Definition at line 484 of file CPTextField.j.
|
implementation |
Sets whether the textfield will have a border drawn.
shouldBeBordered | YES makes the textfield draw a border |
Definition at line 509 of file CPTextField.j.
|
implementation |
Sets the control's size.
aControlSize | the control's size |
Reimplemented from CPControl.
Definition at line 233 of file CPTextField.j.
|
implementation |
Definition at line 1776 of file CPTextField.j.
|
implementation |
Sets whether the textfield will have a background drawn.
shouldDrawBackground | YES makes the textfield draw a background |
Definition at line 529 of file CPTextField.j.
|
implementation |
Sets whether or not the receiver text field can be edited. If NO, any ongoing edit is ended.
Reimplemented in CPTokenField.
Definition at line 373 of file CPTextField.j.
|
implementation |
Sets whether the field reacts to events. If NO, any ongoing edit is ended.
Reimplemented from CPControl.
Reimplemented in CPTokenField.
Definition at line 412 of file CPTextField.j.
|
implementation |
Sets the receiver's object value.
Reimplemented from CPControl.
Reimplemented in CPTokenField, and CPComboBox.
Definition at line 1310 of file CPTextField.j.
|
implementation |
Sets a placeholder string for the receiver. The placeholder is displayed until editing begins, and after editing ends, if the text field has an empty string value
Definition at line 1366 of file CPTextField.j.
|
implementation |
Sets whether the field's text is secure.
aFlag | YES makes the text secure |
Definition at line 446 of file CPTextField.j.
|
implementation |
Sets whether the field's text is selectable by the user.
aFlag | YES makes the text selectable |
Definition at line 427 of file CPTextField.j.
|
implementation |
Definition at line 1642 of file CPTextField.j.
|
implementation |
Sets the text color of the receiver.
aColor | - A CPColor object. |
Reimplemented from CPControl.
Definition at line 1922 of file CPTextField.j.
|
implementation |
Sets the background color, which is shown for non-bezeled text fields with drawsBackground set to YES
aColor | The background color |
Definition at line 552 of file CPTextField.j.
|
implementation |
Reimplemented from CPView.
Provided by category CPTextField(TableDataView).
Definition at line 2226 of file CPTextField.j.
|
implementation |
For non-bezeled text fields (typically a label), sizeToFit has two behaviors, depending on the line break mode of the receiver.
For non-bezeled receivers with a non-wrapping line break mode, sizeToFit will change the frame of the receiver to perfectly fit the current text in stringValue in the current font, respecting the current theme value for content-inset. For receivers with a wrapping line break mode, sizeToFit will wrap the text within the current width (respecting the current content-inset), so it will ONLY change the HEIGHT.
For bezeled text fields (typically editable fields), sizeToFit will ONLY change the HEIGHT of the text field. It will not change the width of the text field. sizeToFit will attempt to change the height to fit a single line of text, respecting the current theme values for min-size, max-size and content-inset.
The logic behind this decision is that most of the time you do not know what content will be placed in a bezeled text field, so you want to just choose a fixed width and leave it at that size. However, since you don't know how tall it needs to be if you change the font, sizeToFit will still be useful for making the textfield an appropriate height.
Definition at line 1409 of file CPTextField.j.
|
implementation |
Definition at line 1899 of file CPTextField.j.
|
implementation |
Reimplemented from CPControl.
Definition at line 1231 of file CPTextField.j.
|
implementation |
Definition at line 1194 of file CPTextField.j.
|
implementation |
Reimplemented from CPControl.
Reimplemented in CPTokenField, and CPComboBox.
Definition at line 1218 of file CPTextField.j.
|
implementation |
Reimplemented from CPControl.
Definition at line 1243 of file CPTextField.j.
|
implementation |
Definition at line 1206 of file CPTextField.j.
|
implementation |
Returns the background color.
Definition at line 566 of file CPTextField.j.
|
implementation |
Definition at line 157 of file CPTextField.j.
|
implementation |
Definition at line 162 of file CPTextField.j.
|
implementation |
Reimplemented from CPControl.
Reimplemented in CPTokenField, CPComboBox, and CPSearchField.
Definition at line 220 of file CPTextField.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 CPControl.
Reimplemented in CPSearchField.
Provided by category CPTextField(CPTrackingArea).
Definition at line 2186 of file CPTextField.j.
|
implementation |
Definition at line 1947 of file CPTextField.j.
|
implementation |
Called when the return value of isHiddenOrHasHiddenAncestor becomes YES, e.g. when this view becomes hidden due to a setHidden:YES message to itself or to one of its superviews.
Note: in the current implementation, viewDidHide may be called multiple times if additional superviews are hidden, even if isHiddenOrHasHiddenAncestor was already YES.
Reimplemented from CPView.
Definition at line 1931 of file CPTextField.j.
|
implementation |
Called when the return value of isHiddenOrHasHiddenAncestor becomes NO, e.g. when this view stops being hidden due to a setHidden:NO message to itself or to one of its superviews.
Note: in the current implementation, viewDidUnhide may be called multiple times if additional superviews are unhidden, even if isHiddenOrHasHiddenAncestor was already NO.
Reimplemented from CPView.
Definition at line 1939 of file CPTextField.j.