This is NSMatrix.rtf in view mode; [Download] [Up]
paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc. All Rights Reserved. s4 li100 fi0 ri1007 ql f0 b fs36 fs100 fs36 NSMatrix pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSControl : NSView : NSResponder : NSObject fs20 fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding (NSResponder) fi0 NSObject (NSObject) fs20 fs28 s7 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSMatrix.h fs20 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 fs28 Class Description fs14 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 fs28 NSMatrix is a class used for creating groups of NSCells that work together in various ways. It includes methods for arranging NSCells in rows and columns, either with or without space between them. NSCells in an NSMatrix are numbered by row and column, each starting with 0; for example, the top left NSCell would be at (0, 0), and the NSCell that'27s second down and third across would be at (1, 2). fs16 fs28 The cell objects that an NSMatrix contains are usually of a single subclass of NSCell, but they can be of multiple subclasses of NSCell. The only restriction is that all cell objects must be the same size. An NSMatrix can be set up to create new NSCells by copying a prototype object, or by allocating and initializing instances of a specific NSCell class. fs16 fs28 An NSMatrix adds to NSControl'27s target/action paradigm by allowing a separate target and action for each of its NSCells in addition to its own target and action. It also allows for an action message that'27s sent when the user double-clicks an NSCell, and which is sent in addition to the single-click action message. If an NSCell doesn'27t have an action, the NSMatrix sends its own action to its own target. If an NSCell doesn'27t have a target, the NSMatrix sends the NSCell'27s action to its own target. The double-click action of an NSMatrix is always sent to the target of the NSMatrix. fs16 fs28 Since the user might press the mouse button while the cursor is within the NSMatrix and then drag the mouse around, NSMatrix offers four 'aaselection modes'ba that determine how NSCells behave when the NSMatrix is tracking the mouse: fs16 fs28 pard s3 li1231 fi-376 ri1007 ql tx1231 tx2872 tx3250 'b7tab NSTrackModeMatrix is the most basic mode of operation. In this mode the NSCells are asked to track the mouse with b trackMouse:inRect:ofView:untilMouseUp:b0 whenever the mouse is inside their bounds. No highlighting is performed. An example of this mode might be a 'aagraphic equalizer'ba NSMatrix of sliders, where moving the mouse around causes the sliders to move under the mouse. fs16 fs28 'b7tab NSHighlightModeMatrix is a modification of NSTrackModeMatrix. In this mode, an NSCell is highlighted before it'27s asked to track the mouse, then unhighlighted when it'27s done tracking. This is useful for multiple unconnected NSCells that use highlighting to inform the user that they are being tracked (like push-buttons and switches). fs16 fs28 'b7tab NSRadioModeMatrix is used when you want no more than one NSCell to be selected at a time. It can be used to create a set of buttons of which one and only one is selected (there'27s the option of allowing no button to be selected). Any time an NSCell is selected, the previously selected NSCell is unselected. The canonical example of this mode is a set of radio buttons. fs16 fs28 'b7tab NSListModeMatrix is the opposite of NSTrackModeMatrix. NSCells are highlighted, but don'27t track the mouse. This mode can be used to select a range of text values, for example. NSMatrix supports the standard multiple-selection paradigms of dragging to select, using the shift key to make discontinuous selections, and using the alternate key to extend selections. fs16 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 fs28 Initializing the NSMatrix Class fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 + (Class)b cellClassb0 tab Returns the default class used to make cells. fi-6552 fs16 fs28 fi-6552 + (void)b setCellClass:b0 (Class)i classIdi0 tab Sets the default class used to make cells. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Initializing an NSMatrix Object fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (id)b initWithFrame:b0 (NSRect)i frameRecti0 tab Initializes a new NSMatrix object in i frameRecti0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (id)b initWithFrame:b0 (NSRect)i frameRecti0 tab Initializes a new NSMatrix object in i frameRecti0 , with s9 li7030 fi-6553 fi-5796 b mode:b0 (int)i aModei0 tab i tab aModei0 as the selection mode, i classIdi0 as the class used b cellClass:b0 (Class)i classIdi0 tab tab to make new cells, and having i rowsHighi0 rows and b numberOfRows:b0 (int)i rowsHighi0 tab i tab colsWidei0 columns. b numberOfColumns:b0 (int)i colsWide s8 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (id)b initWithFrame:b0 (NSRect)i frameRecti0 tab Initializes a new NSMatrix object with the given values s9 li7030 fi-6553 fi-5796 b mode:b0 (int)i aModei0 tab tab with i aModei0 as the selection mode, i aCelli0 as the b prototype:b0 (NSCell *)i aCelli0 tab tab prototype copied to make new cells, and having b numberOfRows:b0 (int)i rowsHighi0 tab tab i rowsHighi0 rows and i colsWidei0 columns. b numberOfColumns:b0 (int)i colsWide pard s16 li100 fi0 ri1007 ql f0 b i0 fs48 fs28 Setting the Selection Mode fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSMatrixMode)b modeb0 tab Returns the selection mode of the matrix. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setMode:b0 (NSMatrixMode)i aModei0 tab Sets the selection mode of the matrix. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Configuring the NSMatrix fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b allowsEmptySelectionb0 tab Returns whether it'27s possible to have no cells selected. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b isSelectionByRectb0 tab Returns whether a user can drag a rectangular selection. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setAllowsEmptySelection:b0 (BOOL)i flagi0 tab Sets whether it'27s possible to have no cells selected. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setSelectionByRect:b0 (BOOL)i flagi0 tab Sets whether a user can drag a rectangular selection (the default is YES). If i flagi0 is NO, selection is on a row-by-row basis. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Setting the Cell Class fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (Class)b cellClassb0 tab Returns the subclass of NSCell used to make new cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (id)b prototypeb0 tab Returns the prototype cell copied to make new cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setCellClass:b0 (Class)i classIdi0 tab Sets the subclass of NSCell used to make new cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setPrototype:b0 (NSCell *)i aCelli0 tab Sets the prototype cell copied to make new cells. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Laying Out the NSMatrix fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b addColumnb0 tab Adds a new column of cells to the right of the last column. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b addColumnWithCells:b0 (NSArray *)i cellArraytab i0 Adds a new column of cells, using those contained in i cellArray. fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (void)b addRowb0 tab Adds a new row of cells below the last row. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b addRowWithCells:b0 (NSArray *)i cellArraytab i0 Adds a new rowi i0 of cells, using those contained in i cellArray. fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (NSRect)b cellFrameAtRow:b0 (int)i rowi0 tab Returns the frame rectangle of the cell at i rowi0 and i columni0 . s9 li7030 fi-6553 fi-5796 b column:b0 (int)i column s8 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (NSSize)b cellSizeb0 tab Returns the width and height of cells in the matrix. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b getNumberOfRows:b0 (int *)i rowCounti0 tab Gets the number of rows and columns in the matrix. s9 li7030 fi-6553 fi-5796 b columns:b0 (int *)i columnCount s8 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (void)b insertColumn:b0 (int)i columni0 tab Inserts a new column of cells at i columni0 , creating as many as needed to make the matrix i column i0 columns wide. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b insertColumn:b0 (int)i columni0 b withCells:b0 (NSArray *)i cellArray s9 li7030 fi-6553 fi-5796 i0 tab Inserts a new row of cells at i columni0 , using those contained in i cellArray. s8 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (void)b insertRow:b0 (int)i rowi0 tab Inserts a new row of cells at i rowi0 , creating as many as needed to make the matrix i rowi0 rows wide. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b insertRow:b0 (int)i rowi0 b withCells:b0 (NSArray *)i cellArray s9 li7030 fi-6553 fi-5796 i0 tab Inserts a new row of cells at i rowi0 , using those contained in i cellArray. s8 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (NSSize)b intercellSpacingb0 tab Returns the vertical and horizontal spacing between cells fi-6552 fs16 fs28 fi-6552 {f3 -} (NSCell *)b makeCellAtRow:b0 (int)i rowi0 tab Creates a new cell at i rowi0 , i columni0 in the matrix and returns s9 li7030 fi-6553 fi-5796 b column:b0 (int)i columni0 tab tab it. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b putCell:b0 (NSCell *)i newCelli0 tab Replaces the cell at i rowi0 and i columni0 with i newCelli0 . s9 li7030 fi-6553 fi-5796 b atRow:b0 (int)i row i0 b column:b0 (int)i column s8 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (void)b removeColumn:b0 (int)i columni0 tab Removes the column at i columni0 , releasing the cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b removeRow:b0 (int)i rowi0 tab Removes the row at i rowi0 , releasing the cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b renewRows:b0 (int)i newRowsi0 tab Changes the number of rows and columns in the receiver s9 li7030 fi-6553 fi-5796 b columns:b0 (int)i newColumnsi0 tab tab without freeing any cells. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setCellSize:b0 (NSSize)i aSizei0 tab Sets the width and height of all cells in the matrix. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setIntercellSpacing:b0 (NSSize)i aSizei0 tab Sets the vertical and horizontal spacing between cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b sortUsingFunction:b0 (int (*)(id i element1i0 , id i element2i0 , void *i userDatai0 ))i comparator s9 li7030 fi-6553 fi-5796 i0 b context:b0 (void *)i contexti0 tab Sorts the receiver'27s cells in ascending order as defined by the comparison function i comparatori0 . i contexti0 is passed as the function'27s third argument. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b sortUsingSelector:b0 (SEL)i fs28 comparatori0 fs28 tab Sorts the receiver'27s cells in ascending order as defined by the comparison method i comparatori0 . pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Finding Matrix Coordinates fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b getRow:b0 (int *)i rowi0 tab Gets the row and column position corresponding to i aPointi0 . s9 li7030 fi-6553 fi-5796 b column:b0 (int *)i columntab tab i0 Returns YES if i aPointi0 is within the matrix; b forPoint:b0 (NSPoint)i aPointi0 tab tab NO otherwise. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b getRow:b0 (int *)i rowi0 tab Gets the row and column position of i aCelli0 . s9 li7030 fi-6553 fi-5796 b column:b0 (int *)i columntab i0 tab Returns YES if i aCelli0 is in the matrix; NO otherwise. b ofCell:b0 (NSCell *)i aCell pard s16 li100 fi0 ri1007 ql f0 b i0 fs48 fs28 Modifying Individual Cells fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b setState:b0 (int)i valuei0 tab Sets the state of the cell at i rowi0 and i columni0 to i valuei0 . s9 li7030 fi-6553 fi-5796 b atRow:b0 (int)i row i0 b column:b0 (int)i column pard s16 li100 fi0 ri1007 ql f0 b i0 fs48 fs28 Selecting Cells fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b deselectAllCellsb0 tab Clears the receiver'27s selection, assuming that the NSMatrix allows an empty selection. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b deselectSelectedCellb0 tab Deselects the selected cell. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b selectAll:b0 (id)i senderi0 tab Selects all the cells in the matrix. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b selectCellAtRow:b0 (int)i rowi0 tab Selects the cell at i rowi0 and i coli0 . s9 li7030 fi-6553 fi-5796 b column:b0 (int)i column s8 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (BOOL)b selectCellWithTag:b0 (int)i anInti0 tab Selects the cell with the tag i anInti0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (id)b selectedCellb0 tab Returns the most recently selected cell or b nilb0 if no cell has been selected. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSArray *)b selectedCellsb0 tab Returns an array containing the selected cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (int)b selectedColumnb0 tab Returns the column of the selected cell or {f3 -}1 if no column has been selected. fi-6552 fs16 fs28 fi-6552 {f3 -} (int)b selectedRowb0 tab Returns the row of the selected cell or {f3 -}1 if no row has been selected. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setSelectionFrom:b0 (int)i startPosi0 tab Selects the cells in the matrix from i startPosi0 to i endPosi0 , s9 li7030 fi-6553 fi-5796 b to:b0 (int)i endPosi0 tab tab counting in row order from the upper left, as though b anchor:b0 (int)i anchorPosi0 tab tab i anchorPosi0 were the number of the last cell selected, and b highlight:b0 (BOOL)i flagi0 tab tab highlighting the cells according to i flagi0 . pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Finding Cells fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (id)b cellAtRow:b0 (int)i rowi0 tab Returns the cell at row i rowi0 and column i coli0 . s9 li7030 fi-6553 fi-5796 b column:b0 (int)i column s8 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (id)b cellWithTag:b0 (int)i anInti0 tab Returns the cell having i anInti0 as its tag. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSArray *)b cellsb0 tab Returns the matrix'27s array of cells. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Modifying Graphic Attributes fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSColor *)b backgroundColorb0 tab Returns the color of the background between cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSColor *)b cellBackgroundColorb0 tab Returns the color of the background within cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b drawsBackgroundb0 tab Returns whether the receiver draws the background between cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b drawsCellBackgroundb0 tab Returns whether the receiver draws the background within cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setBackgroundColor:b0 (NSColor *)i aColori0 tab Sets the color of the background between cells to i aColori0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setCellBackgroundColor:b0 (NSColor *)i aColor s9 li7030 fi-6553 fi-5796 i0 tab Sets the color of the background within cells to i aColori0 . s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setDrawsBackground:b0 (BOOL)i flagi0 tab Sets whether the receiver draws the background between cells. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setDrawsCellBackground:b0 (BOOL)i flagi0 tab Sets whether the receiver draws the background within cells. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Editing Text in Cells fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b selectText:b0 (id)i senderi0 tab Selects the text in the first or last editable cell. fi-6552 fs16 fs28 fi-6552 {f3 -} (id)b selectTextAtRow:b0 (int)i rowi0 tab Selects the text of the cell at i rowi0 , i column i0 in the matrix. s9 li7030 fi-6553 fi-5796 b column:b0 (int)i column s8 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (void)b textDidBeginEditing:b0 (NSNotification *)i notification s9 li7030 fi-6553 fi-5796 i0 tab Invoked when there'27s a change in the text after the receiver gains first responder status. Default behavior is pass to this message on to the text delegate. This method posts the NSControlTextDidBeginEditingNotification notification with the receiving object and, in the notification'27s dictionary, the text object (with the key NSFieldEditor) to the default notification center. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b textDidChange:b0 (NSNotification *)i notificationi0 tab s9 li7030 fi-6553 fi-5796 tab Invoked upon a key-down event or paste operation that changes the receiver'27s contents. Default behavior is to pass this message on to the text delegate. This method posts the NSControlTextDidChangeNotification notification with the receiving object and, in the notification's dictionary, the text object (key NSFieldEditor) to the default notification center. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b textDidEndEditing:b0 (NSNotification *)i notification s9 li7030 fi-6553 fi-5796 i0 i tab i0 Invoked when text editing ends and then forwarded to the text delegate. This method posts the notification NSControlTextDidEndEditingNotification with the receiving object and, in the notification'27s dictionary, the text object (with the key NSFieldEditor) to the default notification center. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b textShouldBeginEditing:b0 (NSText *)i textObjecti0 tab s9 li7030 fi-6553 fi-5796 tab Invoked to let the NSTextField respond to impending changes to its text and then forwarded to the text delegate. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b textShouldEndEditing:b0 (NSText *)i textObjecti0 tab s9 li7030 fi-6553 fi-5796 tab Invoked to let the NSTextField respond to impending loss of first responder status and then forwarded to the text delegate. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Setting Tab Key Behavior fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (id)b nextTextb0 tab Returns the object to be selected when the user presses Tab while editing the last text cell. fi-6552 fs16 fs28 fi-6552 {f3 -} (id)b previousTextb0 tab Returns the object to be selected when the user presses Shift-Tab while editing the first text cell. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setNextText:b0 (id)i anObjecti0 tab Sets the object to be selected when the user presses Tab while editing the last text cell. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setPreviousText:b0 (id)i anObjecti0 tab Sets the object to be selected when user presses Shift-Tab while editing the first text cell. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Assigning a Delegate fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b setDelegate:b0 (id)i anObjecti0 tab Sets the delegate for messages from the field editor. fi-6552 fs16 fs28 fi-6552 {f3 -} (id)b delegateb0 tab Returns the delegate for messages from the field editor. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Resizing the Matrix and Cells fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b autosizesCellsb0 tab Returns whether the matrix resizes its cells automatically. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setAutosizesCells:b0 (BOOL)i flagi0 tab Sets whether the matrix resizes its cells automatically. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setValidateSize:b0 (BOOL)i flagi0 tab Sets whether the cell size needs to be recalculated. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b sizeToCellsb0 tab Resizes the matrix to fit its cells exactly. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Scrolling fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b isAutoscrolltab b0 Returns whether the matrix automatically scrolls when dragged in. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b scrollCellToVisibleAtRow:b0 (int)i rowi0 tab Scrolls the matrix so that the cell at i rowi0 and i column i0 is s9 li7030 fi-6553 fi-5796 b column:b0 (int)i columni0 tab tab visible. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setAutoscroll:b0 (BOOL)i flagi0 tab Sets whether the matrix automatically scrolls when dragged in. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setScrollable:b0 (BOOL)i flagi0 tab If i flagi0 is YES, makes all the cells scrollable. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Displaying fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b drawCellAtRow:b0 (int)i rowi0 tab Displays the cell at i rowi0 and i coli0 . s9 li7030 fi-6553 fi-5796 b column:b0 (int)i columni0 tab s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b highlightCell:b0 (BOOL)i flagtab i0 Highlights (or unhighlights) the cell at i rowi0 , i coli0 . s9 li7030 fi-6553 fi-5796 b atRow:b0 (int)i row i0 b column:b0 (int)i column pard s16 li100 fi0 ri1007 ql f0 b i0 fs48 fs28 Target and Action fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (SEL)b doubleActionb0 tab Returns the action method for double clicks. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setDoubleAction:b0 (SEL)i aSelectori0 tab Sets the action method used on double-clicks to i aSelectori0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (SEL)b errorActionb0 tab Returns the action method for editing errors. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b sendActionb0 tab Sends the selected cell'27s action, or the NSMatrix'27s action if the cell doesn'27t have one. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b sendAction:b0 (SEL)i aSelectori0 tab Sends i aSelectori0 to i anObjecti0 , for all cells if i flagi0 is YES. s9 li7030 fi-6553 fi-5796 b to:b0 (id)i anObject i0 b forAllCells:b0 (BOOL)i flag s8 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (void)b sendDoubleActionb0 tab Sends the action corresponding to a double-click. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setErrorAction:b0 (SEL)i aSelectori0 tab Sets the action method for editing errors to i aSelectori0 . pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Handling Event and Action Messages fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b acceptsFirstMouse:b0 (NSEvent *)i theEventi0 tab Returns NO only if receiver'27s mode is NSListModeMatrix. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b mouseDown:b0 (NSEvent *)i theEventi0 tab Responds to a mouse-down event. A mouse-down event in a text cell initials editing mode. A double-click in any cell type except a text cell sends the double-click action of the NSMatrix (if there is one) in addition to the single-click action. fi-6552 fs16 fs28 fi-6552 {f3 -} (int)b mouseDownFlagsb0 tab Returns the event flags in effect at start of tracking. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b performKeyEquivalent:b0 (NSEvent *)i theEvent s9 li7030 fi-6553 fi-5796 i0 tab Simulates a mouse click in the appropriate cell. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Managing the Cursor fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b resetCursorRectsb0 tab Resets cursor rectangles so that the cursor becomes an I-beam over text cells. }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.