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: (int)row
column: (int)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: (int)row
column: (int)column;
Availability: OpenStep
Returns the rectangle of the cell at row row and column column
- (NSSize)
cellSize;
Availability: OpenStep
- (id)
cellWithTag: (int)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
- (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:
- (void)
drawCellAtRow: (int)row
column: (int)column;
Availability: OpenStep
- (BOOL)
drawsBackground;
Availability: OpenStep
- (BOOL)
drawsCellBackground;
Availability: OpenStep
- (SEL)
errorAction;
Availability: OpenStep
- (void)
getNumberOfRows: (int*)rowCount
columns: (int*)columnCount;
Availability: OpenStep
- (BOOL)
getRow: (int*)row
column: (int*)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: (int*)row
column: (int*)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: (int)row
column: (int)column;
Availability: OpenStep
- (id)
initWithFrame: (NSRect)frameRect;
Availability: OpenStep
- (id)
initWithFrame: (NSRect)frameRect
mode: (int)aMode
cellClass: (Class)classId
numberOfRows: (int)rowsHigh
numberOfColumns: (int)colsWide;
Availability: OpenStep
- (id)
initWithFrame: (NSRect)frameRect
mode: (int)aMode
prototype: (
NSCell*)aCell
numberOfRows: (int)rowsHigh
numberOfColumns: (int)colsWide;
Availability: OpenStep
- (void)
insertColumn: (int)column;
Availability: OpenStep
- (void)
insertColumn: (int)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: (int)row;
Availability: OpenStep
- (void)
insertRow: (int)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: (int)row
column: (int)column;
Availability: OpenStep
Makes and returns new cell at row row and column column.
- (void)
mouseDown: (
NSEvent*)theEvent;
Availability: OpenStep
Description forthcoming.
- (int)
mouseDownFlags;
Availability: OpenStep
Description forthcoming.
- (id)
nextText;
Availability: OpenStep
- (int)
numberOfColumns;
Availability: OpenStep
Returns the number of columns of the NSMatrix
See Also: -numberOfRows
- (int)
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: (int)row
column: (int)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: (int)column;
Availability: OpenStep
Removes the NSMatrix's column at index column
See Also: -removeRow:
- (void)
removeRow: (int)row;
Availability: OpenStep
- (void)
renewRows: (int)newRows
columns: (int)newColumns;
Availability: OpenStep
Description forthcoming.
- (void)
resetCursorRects;
Availability: OpenStep
Description forthcoming.
- (void)
scrollCellToVisibleAtRow: (int)row
column: (int)column;
Availability: OpenStep
- (void)
selectAll: (id)sender;
Availability: OpenStep
- (void)
selectCellAtRow: (int)row
column: (int)column;
Availability: OpenStep
- (BOOL)
selectCellWithTag: (int)anInt;
Availability: OpenStep
- (void)
selectText: (id)sender;
Availability: OpenStep
Description forthcoming.
- (id)
selectTextAtRow: (int)row
column: (int)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
- (int)
selectedColumn;
Availability: OpenStep
- (int)
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: (int)startPos
to: (int)endPos
anchor: (int)anchorPos
highlight: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setState: (int)value
atRow: (int)row
column: (int)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: (int(*)(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
Invokes when the text cell starts to be editing.This methods posts a NSControlTextDidBeginEditingNotification with a dictionary containing the NSFieldEditor as user info
See Also: [NSNotificationCenter -postNotificationName:object:userInfo:]
- (void)
textDidChange: (NSNotification*)aNotification;
Availability: OpenStep
Invokes when the text cell is changed. This methods posts a NSControlTextDidChangeNotification with a dictionary containing the NSFieldEditor as user info
See Also: [NSNotificationCenter -postNotificationName:object:userInfo:]
- (void)
textDidEndEditing: (NSNotification*)aNotification;
Availability: OpenStep
Invokes when the text cell is changed. This methods posts a NSControlTextDidEndEditingNotification a dictionary containing the NSFieldEditor as user info
See Also: [NSNotificationCenter -postNotificationName:object:userInfo:]
- (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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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