Up
Authors
- Ovidiu Predescu (
ovidiu@net-community.com
)
-
Matrix class for grouping controls
Copyright: (C) 1996, 1997, 1999 Free Software Foundation, Inc.
- Declared in:
- AppKit/NSMatrix.h
- Conforms to:
- NSCoding
Availability: OpenStep
Instance Variables
Method summary
+ (Class)
cellClass;
Availability: OpenStep
Returns the cell class used to create cells. By
default it is a NSActionCell class
See Also:
+setCellClass:
+ (void)
setCellClass: (Class)classId;
Availability: OpenStep
Sets the cell class used to create cells to
classId. By default it is a NSActionCell
class
See Also:
+setCellClass:
- (BOOL)
acceptsFirstMouse: (
NSEvent*)theEvent;
Availability: OpenStep
- (SEL)
action;
Availability: OpenStep
Description forthcoming.
- (void)
addColumn;
Availability: OpenStep
- (void)
addColumnWithCells: (
NSArray*)cellArray;
Availability: OpenStep
- (void)
addRow;
Availability: OpenStep
- (void)
addRowWithCells: (
NSArray*)cellArray;
Availability: OpenStep
Inserts a new row of cells specified by
cellArray after the current last row.
See Also:
-insertRow:withCells:
- (BOOL)
allowsEmptySelection;
Availability: OpenStep
Returns whether the matrix should permit empty
selections or should force one or mor cells to
be selected at all times.
See Also:
-setAllowsEmptySelection:
- (BOOL)
autosizesCells;
Availability: OpenStep
Returns whether the NSMatrix resizes its cells
automatically
See Also:
-autosizesCells
- (
NSColor*)
backgroundColor;
Availability: OpenStep
- (id)
cellAtRow: (
NSInteger)row
column: (
NSInteger)column;
Availability: OpenStep
Returns the cell at row row
and column column Returns
nil
if the row or
column are out of range
- (
NSColor*)
cellBackgroundColor;
Availability: OpenStep
- (Class)
cellClass;
Availability: OpenStep
- (
NSRect)
cellFrameAtRow: (
NSInteger)row
column: (
NSInteger)column;
Availability: OpenStep
Returns the rectangle of the cell at
row row and column
column
- (
NSSize)
cellSize;
Availability: OpenStep
- (id)
cellWithTag: (
NSInteger)anInt;
Availability: OpenStep
Returns the cell with tag anInt
Returns nil
if no cell has a tag
anInt
- (
NSArray*)
cells;
Availability: OpenStep
Returns an array of the NSMatrix's cells
- (id)
delegate;
Availability: OpenStep
- (void)
deselectAllCells;
Availability: OpenStep
Deselects all NSMatrix's cells. Does nothing if
the NSMatrix's mode is NSRadioModeMatrix and if it
does not allows empty selection. Except for the
case, when there are no cells left at all. Then the
selection is always cleared.
See Also: -mode
-allowsEmptySelection
-setNeedsDisplayInRect:
- (void)
deselectSelectedCell;
Availability: OpenStep
Deselects the selected cell.Does nothing if the
NSMatrix's mode is NSRadioModeMatrix and if it
does not allows empty selection
- (SEL)
doubleAction;
Availability: OpenStep
Returns the action method, used when the user
double clicks
See Also:
-setDoubleAction:
- (BOOL)
drawsBackground;
Availability: OpenStep
- (BOOL)
drawsCellBackground;
Availability: OpenStep
- (SEL)
errorAction;
Availability: OpenStep
- (void)
getNumberOfRows: (
NSInteger*)rowCount
columns: (
NSInteger*)columnCount;
Availability: OpenStep
- (BOOL)
getRow: (
NSInteger*)row
column: (
NSInteger*)column
forPoint: (
NSPoint)aPoint;
Availability: OpenStep
Gets the row and the column of
the NSMatrix correponding to the specified NSPoint
aPoint. Returns YES
if
aPoint is within the NSMatrix,
NO
otherwise
- (BOOL)
getRow: (
NSInteger*)row
column: (
NSInteger*)column
ofCell: (
NSCell*)aCell;
Availability: OpenStep
Gets the row and the column of
the NSMatrix correponding to the specified NSCell
aCell. Returns YES
if
aCell is in the NSMatrix,
NO
otherwise
- (void)
highlightCell: (BOOL)flag
atRow: (
NSInteger)row
column: (
NSInteger)column;
Availability: OpenStep
- (id)
initWithFrame: (
NSRect)frameRect;
Availability: OpenStep
- (id)
initWithFrame: (
NSRect)frameRect
mode: (
NSMatrixMode)aMode
cellClass: (Class)classId
numberOfRows: (
NSInteger)rowsHigh
numberOfColumns: (
NSInteger)colsWide;
Availability: OpenStep
- (void)
insertColumn: (
NSInteger)column;
Availability: OpenStep
- (void)
insertColumn: (
NSInteger)column
withCells: (
NSArray*)cellArray;
Availability: OpenStep
Inserts a new column of cells (
specified by cellArray) at the
specified column column.
This method can grows the matrix as necessay if
needed
See Also:
-insertColumn:
- (void)
insertRow: (
NSInteger)row;
Availability: OpenStep
- (void)
insertRow: (
NSInteger)row
withCells: (
NSArray*)cellArray;
Availability: OpenStep
Inserts a new row of cells (specified
by cellArray) at the specified
row row. This method can
grows the matrix as necessay if needed
See Also:
-insertColumn:
- (
NSSize)
intercellSpacing;
Availability: OpenStep
- (BOOL)
isAutoscroll;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isSelectionByRect;
Availability: OpenStep
Description forthcoming.
- (id)
keyCell;
Availability: OpenStep
Description forthcoming.
- (
NSCell*)
makeCellAtRow: (
NSInteger)row
column: (
NSInteger)column;
Availability: OpenStep
Makes and returns new cell at row
row and column
column.
- (void)
mouseDown: (
NSEvent*)theEvent;
Availability: OpenStep
Description forthcoming.
- (
NSInteger)
mouseDownFlags;
Availability: OpenStep
Description forthcoming.
- (id)
nextText;
Availability: OpenStep
- (
NSInteger)
numberOfColumns;
Availability: OpenStep
Returns the number of columns of the NSMatrix
See Also:
-numberOfRows
- (
NSInteger)
numberOfRows;
Availability: OpenStep
- (BOOL)
performKeyEquivalent: (
NSEvent*)theEvent;
Availability: OpenStep
Simulates a mouse click for the first cell with
the corresponding key Equivalent.
See Also:
[NSCell -keyEquivalent]
- (id)
previousText;
Availability: OpenStep
- (id)
prototype;
Availability: OpenStep
- (void)
putCell: (
NSCell*)newCell
atRow: (
NSInteger)row
column: (
NSInteger)column;
Availability: OpenStep
Replaces the NSMatrix's cell at row
row and column
column by newCell and mark
for display the new cell. Raises a NSRangeException
if the row or column are out of
range.
- (void)
removeColumn: (
NSInteger)column;
Availability: OpenStep
Removes the NSMatrix's column at index
column
See Also:
-removeRow:
- (void)
removeRow: (
NSInteger)row;
Availability: OpenStep
- (void)
renewRows: (
NSInteger)newRows
columns: (
NSInteger)newColumns;
Availability: OpenStep
Description forthcoming.
- (void)
resetCursorRects;
Availability: OpenStep
Description forthcoming.
- (void)
scrollCellToVisibleAtRow: (
NSInteger)row
column: (
NSInteger)column;
Availability: OpenStep
- (void)
selectAll: (id)sender;
Availability: OpenStep
- (void)
selectCellAtRow: (
NSInteger)row
column: (
NSInteger)column;
Availability: OpenStep
- (BOOL)
selectCellWithTag: (
NSInteger)anInt;
Availability: OpenStep
- (void)
selectText: (id)sender;
Availability: OpenStep
Description forthcoming.
- (id)
selectTextAtRow: (
NSInteger)row
column: (
NSInteger)column;
Availability: OpenStep
Select the text of the cell at row
row and column
column. The cell is selected if and only
if the cell is selectable (MacOSX select it if the
cell is editable). This methods returns the selected
cell if exists and selectable, nil
otherwise
- (id)
selectedCell;
Availability: OpenStep
Description forthcoming.
- (
NSArray*)
selectedCells;
Availability: OpenStep
Returns an array of the selected cells
- (
NSInteger)
selectedColumn;
Availability: OpenStep
- (
NSInteger)
selectedRow;
Availability: OpenStep
- (BOOL)
sendAction;
Availability: OpenStep
Sends the cell action, if a NSMatrix's cell is
selected and enabled, sends the NSMatrix action
otherwise. Returns YES
if the
action is succesfully sent. NO
if a
cell is selected but not enabled or if an action can
not be sent.
See Also:
-sendAction:to:
-selectedCell
- (void)
sendAction: (SEL)aSelector
to: (id)anObject
forAllCells: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
sendDoubleAction;
Availability: OpenStep
Description forthcoming.
- (void)
setAction: (SEL)aSelector;
Availability: OpenStep
Sets the message to send when a single click occurs.
- (void)
setAllowsEmptySelection: (BOOL)flag;
Availability: OpenStep
Sets a flag to indicate whether the
matrix should permit empty selections or should
force one or mor cells to be selected at all times.
See Also:
-allowsEmptySelection
- (void)
setAutoscroll: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setAutosizesCells: (BOOL)flag;
Availability: OpenStep
Sets whether the NSMatrix resizes its cells
automatically
See Also:
-autosizesCells
- (void)
setBackgroundColor: (
NSColor*)aColor;
Availability: OpenStep
- (void)
setCellBackgroundColor: (
NSColor*)aColor;
Availability: OpenStep
- (void)
setCellClass: (Class)classId;
Availability: OpenStep
Sets the cell class used by the NSMatrix when it
creates new cells to classId. The
default cell class is a NSActionCell class
See Also:
-cellClass
-setPrototype:
-prototype
- (void)
setCellSize: (
NSSize)aSize;
Availability: OpenStep
Description forthcoming.
- (void)
setDelegate: (id)anObject;
Availability: OpenStep
- (void)
setDoubleAction: (SEL)aSelector;
Availability: OpenStep
Sets the message to send when a
double click occurs. NB: In
GNUstep the following method does *not* set
ignoresMultiClick to NO
as
in the MacOS-X spec. It simply sets the doubleAction,
as in OpenStep spec.
-doubleAction
- (void)
setDrawsBackground: (BOOL)flag;
Availability: OpenStep
- (void)
setDrawsCellBackground: (BOOL)flag;
Availability: OpenStep
- (void)
setErrorAction: (SEL)aSelector;
Availability: OpenStep
Sets the error action method to aSelector
. This error method is used when in
-textShouldEndEditing:
if the selected cell doe not have a valid text object
See Also:
-errorAction
- (void)
setIntercellSpacing: (
NSSize)aSize;
Availability: OpenStep
- (void)
setKeyCell: (
NSCell*)aCell;
Availability: OpenStep
Description forthcoming.
- (void)
setMode: (
NSMatrixMode)aMode;
Availability: OpenStep
- (void)
setNextText: (id)anObject;
Availability: OpenStep
Sets the next key view to anObject
See Also:
-nextText
[NSView-setNextKeyView:
- (void)
setPreviousText: (id)anObject;
Availability: OpenStep
Sets the previous key view to anObject
See Also:
-previousText
[NSView-setPreviousKeyView:
- (void)
setPrototype: (
NSCell*)aCell;
Availability: OpenStep
- (void)
setScrollable: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setSelectionByRect: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setSelectionFrom: (
NSInteger)startPos
to: (
NSInteger)endPos
anchor: (
NSInteger)anchorPos
highlight: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setState: (
NSInteger)value
atRow: (
NSInteger)row
column: (
NSInteger)column;
Availability: OpenStep
Sets the state of the cell at row
row and column to
value. If the NSMatrix's mode is
NSRadioModeMatrix it deselects the cell
currently selected if needed.
- (void)
setTabKeyTraversesCells: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setValidateSize: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
sizeToCells;
Availability: OpenStep
Description forthcoming.
- (void)
sortUsingFunction: (NSComparisonResult(*)(id element1,id element2,void*userData))comparator
context: (void*)context;
Availability: OpenStep
Description forthcoming.
- (void)
sortUsingSelector: (SEL)comparator;
Availability: OpenStep
Description forthcoming.
- (BOOL)
tabKeyTraversesCells;
Availability: OpenStep
Description forthcoming.
- (void)
textDidBeginEditing: (
NSNotification*)aNotification;
Availability: OpenStep
- (void)
textDidChange: (
NSNotification*)aNotification;
Availability: OpenStep
- (void)
textDidEndEditing: (
NSNotification*)aNotification;
Availability: OpenStep
- (BOOL)
textShouldBeginEditing: (NSText*)aTextObject;
Availability: OpenStep
Asks to the delegate (if it implements
-control:textShouldBeginEditing:
) if the text should be edit. Returns YES
if the delegate does not implement this method
- (BOOL)
textShouldEndEditing: (NSText*)aTextObject;
Availability: OpenStep
Description forthcoming.
Instance Variables for NSMatrix Class
@protected SEL _action;
Availability: OpenStep
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.
@protected BOOL _allowsEmptySelection;
Availability: OpenStep
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.
@protected BOOL _autoscroll;
Availability: OpenStep
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.
@protected BOOL _autosizesCells;
Availability: OpenStep
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.
@protected NSColor* _backgroundColor;
Availability: OpenStep
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.
@protected NSColor* _cellBackgroundColor;
Availability: OpenStep
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.
@protected Class _cellClass;
Availability: OpenStep
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.
@protected IMP _cellInit;
Availability: OpenStep
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.
@protected IMP _cellNew;
Availability: OpenStep
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.
@protected id _cellPrototype;
Availability: OpenStep
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.
@protected NSSize _cellSize;
Availability: OpenStep
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.
@protected id** _cells;
Availability: OpenStep
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.
@protected id _delegate;
Availability: OpenStep
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.
@protected int _dottedColumn;
Availability: OpenStep
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.
@protected int _dottedRow;
Availability: OpenStep
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.
@protected SEL _doubleAction;
Availability: OpenStep
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.
@protected BOOL _drawsBackground;
Availability: OpenStep
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.
@protected BOOL _drawsCellBackground;
Availability: OpenStep
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.
@protected SEL _errorAction;
Availability: OpenStep
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.
@protected NSSize _intercell;
Availability: OpenStep
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.
@protected int _maxCols;
Availability: OpenStep
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.
@protected int _maxRows;
Availability: OpenStep
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.
@protected NSMatrixMode _mode;
Availability: OpenStep
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.
@protected NSZone* _myZone;
Availability: OpenStep
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.
@protected int _numCols;
Availability: OpenStep
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.
@protected int _numRows;
Availability: OpenStep
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.
@protected id _reserved1;
Availability: OpenStep
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.
@protected id _selectedCell;
Availability: OpenStep
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.
@protected BOOL** _selectedCells;
Availability: OpenStep
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.
@protected int _selectedColumn;
Availability: OpenStep
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.
@protected int _selectedRow;
Availability: OpenStep
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.
@protected BOOL _selectionByRect;
Availability: OpenStep
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.
@protected BOOL _tabKeyTraversesCells;
Availability: OpenStep
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.
@protected id _target;
Availability: OpenStep
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.
@protected NSText* _textObject;
Availability: OpenStep
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.
Up