# NSControl

scottc@net-community.com
richard@brainstorm.co.uk

The abstract control class

1996 Free Software Foundation, Inc.
Software documentation for the NSControl class
AppKit/NSControl.h

TODO Description

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
cellClass

Returns the cell Class used by NSControl. Used by subclasses.

See Also: +setCellClass:

setCellClass:
factoryId

Sets the cell Class used by NSControl to factoryId. Used by subclasses.

See Also: +setCellClass:

abortEditing

Sends an [NSCell -endEditing:] message to the current object used to edit the NSControl. Returns `NO` if the the currentEditor does not exists, `YES` otherwise.

action

Returns the NSControl's cell action method.

See Also: -setAction: [NSCell -action]

alignment

Returns the alignment of the text in the NSControl's cell. Returns NSNaturalTextAlignment if the cell does not exists. See NSTextAlignment for more informations.

See Also: -setAlignment: [NSCell -alignment]

attributedStringValue
Description forthcoming.
calcSize

Recalculates the internal size by sending [NSCell -calcDrawInfo:] to the cell.

cell

Returns the NSControl's cell.

See Also: -setCell:

currentEditor

Returns the NSText object used when editing the NSControl.

doubleValue

Returns the value of the NSControl's selected cell as double.

See Also: -setDoubleValue: [NSCell -doubleValue] -intValue -floatValue -doubleValue -stringValue

drawCell:
aCell

Redraws a aCell if it is the NSControl's cell.

See Also: -setCell: [NSCell -drawWithFrame:inView:]

drawCellInside:
aCell

Redraws a aCell 's inside if it is the NSControl's cell.

See Also: -setCell: [NSCell -drawInteriorWithFrame:inView:]

floatValue

Returns the value of the NSControl's selected cell as float.

See Also: -setFloatValue: [NSCell -floatValue] -intValue -stringValue -doubleValue

font

Returns the font of the text in the NSControl's cell. Returns `nil` if the cell does not exists.

See Also: -setFont: [NSCell -font]

formatter
Description forthcoming.
ignoresMultiClick

Returns wheter multiple clicks are ignored.

See Also: -setIgnoresMultiClick: -mouseDown:

intValue

Returns the value of the NSControl's selected cell as int.

See Also: -setIntValue: [NSCell -intValue] -floatValue -doubleValue -stringValue

isContinuous

Returns whether the NSControl's cell can continuously sends its action message.

See Also: -setContinuous: [NSCell -isContinuous]

isEnabled

Returns whether the selected cell of the NSControl is enabled.

See Also: -setEnabled: [NSCell -isEnabled]

mouseDown:
theEvent

This method is invoked when the user click into the NSControl.

*
objectValue
Description forthcoming.
performClick:
sender
Simulates a single mouse click on the control. This method calls the cell's method performClickWithFrame:inView:. Take note that sender is not used.
refusesFirstResponder
Description forthcoming.
selectCell:
aCell

Sets the aCell's state to NSOnState and marks self for display if it is the NSControl's cell.

selectedCell

Returns the NSControl's selected cell.

selectedTag

Returns the tag of the NSControl's selected cell (if exists). -1 otherwise.

See Also: [NSCell -tag]

sendAction:
theAction
to:
theTarget

Asks the NSApplication to send an action theAction with theTarget as target to NSControl. Returns `NO` if theAction is `nil` or if NSApplication can not send the action.

See Also: [NSApplication -sendAction:to:from:]

sendActionOn:
mask
Description forthcoming.
setAction:
aSelector

Sets the NSControl's cell action method.

See Also: -action [NSCell -setAction:]

setAlignment:
mode

Sets the alignment of the text in the NSControl's cell to mode. This method abort the editing and marks self for display if the cell is an NSActionCell. See NSTextAlignment for more informations.

See Also: -alignment [NSCell -setAlignment:] -abortEditing

setAttributedStringValue:
attribStr
Description forthcoming.
setCell:
aCell

Sets the NSControl's cell to aCell, Raises an NSInvalidArgumentException exception if aCell is not `nil` and if it is not a cell class.

See Also: -cell

setContinuous:
flag

Sets whether the NSControl's cell can continuously sends its action message.

See Also: -isContinuous [NSCell -setContinuous:]

setDoubleValue:
aDouble

Sets the value of the NSControl's selected cell to double. If the selected cell is an action cell, it marks self for display.

