• Keine Ergebnisse gefunden

select:in View:editor:delegate:start:length:

Im Dokument NeXTstep Reference (Seite 195-200)

- select:(const NXRect *)aRect in View:controlView editor: textO b j delegate:anObject start: (int)selStart length: (int)selLength

Similar to edit:in View:editor:delegate:event: but you can invoke it in any situation, not only on a mouse-down event. You must specify the beginning and the length of the selection.

sendAction On:

- (int)sendActionOn:(int)mask

Resets flags to determine when the action is sent to the target while tracking. Can be any combination of:

NX_MOUSEUPMASK NX_MOUSEDOWNMASK NX_MOUSEDRAGGEDMASK NX_PERIODICMASK

The default is NX_MOUSEUPMASK. You can use the setContinuous: method to tum on the bit in the NX_PERIODICMASK or the NX_MOUSEDRAGGEDMASK (whichever is appropriate to the given subclass of Cell) in the current mask.

Returns the old mask.

setAction:

- setAction:(SEL)aSelector

Does nothing. Should be overridden by subclasses that implement target and action instance variables (ActionCell and its subclasses). Returns self.

Application Kit Classes: Cell 2-155

setAlignment:

- setAlignment:(int)mode

Sets the alignment of text in the Cell and returns self. mode should be one of three constants: NX_LEFTALIGNED, NX_CENTERED, or NX_RIGHTALIGNED.

setBezeled:

- setBezeled:(BOOL)jlag

Ifjlag is YES, then the Cell is surrounded by a bezel, otherwise it's not. setBordered:

and setBezeled: are mutually exclusive options. Returns self.

setBordered:

- setBordered:(BOOL)jlag

Ifjlag is YES, then the Cell is surrounded by a I-pixel black frame, otherwise it's not.

setBordered: and setBezeled: are mutually exclusive options. Returns self.

setContinuous:

- setContinuous:(BOOL)flag

Sets whether a Cell continuously sends its action message to the target object when tracking. Normally, this method will simply add NX_PERIODICMASK or

NX_MOUSEDRAGGEDMASK to the mask set with sendActionOn:, depending on which setting is appropriate to the subclass implementing it. In the base Cell class, this method adds NX_PERIODICMASK to the mask. These settings usually have meaning only for ActionCell and its subclasses which implement instance variables for the target object and action method. However, some Control subclasses will send a default action to a default target when the Cell itself doesn't define target and action instance variables.

See also: - sendActionOn:

setDouble Value:

- setDouble Value: (double )aDouble

Sets the receiver to represent aDouble, by replacing the contents with the character string representing aDouble. Does nothing if the cell type is not NX_TEXTCELL.

Returns self.

2-156 Chapter 2: Class Specifications

setEditable:

- setEditable:(BOOL)jlag

Sets the editable state of the Cell. Ifjlag is YES, then the text is also set to be selectable.

Ifjlag is NO, then the text is set not selectable. Returns self.

See also: - edit:in View:editor:delegate:event:

setEnabled:

- setEnabled:(BOOL)jlag

Sets the enabled state of the Cell. Returns self.

setEntryType:

- setEntryType:(int)aType

This method sets the type of data allowed in the Cell. aType is one of these four constants:

NX_ANYTYPE NX_(POS)INTTYPE NX_(POS)FLOATTYPE NX_(POS)DOUBLETYPE

If the Cell is not of type NX_TEXTCELL, it's automatically converted, in which case its support instance variable is set to the default font (Helvetica 12.0), and its string value is set to "Cell" (the default).

The entry type is checked by the isEntry Acceptable: method. That method is used by Controls that contain editable text (such as Matrix and TextField) to validate that what the user has typed is correct. If you want to have a custom Cell accept some specific type of data (other than those listed above), you can override the isEntry Acceptable:

method to check for the validity of the data the user has entered.

See also: - isEntry Acceptable:, - setFloatingPointFormat:left:right:

Application Kit Classes: Cell 2-157

setFloatingPointFormat:left:right:

- setFloatingPointFormat: (BOOL )autoRange left: (unsigned)leftDigits

right: (unsigned)rightDigits

Sets whether floating-point numbers are autoranged, and sets the size of the fields to the left and right of the decimal point. leftDigits must be between

°

and 10. rightDigits must be between

°

and 14. If leftDigits is 0, then the number is not formatted. If rightDigits is 0, then the fractional part of the floating-point number is truncated (Le., the floating-point number is printed as if it were an integer). Otherwise,leftDigits specifies the number of digits to the left of the decimal point, and rightDigits specifies the number of digits to the right. If autoRange is YES, the number will be fit into a field that's leftDigits + rightDigits + 1 spaces wide and the decimal point will be autoranged to fit that field (the field will also be padded with zeros). To tum off formatting, simply invoke this routine with leftDigits = 0. If the entryType of the Cell is not already NX_FLOATTYPE, NX_POSFLOATTYPE, NX_DOUBLETYPE, or

NX_POSDOUBLETYPE, it's set to NX_FLOATTYPE. Returns self.

setFloatValue:

- setFloatValue:(float)aFloat

Sets cell-specific float value, by replacing its contents by the character string

representing the float. Does nothing if the cell type is not NX_ TEXTCELL. Returns self.

setFont:

- setFont:fontObj

Sets the font to be used when displaying text in the Cell. Does nothing if the Cell is not of type NX_ TEXTCELL. Returns self.

setlcon:

- setlcon:(const char *)iconNarne

Invoke this method to set the icon of the Cell to the icon represented by iconNarne (an icon is a named NXImage-see the NXImage class). If the Cell was not an

NX_ICONCELL, it's automatically converted. Sets the support instance variable to iconNarne, and sets the contents instance variable to the result of sending the name message to that NXImage. If you specify an invalid NXImage name, you will get a default icon (you c~n verify that the NXImage you requested was valid by checking the result of sending the icon message to the Cell to be sure it matches the iconN arne you supplied). Returns self.

See also: - findImageNamed (NXImage), - name (NXImage)

2-158 Chapter 2: Class Specifications

setlntValue:

- setIntValue:(int)anlnt

Sets cell-specific integer value by replacing its contents by the character string

representing an/nt. Does nothing if the cell type is not NX_TEXTCELL. Returns self.

setParameter:to:

- setParameter:(int)aParameter to:(int)value

Sets the most usual flags of a Cell. Calling this method could result in unpredictable results in subclasses. It's much safer to invoke the appropriate set. .• method to set a specific flag. Returns self.

See also: - getParameter:, - highlightInView:lit:, - setEditable:, - setEnabled:, - setState:

setScrollable:

- setScrollable:(BOOL)jlag

Sets whether, while editing, the Cell will scroll to follow typing. Returns self.

See also: - edit:in View:editor:delegate:event:

setSelectable:

- setSelectable:(BOOL )jlag

Ifjlag is YES, then the text is selectable but not editable. If NO, then the text is static (not editable or selectable). Returns self.

See also: - edit:in View:editor:delegate:event:

setState:

- setState:(int)value

Sets the state of the Cell to 0 if value is 0, to 1 otherwise. Returns self.

See also: - incrementState

Application Kit Classes: Cell 2-159

Im Dokument NeXTstep Reference (Seite 195-200)