CPTextField Class Reference
[AppKit]

List of all members.

Public Member Functions

(BOOL) - acceptsFirstResponder [implementation]
(BOOL) - becomeFirstResponder [implementation]
(CGRect) - bezelRectForBounds: [implementation]
(CPTextFieldBezelStyle) - bezelStyle [implementation]
(CGRect) - contentRectForBounds: [implementation]
(void) - copy: [implementation]
(CPView- createEphemeralSubviewNamed: [implementation]
(void) - cut: [implementation]
(id) - delegate [implementation]
(void) - deleteBackward: [implementation]
(BOOL) - drawsBackground [implementation]
(void) - encodeWithCoder: [implementation]
(id) - initWithCoder: [implementation]
(id) - initWithFrame: [implementation]
(BOOL) - isBezeled [implementation]
(BOOL) - isBordered [implementation]
(BOOL) - isEditable [implementation]
(BOOL) - isSecure [implementation]
(BOOL) - isSelectable [implementation]
(void) - keyDown: [implementation]
(void) - keyUp: [implementation]
(void) - layoutSubviews [implementation]
(void) - mouseDown: [implementation]
(void) - mouseDragged: [implementation]
(void) - mouseUp: [implementation]
(BOOL) - needsPanelToBecomeKey [implementation]
(id) - objectValue [implementation]
(void) - paste: [implementation]
(CPString- placeholderString [implementation]
(CGRect) - rectForEphemeralSubviewNamed: [implementation]
(BOOL) - resignFirstResponder [implementation]
(void) - selectAll: [implementation]
(CPRange) - selectedRange [implementation]
(void) - selectText: [implementation]
(void) - setBezeled: [implementation]
(void) - setBezelStyle: [implementation]
(void) - setBordered: [implementation]
(void) - setDelegate: [implementation]
(void) - setDrawsBackground: [implementation]
(void) - setEditable: [implementation]
(void) - setObjectValue: [implementation]
(void) - setPlaceholderString: [implementation]
(void) - setSecure: [implementation]
(void) - setSelectable: [implementation]
(void) - setSelectedRange: [implementation]
(void) - setTextFieldBackgroundColor: [implementation]
(void) - sizeToFit [implementation]
(void) - textDidBlur: [implementation]
(void) - textDidFocus: [implementation]
(CPColor- textFieldBackgroundColor [implementation]

Static Public Member Functions

(CPTextField+ labelWithTitle: [implementation]
(CPTextField+ labelWithTitle:theme: [implementation]
(CPTextField+ roundedTextFieldWithStringValue:placeholder:width: [implementation]
(CPTextField+ roundedTextFieldWithStringValue:placeholder:width:theme: [implementation]
(CPTextField+ textFieldWithStringValue:placeholder:width: [implementation]
(CPTextField+ textFieldWithStringValue:placeholder:width:theme: [implementation]
(id) + themeAttributes [implementation]
(CPString+ themeClass [implementation]

Detailed Description

This control displays editable text in a Cappuccino application.

Definition at line 76 of file CPTextField.j.


Member Function Documentation

- (BOOL) acceptsFirstResponder   [implementation]

Definition at line 434 of file CPTextField.j.

- (BOOL) becomeFirstResponder   [implementation]

Definition at line 440 of file CPTextField.j.

- (CGRect) bezelRectForBounds: (CFRect)  bounds   [implementation]

Definition at line 1000 of file CPTextField.j.

- (CPTextFieldBezelStyle) bezelStyle   [implementation]

Returns the textfield's bezel style.

Definition at line 359 of file CPTextField.j.

- (CGRect) contentRectForBounds: (CGRect)  bounds   [implementation]

Definition at line 985 of file CPTextField.j.

- (void) copy: (id)  sender   [implementation]

Definition at line 793 of file CPTextField.j.

- (CPView) createEphemeralSubviewNamed: (CPString aName   [implementation]

Definition at line 1026 of file CPTextField.j.

- (void) cut: (id)  sender   [implementation]

Definition at line 811 of file CPTextField.j.

- (id) delegate   [implementation]

Definition at line 980 of file CPTextField.j.

- (void) deleteBackward: (id)  sender   [implementation]

Definition at line 915 of file CPTextField.j.

- (BOOL) drawsBackground   [implementation]

Returns YES if the textfield draws a background.

Definition at line 405 of file CPTextField.j.

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

Encodes the data of this textfield into the provided coder.

Parameters:
aCoder the coder into which the data will be written

Definition at line 1142 of file CPTextField.j.

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

Initializes the textfield with data from a coder.

Parameters:
aCoder the coder from which to read the textfield data
Returns:
the initialized textfield

Definition at line 1119 of file CPTextField.j.

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

Definition at line 252 of file CPTextField.j.

- (BOOL) isBezeled   [implementation]

Returns YES if the textfield draws a bezeled border.

Definition at line 337 of file CPTextField.j.

- (BOOL) isBordered   [implementation]

Returns YES if the textfield has a border.

Definition at line 382 of file CPTextField.j.

- (BOOL) isEditable   [implementation]

Returns YES if the textfield is currently editable by the user.

Definition at line 282 of file CPTextField.j.

- (BOOL) isSecure   [implementation]

Returns YES if the field's text is secure (password entry).

Definition at line 316 of file CPTextField.j.

- (BOOL) isSelectable   [implementation]

Returns YES if the field's text is selectable by the user.

Definition at line 299 of file CPTextField.j.

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

Definition at line 612 of file CPTextField.j.

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

Definition at line 593 of file CPTextField.j.

+ (CPTextField) labelWithTitle: (CPString aTitle   [implementation]

Definition at line 143 of file CPTextField.j.

+ (CPTextField) labelWithTitle: (CPString aTitle
theme: (CPTheme aTheme 
[implementation]

Definition at line 148 of file CPTextField.j.

- (void) layoutSubviews   [implementation]

Definition at line 1049 of file CPTextField.j.

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

Definition at line 572 of file CPTextField.j.

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

Definition at line 587 of file CPTextField.j.

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

Definition at line 581 of file CPTextField.j.

- (BOOL) needsPanelToBecomeKey   [implementation]

Text fields require panels to become key window, so this returns YES.

Definition at line 567 of file CPTextField.j.

- (id) objectValue   [implementation]

Returns the string the text field.

Definition at line 667 of file CPTextField.j.

- (void) paste: (id)  sender   [implementation]

Definition at line 820 of file CPTextField.j.

- (CPString) placeholderString   [implementation]

Returns the receiver's placeholder string

Definition at line 728 of file CPTextField.j.

- (CGRect) rectForEphemeralSubviewNamed: (CPString aName   [implementation]

Definition at line 1015 of file CPTextField.j.

- (BOOL) resignFirstResponder   [implementation]

Definition at line 510 of file CPTextField.j.

+ (CPTextField) roundedTextFieldWithStringValue: (CPString aStringValue
placeholder: (CPString aPlaceholder
width: (float)  aWidth 
[implementation]

Definition at line 121 of file CPTextField.j.

+ (CPTextField) roundedTextFieldWithStringValue: (CPString aStringValue
placeholder: (CPString aPlaceholder
width: (float)  aWidth
theme: (CPTheme aTheme 
[implementation]

Definition at line 126 of file CPTextField.j.

- (void) selectAll: (id)  sender   [implementation]

Definition at line 910 of file CPTextField.j.

- (CPRange) selectedRange   [implementation]

Definition at line 841 of file CPTextField.j.

- (void) selectText: (id)  sender   [implementation]

Select all the text in the CPTextField.

Definition at line 775 of file CPTextField.j.

- (void) setBezeled: (BOOL)  shouldBeBezeled   [implementation]

Sets whether the textfield will have a bezeled border.

Parameters:
shouldBeBezeled YES means the textfield will draw a bezeled border

Definition at line 326 of file CPTextField.j.

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

Sets the textfield's bezel style.

Parameters:
aBezelStyle the constant for the desired bezel style

Definition at line 346 of file CPTextField.j.

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

Sets whether the textfield will have a border drawn.

Parameters:
shouldBeBordered YES makes the textfield draw a border

Definition at line 371 of file CPTextField.j.

- (void) setDelegate: (id)  aDelegate   [implementation]

Definition at line 927 of file CPTextField.j.

- (void) setDrawsBackground: (BOOL)  shouldDrawBackground   [implementation]

Sets whether the textfield will have a background drawn.

Parameters:
shouldDrawBackground YES makes the textfield draw a background

Definition at line 391 of file CPTextField.j.

- (void) setEditable: (BOOL)  shouldBeEditable   [implementation]

Sets whether or not the receiver text field can be edited

Definition at line 274 of file CPTextField.j.

- (void) setObjectValue: (id)  aValue   [implementation]

Definition at line 683 of file CPTextField.j.

- (void) setPlaceholderString: (CPString aStringValue   [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 710 of file CPTextField.j.

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

Sets whether the field's text is secure.

Parameters:
aFlag YES makes the text secure

Definition at line 308 of file CPTextField.j.

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

Sets whether the field's text is selectable by the user.

Parameters:
aFlag YES makes the text selectable

Definition at line 291 of file CPTextField.j.

- (void) setSelectedRange: (CPRange)  aRange   [implementation]

Definition at line 875 of file CPTextField.j.

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

Sets the background color, which is shown for non-bezeled text fields with drawsBackground set to YES

Parameters:
aColor The background color

Definition at line 414 of file CPTextField.j.

- (void) sizeToFit   [implementation]

Size to fit has two behavior, depending on if the receiver is an editable text field or not.

For non-editable text fields (typically, a label), sizeToFit will change the frame of the receiver to perfectly fit the current text in stringValue in the current font, and respecting the current theme values for content-inset, min-size, and max-size.

For editable text fields, sizeToFit will ONLY change the HEIGHT of the text field. It will not change the width of the text field. You can use setFrameSize: with the current height to set the width, and you can get the size of a string with [CPString sizeWithFont:].

The logic behind this decision is that most of the time you do not know what content will be placed in an editable 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 750 of file CPTextField.j.

- (void) textDidBlur: (CPNotification note   [implementation]

Definition at line 646 of file CPTextField.j.

- (void) textDidFocus: (CPNotification note   [implementation]

Definition at line 655 of file CPTextField.j.

- (CPColor) textFieldBackgroundColor   [implementation]

Returns the background color.

Definition at line 428 of file CPTextField.j.

+ (CPTextField) textFieldWithStringValue: (CPString aStringValue
placeholder: (CPString aPlaceholder
width: (float)  aWidth 
[implementation]

Definition at line 100 of file CPTextField.j.

+ (CPTextField) textFieldWithStringValue: (CPString aStringValue
placeholder: (CPString aPlaceholder
width: (float)  aWidth
theme: (CPTheme aTheme 
[implementation]

Definition at line 105 of file CPTextField.j.

+ (id) themeAttributes   [implementation]

Definition at line 163 of file CPTextField.j.

+ (CPString) themeClass   [implementation]

Definition at line 158 of file CPTextField.j.


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

Generated on Fri Apr 9 11:04:22 2010 for Cappuccino API by  doxygen 1.6.1