See Also: -doubleValue [NSCell -setDoubleValue:] -setIntValue: -setStringValue: -setFloatValue:

setEnabled:
flag

Sets whether the NSControl's selected cell is enabled. If flag is `NO`, this method abort the editing. This method marks self for display.

See Also: -isEnabled [NSCell -setEnabled:]

setFloatValue:
aFloat

Sets the value of the NSControl's selected cell to float. If the selected cell is an action cell, it marks self for display.

See Also: -floatValue [NSCell -setFloatValue:] -setIntValue: -setStringValue: -setDoubleValue:

setFloatingPointFormat:
autoRange
left:
leftDigits
right:
rightDigits
Description forthcoming.
setFont:
fontObject

Sets the font of the text in the NSControl's cell and the editor object (if exists) to fontObject.

See Also: -font [NSCell -setFont:] -currentEditor

setFormatter:
newFormatter
Description forthcoming.
setIgnoresMultiClick:
flag

Sets wheter multiple clicks are ignored.

See Also: -ignoresMultiClick -mouseDown:

setIntValue:
anInt

Sets the value of the NSControl's selected cell to int. If the selected cell is an action cell, it marks self for display.

See Also: -intValue [NSCell -setIntValue:] -setDoubleValue: -setFloatValue: -setStringValue:

setNeedsDisplay

Marks self for display.

setObjectValue:
anObject
Description forthcoming.
setRefusesFirstResponder:
flag
Description forthcoming.
setStringValue:
aString

Sets the value of the NSControl's selected cell to NSString. If the selected cell is an action cell, it marks self for display.

See Also: -stringValue [NSCell -setStringValue:] -setIntValue: -setFloatValue: -setDoubleValue:

setTag:
anInt
Assigning a Tag
setTarget:
anObject

Sets the target object of the NSControl's cell to anObject.

See Also: -target [NSCell -setTarget:]

sizeToFit

Resizes the NSControl to fits the NSControl's cell size.

See Also: [NSCell -cellSize]

stringValue

Returns the value of the NSControl's selected cell as NSString.

See Also: -setStringValue: [NSCell -stringValue] -intValue -floatValue -doubleValue -stringValue

tag

Returns the NSControl tag

See Also: -setTag:

takeDoubleValueFrom:
sender

Sets the NSControl's selected cell to the sender's double value.

See Also: [NSCell -takeDoubleValueFrom:] -takeFloatValueFrom: takeIntValueFrom: takeStringValueFrom:

takeFloatValueFrom:
sender

Sets the NSControl's selected cell to the sender's float value.

See Also: [NSCell -takeDoubleValueFrom:] -takeDoubleValueFrom: -takeIntValueFrom: -takeStringValueFrom:

takeIntValueFrom:
sender

Sets the NSControl's selected cell to the sender's float int.

See Also: [NSCell -takeDoubleValueFrom:] -takeDoubleValueFrom: -takeFloatValueFrom: -takeStringValueFrom:

takeObjectValueFrom:
sender
Description forthcoming.
takeStringValueFrom:
sender

Sets the NSControl's selected cell to the sender's float int.

See Also: [NSCell -takeDoubleValueFrom:] -takeDoubleValueFrom: -takeFloatValueFrom: -takeIntValueFrom:

target

Returns the target object of the NSControl's cell.

See Also: -setTarget: [NSCell -target]

updateCell:
aCell

Marks self for display.

updateCellInside:
aCell

Marks self for display.

validateEditing
Description forthcoming.
Software documentation for the NSObject(NSControlDelegate) informal protocol
AppKit/NSControl.h
Description forthcoming.
control:
control
didFailToFormatString:
string
errorDescription:
error
Description forthcoming.
control:
control
didFailToValidatePartialString:
string
errorDescription:
error
Description forthcoming.
control:
control
isValidObject:
object
Description forthcoming.
control:
control
textShouldBeginEditing:
fieldEditor
Description forthcoming.
control:
control
textShouldEndEditing:
fieldEditor
Description forthcoming.
control:
control
textView:
textView
completions:
words
forPartialWordRange:
charRange
indexOfSelectedItem:
index
Description forthcoming.
control:
control
textView:
textView
doCommandBySelector:
command
Description forthcoming.
controlTextDidBeginEditing:
aNotification
Description forthcoming.
controlTextDidChange:
aNotification
Description forthcoming.
controlTextDidEndEditing:
aNotification
Description forthcoming.