Release 1.0 Copyright ©1995,1996 by Paul McCarthy and Eric Sunshine All Rights Reserved.
Paul S. McCarthy and Eric Sunshine -- January 17, 1996
| MiscTableScroll |
| Inherits From: | ScrollView : View : Responder : Object | |
| Declared In: | MiscTableScroll.h |
| Class Description |
| This class provides a convenient and powerful user-interface object for displaying and manipulating tabular data. The
appearance and behavior is similar to DBTableView, but it does not depend on obsolete packages (DBKit), nor on
separately bundled packages (EOF). It does not support DBKit-style adaptors, but future versions might. Although it
inherits from ScrollView, the programmatic interface is similar to the Matrix class.
User Interface Highlights |
| Scrollable Matrix. Column and Row titles. Columns and Rows can be resized. Columns and Rows can be dragged (rearranged). Expand-to-data columns. Alt-Click works in Highlight mode. Keyboard access as well as mouse access. Automatically resorts rows when columns are rearranged. |
| Programmatic Interface Highlights |
| Each column and row can have its own size. Each column can have its own cell-type. Lazy-mode for large amounts of data. Programmatic interface for multiple selection. Built-in sort support. Smart memory management. Delegate methods for most features. Simple indexed access to rows and columns. |
| Similarities between Rows and Columns -- Slots and Borders
Rows and columns are treated equally wherever it is practical and desirable to do so. Almost every action and option that is available for columns is also available for rows and vice versa. Slot is the generic term for a single column or row. Border is the generic term for row or column orientation. Size is the generic term for width or height. Most methods come in two flavors: a row/column specific flavor that uses "row" or "col" as part of the name; and a generic flavor that has a "border" argument and (when needed) a "slot" argument. Here are some examples: |
| Generic | Specific | |
| - border:setTitlesOn: | - setColTitlesOn: - setRowTitlesOn: | |
| - border:setSlot:size: | - setCol:size: - setRow:size: |
| Differences between Rows and Columns
There are some differences between rows and columns. This object is designed to maximize the efficiency of displaying many rows of data. Hence, it is faster to add and remove rows than columns. You should set up all your columns in InterfaceBuilder, or while the table is empty, then add and remove rows afterwards. Rows are cached for use with the -renewRows: method. This makes it very fast to change the contents of the table on a row-oriented basis. Despite the row-oriented bias, column-oriented operations can be performed at any time; they will just be slower than the corresponding row-oriented operations. This behavior is intrinsic to the implementation, it cannot be changed. Cell-prototypes are only used for columns. This behavior can only be changed by subclassing. Selection in the body of a table performs selection on a row-wise basis. This behavior can be changed programmatically via the -trackBy: method. There are numerous default settings which differ between columns and rows. Most of these options can be changed in InterfaceBuilder; all of them can be changed programmatically. Here is a summary of the defaults which differ between rows and columns: |
| Option | Column Default | Row Default | |
| modifier drag | NO | YES | |
| uniform size | NO | YES | |
| user sizeable | YES | NO | |
| user draggable | YES | NO | |
| titles displayed | YES | NO | |
| autosize-slots | YES | NO | |
| min-size-constrained | YES | NO | |
| title mode | Custom | Auto-Numbered |
| Selection stuff...
Slot Sizing Uniform size is the simplest sizing mode. When you set the uniform size of a border to any non-zero value, all slots in that border will have the same (uniform) size. They will not be sizeable by the user, nor will they be able to have individually differing sizes. Setting the uniform size of a border to zero disables this feature, enabling slots to have individual sizes, and enabling user-sizing of slots in the border (subject to further conditions described below). By default, rows are uniform size, columns are not. If uniform sizing is not set for a border, the following sizing information is maintained for each slot in the border: |
| target size minimum size maximum size data size adjusted size user-sizeable-flag expands-to-data-flag autosize-flag |
| Target size is the desired size for a particular slot. Minimum and maximum sizes are the lower and upper bounds for
the size of a slot. Data size is the size of the largest item in a slot for slots that are marked expands-to-data. Adjusted
size is the final display size of the slot after all other factors have been taken into account. When a slot is marked as
user-sizeable, the user will be able to resize the slot (subject to further conditions described below). When a slot is
marked as expands-to-data, the display size will be increased as necessary to display the largest entry in that slot.
Note that expands-to-data only affects the adjusted size. It does not affect the target size. Also note that
expands-to-data will only increase the size of a slot, never decrease it. When a slot is marked as autosize, its adjusted
size may be changed to meet global minimum and maximum size limits. The three flag values are mutually
independent, but you should be careful, because user-sizeable and autosize do not mix well. They cause bizarre,
counter-intuitive behavior on narrow tables in wide views.
Users resize columns by dragging the right-hand edge of the column's title cell to the desired width. Likewise, users resize rows by dragging the bottom edge of the row's title cell to the desired height. The cursor changes to a horizontal or vertical resize cursor whenever the cursor is over one of the resizing areas. When users resize a slot, they are setting the target size for the slot. All of the following conditions must be met to enable the user to resize a particular slot: |
| (a) | Uniform-size for the border must be disabled (-border:setUniformSize:0) | |
| (b) | The title cells must be displayed (-border:setTitlesOn:YES) | |
| (c) | The border in question must allow user-sizing of slots (-border:setSizeableSlots:YES) | |
| (d) | The slot in question must be user-sizeable (-border:setSlot:sizeable:YES) | |
| (e) | There must be some room to grow or shrink between the slot's current adjusted size and the slot's minimum and maximum sizes. |
| All of these conditions are met by default for new columns, unless you explicitly disable one of the global options for
column sizing.
Slot Dragging and Indexing -- Visual vs. Physical Dragging and sizing are independent of each other. You can have borders that are not sizeable in any way, but are still draggable, and vice versa. You can also have borders that are both draggable and sizeable, or neither draggable nor sizeable. Users drag slots by dragging the title cells until the mouse is over the desired new location and "dropping" the slot in the new location. Dragging must be enabled for that border. By default, columns are dragged with an unmodified drag, and they are selected with a command-drag. By default, rows are selected with an unmodified drag, and they are dragged with a command-drag. By default, dragging is enabled for columns, but not for rows. If slot-dragging is enabled for a border then an internal mapping vector is maintained which translates the original physical position of the slot to its current visual position. All programmer-interface methods and all delegate call-back methods use the original physical position of the slot so you can ignore the current visual ordering in your programs. If you need or want to examine the current visual ordering, you can do so with the -border:slotPosition: and -border:slotAtPosition: methods. Lazy vs. Eager... Delegate stuff... Prototype Cells Each column maintains a prototype cell which is used when new rows are created. When new rows are created, a -copy message is sent to the prototype cell for each column, and the new copy of the prototype cell is put into the new row. This means that all prototype cells must implement the -copy method appropriately. They must make copies of all components that are freed when the cell itself is freed. The prototype cell can be one of the built-in types (text, icon, or button), it can be supplied by the delegate, or you can set it programmatically. If you set a prototype cell programmatically, the MiscTableScroll object will take "ownership" of the prototype cell -- it will free the cell when it is finished with it. If the delegate provides the prototype cell, the delegate retains ownership -- the MiscTableScroll object will not free prototype cells provided by the delegate. Usage Tips For simple, flexible and maintainable access to the columns of the table scroll, you should declare an enum which identifies the columns in the MiscTableScroll, like the following example from the ScrollDir program: |
enum
{
ICON_SLOT,
NAME_SLOT,
SIZE_SLOT,
MODIFIED_SLOT,
PERMS_SLOT,
OWNER_SLOT,
GROUP_SLOT,
HARDLINKS_SLOT,
SOFTLINK_SLOT,
MESSAGE_SLOT
};
| Then you use the enumeration identifiers whenever you need to specify a column. Using an enumeration this way lets
you add, remove and shuffle the slots just by updating the enum declaration, rather than searching through the code to
find all the places that need to be fixed. It also makes your code more readable.
There are two standard patterns for putting the data into eager (non-lazy) MiscTableScroll objects: -renewRows: and -addRow. -renewRows: |
id item;
int row;
int const NRows = [dataSource count];
[tableScroll renewRows: NRows];
for (row = 0; row < NRows; row++)
{
item = [dataSource itemAt:row];
[tableScroll setRow:row tag:(int)item];
[[tableScroll cellAt:row:NAME_SLOT]
setStringValue:[item name]];
[[[tableScroll cellAt:row:SIZE_SLOT]
setIntValue:[item size]]
setTag:[item size]];
//... and so on ...
}
if ([tableScroll autoSortRows])
[tableScroll sortRows];
| -addRow When you do not know the final number of rows in advance, your code will usually be structured like the following: |
int row = 0;
[tableScroll empty];
while ((item = [self getNextItem]) != 0)
{
[tableScroll addRow];
[tableScroll setRow:row tag:(int)item];
[[tableScroll cellAt:row:NAME_SLOT]
setStringValue: [item name]];
[[[tableScroll cellAt:row:SIZE_SLOT]
setIntValue: [item size]]
setTag: (int) [item size]];
//... and so on ...
row++;
}
[tableScroll sizeToCells];
if ([tableScroll autoSortRows])
[tableScroll sortRows];
| A common programming mistake is forgetting to call sizeToCells. You must call sizeToCells after you have finished
adding rows so that the MiscTableScroll can update the frames of its various subviews. If you forget to call
sizeToCells, the MiscTableScroll will appear to be empty when it is displayed.
Smart Memory Management The MiscTableScroll class implements "smart" memory management. It does not allocate support structures until and unless they are needed. For example, since rows are uniform-size by default, the MiscTableScroll will not allocate the array of sizing-info structures until and unless you make the rows non-uniform size. In a complimentary fashion, if you make the columns uniform size, the MiscTableScroll object will free the sizing-info array for the columns. Similarly, custom titles must be stored in an array. However, no other title-mode requires this array, and the array will only exist for borders that have custom titles. Likewise, the visual-to-physical mapping vector that supports user-draggable slots is only created when the first slot is actually moved. Even if the draggable option is turned on, you will not incur the memory overhead until the option is used. The net result of all this is that you only pay for the features that you use. On the other hand, you do pay for the features that you do use. These extra features exact a price in storage and cpu. You should be careful about using them for rows when you expect thousands of rows. The MiscTableScroll class is designed to provide high-quality, consistent, flexible behavior to the user while supporting a wide range of load requirements -- from dozens of rows to hundreds of thousands of rows. Smart memory management is an important element in achieving that goal. |
| Instance Variables
Method Types |
| Creating and freeing instances | - initFrame: |
| - free |
| Delegates | - setDelgate: |
| - delegate - setDataDelegate: - dataDelegate |
| Transmitting action | - setTarget: |
| - target - setDoubleTarget: - doubleTarget - setAction: - action - setDoubleAction: - doubleAction - sendAction:to:forAllCells: |
| Next-text chain | - setNextText: |
| - nextText - setPreviousText: - previousText - isSelectable - selectText: |
| Enabling and disabling | - setEnabled: |
| - isEnabled |
| Selection | - setSelectionMode: |
| - selectionMode - reflectSelection - cellIsSelected:: - rowIsSelected: - colIsSelected: - selectedRow - selectedCol - selectedRowTags: - selectedColTags: - selectedRows: - selectedCols: - selectRow: - selectCol: - selectRowTags: - selectColTags: - selectRows: - selectCols: - selectAll: - clearSelection - border:setModifierDragSlots: |
| - border:selectSlot: - border:selectSlots: - border:selectTags: - border:selectedSlots: - border:selectedTags: - border:slotIsSelected: - borderClearSelection: - borderHasMultipleSelection: - borderHasSelection: - borderNumSelectedSlots: - borderSelectAll: - borderSelectedSlot: - clearColSelection - clearRowSelection - hasColSelection - hasMultipleColSelection - hasMultipleRowSelection - hasRowSelection - numSelectedCols - numSelectedRows - selectAllCols - selectAllRows - trackBy: |
| Keyboard Cursor | - border:setCursor: - borderClearCursor: - borderCursor: - borderHasValidCursor: - clearCursor - clearCursorCol - clearCursorRow - cursorCol - cursorRow - hasValidCursorCol - hasValidCursorRow - setCursorCol: - setCursorRow: | |
| Scrolling | - scrollCellToVisible:: - scrollColToVisible: - scrollRowToVisible: - scrollSelToVisible | |
| Titles | - border:setTitlesOn: - setColTitlesOn: - setRowTitlesOn: - borderTitlesOn: - colTitlesOn - rowTitlesOn | |
| - border:setTitleMode: - setColTitleMode: - setRowTitleMode: - borderTitleMode: - colTitleMode - rowTitleMode | ||
| - border:setSlot:title: - setCol:title: - setRow:title: - border:slotTitle: - colTitle: - rowTitle: | ||
| Sizing | - border:setUniformSizeSlots: - setUniformSizeCols: - setUniformSizeRows: - uniformSizeSlots: - uniformSizeCols - uniformSizeRows | |
| - border:setSizeableSlots: - setSizeableCols: - setSizeableRows: - sizeableSlots: - sizeableCols: - sizeableRows: | ||
| - border:setSlot:size: - setCol:size: - setRow:size: - border:slotSize: - colSize: - rowSize: | ||
| - border:setSlot:minSize: - setCol:minSize: - setRow:minSize: - border:slotMinSize: - colMinSize: - rowMinSize: | ||
| - border:setSlot:maxSize: - setCol:maxSize: - setRow:maxSize: - border:slotMaxSize: - colMaxSize: - rowMaxSize: | ||
| - border:slotAdjustedSize: - colAdjustedSize: - rowAdjustedSize: | ||
| - border:setSlot:expandsToData: - setCol:expandsToData: - setRow:expandsToData: - border:slotExpandsToData: - colExpandsToData: - rowExpandsToData: | ||
| - border:setSlot:autosize: - setCol:autosize: - setRow:autosize: - border:slotIsAutosize: - colIsAutosize: - rowIsAutosize: | ||
| - border:setSlot:sizeable: - setCol:sizeable: - setRow:sizeable: - border:slotIsSizeable: - colIsSizeable: - rowIsSizeable: | ||
| - border:constrainMaxTotalSize: - border:constrainMinTotalSize: - border:setMaxTotalSize: - border:setMinTotalSize: - border:setSlot:dataSize: - border:slotDataSize: - colDataSize: - rowDataSize: - constrainMaxTotalHeight: - constrainMaxTotalWidth: - constrainMinTotalHeight: - constrainMinTotalWidth: - constrainSize - maxTotalHeight - maxTotalHeightIsConstrained - maxTotalSize: - maxTotalSizeIsConstrained: - maxTotalWidth - maxTotalWidthIsConstrained - minTotalHeight - minTotalHeightIsConstrained - minTotalSize: - minTotalSizeIsConstrained: - minTotalWidth - minTotalWidthIsConstrained - setMaxTotalHeight: - setMaxTotalWidth: - setMinTotalHeight: - setMinTotalWidth: - setCol:dataSize: - setRow:dataSize: - totalHeight - totalSize: - totalWidth | ||
| - border:slotResized: | ||
| Dragging | - border:setDraggableSlots: - setDraggableCols: - setDraggableRows: - draggableSlots: - draggableCols - draggableRows | |
| - border:setModifierDragSlots: - setModifierDragCols: - setModifierDragRows: - modifierDragSlots: - modifierDragCols - modifierDragRows | ||
| - border:moveSlotFrom:to: - moveColFrom:to: - moveRowFrom:to: | ||
| - border:slotAtPosition: - colAtPosition: - rowAtPosition: | ||
| - border:slotPosition: - colPosition: - rowPosition: | ||
| - border:physicalToVisual: - border:visualToPhysical: | ||
| - border:slotDraggedFrom:to: | ||
| Inserting and Deleting | - numSlots: - numCols - numRows | |
| - addSlot: - addCol - addRow | ||
| - border:insertSlotAt: - insertColAt: - insertRowAt: | ||
| - border:deleteSlotAt: - deleteColAt: - deleteRowAt: | ||
| - empty - emptyAndFreeCells - renewRows: | ||
| Cell Prototypes | - border:setSlot:cellType: - setCol:cellType: - setRow:cellType: - border:slotCellType: - colCellType: - rowCellType: | |
| - border:setSlot:cellPrototype: - setCol:cellPrototype: - setRow:cellPrototype: - border:slotCellPrototype: - colCellPrototype: - rowCellPrototype: | ||
| Tags | - tag - setTag: | |
| - border:setSlot:tag: - setCol:tag: - setRow:tag: - border:slotTag: - colTag: - rowTag: - tagAt:: | ||
| Drawing | - drawCellAt:: |
| - border:drawSlot: - drawRow: - drawCol: - border:drawSlotTitle: - drawRowTitle: - drawColTitle: - reflectSelection - setAutodisplay: - getDocClipFrame: |
| Data control | - setLazy: |
| - isLazy - cellAt:: - buffCount - addSlot: - border:insertSlotAt: - border:deleteSlotAt: - numSlots: - addCol - addRow |
| - doRetireCell:at:: - doReviveCell:at:: - retireCell:at:: - reviveCell:at:: - sizeToCells - tagAt:: |
| Sorting | - autoSortCols - autoSortRows - autoSortSlots: - border:setAutoSortSlots: - border:setSlot:sortDirection: - border:setSlot:sortFunc: - border:setSlot:sortType: - border:setSlotSortVector:len: - border:slotSortDirection: - border:slotSortFunc: - border:slotSortType: - border:sortSlot: - colSortDirection: - colSortFunc: - colSortType: - colSortVectorLen: - compareSlotFunc - rowSortDirection: - rowSortFunc: - rowSortType: - rowSortVectorLen: - setAutoSortCols: - setAutoSortRows: - setCol:sortDirection: - setCol:sortFunc: - setCol:sortType: - setColSortVector:len: - setCompareSlotFunc: - setRow:sortDirection: - setRow:sortFunc: - setRow:sortType: - setRowSortVector:len: - slotSortVector:len: - sortCol: - sortCols - sortRow: - sortRows - sortSlots: | |
| - slotsAreSorted: - rowsAreSorted - colsAreSorted - border:slotIsSorted: - colIsSorted: - rowIsSorted: | ||
| - border:compareSlots:: - border:compareSlots::info: - compareCols:: - compareCols::info: - compareRows:: - compareRows::info: | ||
| - sortInfoInit:border: - sortInfoDone: | ||
| Font | + defaultFont - font - setFont: | |
| Color | - backgroundColor - backgroundGray - color + defaultBackgroundColor + defaultHighlightBackgroundColor + defaultHighlightTextColor + defaultTextColor - highlightBackgroundColor - highlightBackgroundGray - highlightTextColor - highlightTextGray - setBackgroundColor: - setBackgroundGray: - setColor: - setHighlightBackgroundColor: - setHighlightBackgroundGray: - setHighlightTextColor: - setHighlightTextGray: - setTextColor: - setTextGray: - textColor - textGray | |
| Multicast | - makeCellsPerform: - makeCellsPerform:selectedOnly: - makeCellsPerform:with: - makeCellsPerform:with:with: - makeCellsPerform:with:selectedOnly: - makeCellsPerform:with:with:selectedOnly: | |
| Finding Cells / Tags | - border:findSlotWithTag: - findCell:row:col: - findCellWithTag: - findCellWithTag:row:col: - findColWithTag: - findRowWithTag: | |
| Save / Restore | - border:setSlotOrder: - border:setSlotOrderFromString: - border:slotOrder: - border:slotOrderAsString:size:canExpand: - border:setSlotSizes: - border:setSlotSizesFromString: - border:slotSizes: - border:slotSizesAsString:size:canExpand: - colOrder: - colOrderAsString:size:canExpand: - colSizes: - colSizesAsString:size:canExpand: - rowOrder: - rowOrderAsString:size:canExpand: - rowSizes: - rowSizesAsString:size:canExpand: - setColOrder: - setColOrderFromString: - setColSizes: - setColSizesFromString: - setRowOrder: - setRowOrderFromString: - setRowSizes: - setRowSizesFromString: | |
| Pasteboard and Services | - copy: - cut: - builtinCanWritePboardType: - builtinReadSelectionFromPasteboard: - builtinRegisterServicesTypes - builtinValidRequestorForSendType:andReturnType: - builtinWritePboard:type:toStream: - builtinWriteSelectionToPasteboard:types: - canWritePboardType: - readSelectionFromPasteboard: - registerServicesTypes - validRequestorForSendType:andReturnType: - writeNXAsciiPboardTypeToStream: - writeNXTabularTextPboardTypeToStream: - writePboard:type:toStream: - writeSelectionToPasteboard:types: | |
| Methods implemented by delegate | - tableScroll:backgroundColorChangedTo: - tableScroll:border:slotDraggedFrom:to: - tableScroll:border:slotPrototype: - tableScroll:border:slotResized: - tableScroll:border:slotTitle: - tableScroll:canWritePboardType: - tableScroll:canWritePboardType: - tableScroll:cellAt:: - tableScroll:tagAt:: - tableScroll:intValueAt:: - tableScroll:floatValueAt:: - tableScroll:doubleValueAt:: - tableScroll:stringValueAt:: - tableScroll:titleAt:: - tableScroll:stateAt:: - tableScroll:fontChangedFrom:to: - tableScroll:highlightBackgroundColorChangedTo: - tableScroll:highlightTextColorChangedTo: - tableScroll:readSelectionFromPasteboard: - tableScroll:readSelectionFromPasteboard: - tableScroll:retireAt:: - tableScroll:retireCell:at:: - tableScroll:retireCell:at:: - tableScroll:reviveAt:: - tableScroll:reviveCell:at:: - tableScroll:reviveCell:at:: - tableScroll:textColorChangedTo: - tableScroll:validRequestorForSendType:andReturnType: - tableScroll:validRequestorForSendType:andReturnType: - tableScroll:writePboard:type:toStream: - tableScroll:writePboard:type:toStream: - tableScroll:writeSelectionToPasteboard:types: - tableScroll:writeSelectionToPasteboard:types: - tableScrollBuffCount: - tableScrollRegisterServicesTypes: - tableScrollRegisterServicesTypes: |
| Class Methods |
| defaultBackgroundColor |
| + (NXColor)defaultBackgroundColor |
| Returns NX_COLORLTGRAY. This is the default background color for new MiscTableScroll objects.
defaultFont |
| + (Font*)defaultFont |
| Returns the user's preferred font at 12pt size. This is the default font for new MiscTableScroll objects.
defaultHighlightBackgroundColor |
| + (NXColor)defaultHighlightBackgroundColor |
| Returns NX_COLORWHITE. This is the default highlight background color for new MiscTableScroll objects.
defaultHighlightTextColor |
| + (NXColor)defaultHighlightTextColor |
| Returns NX_COLORBLACK. This is the default highlight text color for new MiscTableScroll objects.
defaultTextColor |
| + (NXColor)defaultTextColor |
| Returns NX_COLORBLACK. This is the default text color for new MiscTableScroll objects. |
| Instance Methods |
| action |
| - (SEL)action |
| Returns the action associated with a single click
See also: -doubleAction, -setAction:, -setDoubleTarget:, -setTarget:, -target
addCol |
| - addCol |
| Appends a new column. See Usage Tips in the introduction for a more complete discussion. Equivalent to:
-addSlot:MISC_COL_BORDER.
See also: -addRow, -addSlot:
addRow |
| - addRow |
| Appends a new row to the table. If you know how many rows you will need in advance, you should use -renewRows:
instead; it will be faster. If you do not know the number of rows in advance, use this method. This method is faster
than -insertColAt:. Internally, the table pre-allocates rows with a geometric growth pattern so there are only a
logarithmic number of allocations. See Usage Tips in the introduction for a more complete discussion. Equivalent to:
-addSlot:MISC_ROW_BORDER.
This method does no drawing, nor does it update the frames of the various subviews. (This enhances performance when adding hundreds or thousands of rows.) After you have finished adding rows, you must call sizeToCells so that the MiscTableScroll can update the frames of the various subviews. See also: -addCol, -addSlot:, -renewRows:, -sizeToCells
addSlot: |
| - addSlot:(MiscBorderType)b |
| Appends a new row or column to the table. Appending rows is fast (geometric growth, logarithmic allocations, no
shifting). Appending columns is slower (linear growth, linear allocations, lots of shifting). See Usage Tips in the
introduction for a more complete discussion.
See also: -addCol, -addRow, -addSlot, -renewRows:
autoSortCols |
| - (BOOL)autoSortCols |
| Indicates whether columns will be automatically sorted when the user drags rows. Equivalent to
-autoSortSlots:MISC_COL_BORDER.
autoSortRows |
| - (BOOL)autoSortRows |
| Indicates whether rows will be automatically sorted when the user drags columns. Equivalent to
-autoSortSlots:MISC_ROW_BORDER.
autoSortSlots: |
| - (BOOL)autoSortSlots:(MiscBorderType)b |
| Indicates whether or not slots on the given border will be automatically sorted when the user drags (rearranges) slots
on the other border.
backgroundColor |
| - (NXColor)backgroundColor |
| Returns the current background color for the MiscTableScroll object. The background color is used as the background
color of unhighlighted cells in the table body as well as the "exposure color" for areas not covered by cells.
See also: -highlightBackgroundColor, -highlightTextColor, -setBackgroundColor:, -setHighlightBackgroundColor:, -setHighlightTextColor:, -setTextColor:, -textColor
backgroundGray |
| - (float)backgroundGray |
| This method converts the results of calling -backgroundColor to a grayscale value.
See also: -backgroundColor
border:compareSlots:: |
| - (int)border:(MiscBorderType)b |
| compareSlots:(int)slot1 :(int)slot2 |
| This method compares two slots. Returns a value less than zero if slot1 should sort before slot2, zero if slot1 should
sort equally with slot2, or greater than zero if slot1 should sort after slot2. It calls -sortInfoInit:border: to compute
the sorting information, then calls -border:compareSlots::info:, and finally cleans up with -slotInfoDone:.
See also: -border:compareSlots::info:, -border:slotIsSorted:, -border:sortSlot:
border:compareSlots::info: |
| - (int)border:(MiscBorderType)b |
| compareSlots:(int)slot1 :(int)slot2 info:(MiscSlotSortInfo*)sortInfo |
| This method compares two slots, given a pointer to the precomputed sorting information. If you call this method, you
are responsible for initializing sortInfo by calling -sortInfoInit:border:, and then releasing the resources by calling
-sortInfoDone:.
See also: -border:compareSlots::, -sortInfoDone:, -sortInfoInit:border:
border:constrainMaxTotalSize: |
| - (void)border:(MiscBorderType)b |
| constrainMaxTotalSize:(BOOL)flag |
| This method instructs the MiscTableScroll object whether or not to "tie" the maximum total size of the border, b, to the
corresponding size of the ScrollView in which the table is displayed. When flag is YES, the maximum total size will be
constrained to match the corresponding size of the scroll view, and it will be automatically adjusted whenever the size
of the scroll view changes. When flag is NO, this will not happen. Maximum sizes are not constrained by default.
See also: -border:constrainMinTotalSize:, -maxTotalSizeIsConstrained:, -border:setMaxTotalSize:
border:constrainMinTotalSize: |
| - (void)border:(MiscBorderType)b |
| constrainMinTotalSize:(BOOL)flag |
| This method instructs the MiscTableScroll object whether or not to "tie" the minimum total size of the border, b, to the
corresponding size of the ScrollView in which the table is displayed. When flag is YES, the minimum total size will be
constrained to match the corresponding size of the scroll view, and it will be automatically adjusted whenever the size
of the scroll view changes. When flag is NO, this will not happen. Minimum sizes are constrained by default.
<???FIXME: This default behavior is obnoxious!?>
See also: -border:constrainMaxTotalSize:, -minTotalSizeIsConstrained:, -border:setMinTotalSize:
border:deleteSlotAt: |
| - border:(MiscBorderType)b |
| deleteSlotAt:(int)pos |
| Deletes a single row or column. All cells and other resources for the slot are deallocated immediately. If you are just
emptying the table so that you can refill it with new data, use -renewRows: or -empty instead. See Usage Tips in the
introduction for a more complete discussion.
See also: -deleteColAt:, -deleteRowAt:, -empty, -emptyAndFreeCells, -renewRows:
border:drawSlot: |
| - border:(MiscBorderType)b |
| drawSlot:(int)n |
| Draws a single row or column. This method locks focus on the view if needed. You should never need to call this
method.
See also: -drawCellAt::, -drawCol:, -drawRow:
border:drawSlotTitle: |
| - border:(MiscBorderType)b |
| drawSlotTitle:(int)n |
| Draws the title cell for a single row or column. This method locks focus on the view if needed. You should never need
to call this method.
See also: -drawColTitle:, -drawRowTitle:
border:findSlotWithTag: |
| - (int)border:(MiscBorderType)b |
| findSlotWithTag:(int)x |
| Returns the index of the first slot whose tag is x, or -1 if no match was found.
See also: -findRowWithTag:, -findColWithTag:, -findCellWithTag:row:col:
border:getDelegateSlotPrototype: |
| - border:(MiscBorderType)b |
| getDelegateSlotPrototype:(int)s |
| Internal method used whenever the MiscTableScroll object needs to get the cell prototype for a slot which was marked
with a "Call-Back" cell type.
border:getDelegateSlotTitle: |
| - (char const*)border:(MiscBorderType)b |
| getDelegateSlotTitle:(int)slot |
| Internal method used whenever the MiscTableScroll object needs to get a title for a slot, and the title-style for the
border is "Delegate".
border:insertSlotAt: |
| - border:(MiscBorderType)b |
| insertSlotAt:(int)pos |
| Inserts a single row or column at the indicated position. Position is a zero-based index. <???FIXME: What is the visual
position of slots created this way?> This method performs linear allocation, and is slower than the corresponding
-addRow method when adding new rows to a table.
See also: -addCol, -addRow, -addSlot:, -insertColAt:, -insertRowAt:
border:moveSlotFrom:to: |
| - border:(MiscBorderType)b |
| moveSlotFrom:(int)from_pos to:(int)to_pos |
| This is equivalent to the user dragging a slot from from_pos to to_pos. Both from_pos and to_pos are zero-based
indexes into the current visual ordering of the slots.
See also: -moveColFrom:to:, -moveRowFrom:to:
border:physicalToVisual: |
| - (void)border:(MiscBorderType)b |
| physicalToVisual:(MiscIntList*)list |
| This method converts all the values in list. It assumes that all the values in list represent physical (original) slot
indexes. It converts those values to their corresponding visual (current) values via -border:slotPosition:.
See also: -border:slotPosition:, -border:visualToPhysical:
border:selectSlot: |
| - (void)border:(MiscBorderType)b |
| selectSlot:(MiscCoord_P)slot |
| Selects the indicated slot. Does not clear the previous selection, so it is added to the existing selection.
See also:
border:selectSlots: |
| - (void)border:(MiscBorderType)b |
| selectSlots:(MiscIntList*)slots |
| Clears the selection, then selects each slot in slots, which should be a list of slot indexes.
See also: -border:selectedSlots:
border:selectTags: |
| - (void)border:(MiscBorderType)b |
| selectTags:(MiscIntList*)tags |
| Clears the selection, then selects all slots whose tag value can be found in tags. This method is useful in conjunction
with -border:selectedTags: to save and restore the user's selection when you have tag values that uniquely identify the
slots.
See also: -border:selectedTags:
border:selectedSlots: |
| - (void)border:(MiscBorderType)b |
| selectedSlots:(MiscIntList*)slots |
| Fills the list slots with the indexes of all currently selected slots. You are responsible for allocating the slots list, and
you are responsible for freeing it when you are finished with it.
See also: -border:selectSlots:
border:selectedTags: |
| - (void)border:(MiscBorderType)b |
| selectedTags:(MiscIntList*)tags |
| Fills the list tags with the tags of all currently selected slots. You are responsible for allocating and freeing the tags
list. This method is useful in conjunction with -border:selectTags: to save and restore the user's selection when you
have tags that uniquely identify the slots.
See also: -border:selectTags:
border:setAutoSortSlots: |
| - (void)border:(MiscBorderType)b |
| setAutoSortSlots:(BOOL)flag |
| Instructs the MiscTableScroll object whether or not to automatically sort the slots in border b, when the user drags a
slot from the other border. For example, when you tell the MiscTableScroll object to auto-sort rows, the rows will be
automatically sorted every time the user drags a column to a new position. AutoSort is off by default.
See also:
border:setCursor: |
| - (void)border:(MiscBorderType)b |
| setCursor:(MiscCoord_P)slot |
| Sets the keyboard cursor to slot.
See also:
border:setDraggableSlots: |
| - (void)border:(MiscBorderType)b |
| setDraggableSlots:(BOOL)flag |
| Enables or disables reordering of the slots. To let the user drag slots, the titles must be displayed, and the slots must be
draggable.
See also: -border:setModifierDragSlots:, -border:setSizeableSlots:, -border:setTitlesOn:, -setDraggableCols:, -setDraggableRows:
border:setMaxTotalSize: |
| - (void)border:(MiscBorderType)b |
| setMaxTotalSize:(NXCoord)size |
| Sets the maximum total size for border b. Whenever the normal total size of the border would be more than the
maximum total size, all autosize slots shrink proportionately until either the total size meets the global maximum limit,
or all autosize slots have shrunk to their minimum sizes. Local, slot-specific minimum sizes take precedence over the
global maximum size.
See also: -border:constrainMaxSize:, -border:setMinTotalSize:, -maxTotalSize:
border:setMinTotalSize: |
| - (void)border:(MiscBorderType)b |
| setMinTotalSize:(NXCoord)size |
| Sets the minimum total size for border b. Whenever the normal total size of the border would be less than the minimum
total size, all autosize slots grow proportionately until either the total size meets the global minimum limit, or all
autosize slots have grown to their maximum sizes. Local, slot-specific maximum sizes take precedence over the global
minimum size.
See also: -border:constrainMinSize:, -border:setMaxTotalSize:, -minTotalSize:
border:setModifierDragSlots: |
| - (void)border:(MiscBorderType)b |
| setModifierDragSlots:(BOOL)flag |
| This option controls whether a unmodified mouse-down initiates selection, or slot-dragging. When flag is YES, an
unmodified mouse-down initiates selection, and the user must hold down the command-key to drag a slot. When flag is
NO, an unmodified mouse-down initiates dragging, and the user must hold down the command-key to select a slot. By
default, columns are dragged with an unmodified mouse-down and selected when the command-key modifier is used.
By default, rows behave the other way; an unmodified mouse-down initiates selection, and a command-key modifier
must be used to initiate dragging.
See also: -setModifierDragCols:, -setModifierDragRows:
border:setSizeableSlots: |
| - (void)border:(MiscBorderType)b |
| setSizeableSlots:(BOOL)flag |
| Enables or disables user-sizing of the slots. Many conditions must be met to enable the user to resize a particular slot.
See Slot Sizing in the introduction for details.
See also: -setSizeableCols:, -setSizeableRows:
border:setSlot:autosize: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n autosize:(BOOL)flag |
| Enables or disables "autosizing" for a particular slot. When YES, the slot will be adjusted proportionately with all other
"autosize" slots in the border to meet global minimum or maximum size restrictions for the border as a whole.
Currently, this only has effect for columns in narrow tables displayed in wide ScrollViews. See Slot Sizing in the
introduction for more details.
See also: -setCol:autosize:, -setRow:autosize:
border:setSlot:cellPrototype: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n cellPrototype:cell |
| Set the cell prototype for a slot. Currently, only column cell prototypes are used. When new rows are allocated for the
table, the cell prototype from each column is sent a -copy message. The newly created cell is placed into the newly
created row. Thus all prototype cells must implement the -copy message appropriately. (They must make copies of all
components that are freed when the -free message is sent to the cell). The MiscTableScroll object takes "ownership"
of the prototype cell that is passed in. The caller must not free the prototype cell. The MiscTableScroll object will free
the prototype cell when it is finished with it.
See also: -border:setSlot:cellType:, -setCol:cellPrototype:, -setRow:cellPrototype:,
border:setSlot:cellType: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n cellType:(MiscTableCellStyle)t |
| Sets the type of cell that will be used for a particular slot. Currently, only column cell types have any effect; row cell types are ignored. The cell type, t, can be any of the following (declared in <MiscTableTypes.h>): |
MISC_TABLE_CELL_TEXT
MISC_TABLE_CELL_ICON
MISC_TABLE_CELL_BUTTON
MISC_TABLE_CELL_CALLBACK
| When this method is called, the MiscTableScroll object will create a prototype cell for the indicated slot of the
indicated type. MISC_TABLE_CELL_TEXT creates a text-cell; MISC_TABLE_CELL_ICON creates an icon-cell;
MISC_TABLE_CELL_BUTTON creates a button cell; and MISC_TABLE_CELL_CALLBACK instructs the MiscTableScroll
object to ask the delegate for the for the prototype cell. <???FIXME: What is the interaction with setting an explicit
prototype cell? What message is sent to the delegate to get the prototype? When is the message sent? Does it ask for
the cell itself, or just a prototype? Is it sent to the delegate, or the data-delegate?>
See also: -border:setSlot:cellPrototype:, -setCol:cellType:, -setRow:cellType:
border:setSlot:dataSize: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n dataSize:(NXCoord)size |
| No description.
See also:
border:setSlot:expandsToData: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n expandsToData:(BOOL)flag |
| Sets the "expands-to-data" flag for slot n. When flag is YES, the slot will expand as needed to accommodate the
largest entry in that slot. Only the "adjusted-size" of a slot is affected, and it can only be increased, never decreased.
Expansions resulting from expands-to-data will not exceed the maximum size for the slot. When flag is NO, no such
adjustment will be made. See Slot Sizing in the introduction for more details. <???FIXME: How is the largest size
determined? When does it get adjusted?>
See also: -setCol:expandsToData:, -setRow:expandsToData:
border:setSlot:maxSize: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n maxSize:(NXCoord)size |
| Sets the maximum size for slot n. The size argument is in units of screen pixels. <???FIXME: Check this.?> This limit
affects user resizing of slots; the "target" size for a slot, and automatic slot expansions performed to accommodate the
"expands-to-data" and "autosize" flags. See Slot Sizing in the introduction for more details.
See also: -setCol:maxSize:, -setRow:maxSize:
border:setSlot:minSize: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n minSize:(NXCoord)size |
| Sets the minimum size for slot n. The size argument is in units of screen pixels. <???FIXME: Check this.?> This limit
affects user resizing of slots, and acts as a limit on the "target size" for a slot. See Slot Sizing in the introduction for
more details.
See also: -setCol:minSize:, -setRow:minSize:
border:setSlot:size: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n size:(NXCoord)size |
| Sets the "target" size for slot n. The size argument is in units of screen pixels. <???FIXME: Check this.?> See Slot
Sizing in the introduction for more details.
See also: -setCol:size:, -setRow:size:
border:setSlot:sizeable: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n sizeable:(BOOL)flag |
| Sets the user-sizeable flag for slot n. When flag is YES, the user will be able to resize the slot. When flag is NO, the
user will not be able to resize the slot. There are many conditions which must be met for a user to be able to resize a
slot. See Slot Sizing in the introduction for more details.
See also: -setCol:sizeable:, -setRow:sizeable:
border:setSlot:sortDirection: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n sortDirection:(MiscSortDirection)x |
| Indicates whether slot n should be sorted in ascending or descending order. X must be one of the following two values from <MiscTableTypes.h>: |
MISC_SORT_ASCENDING
MISC_SORT_DESCENDING
| All other values are ignored.
See also: -border:setSlot:sortType:, -border:setSlot:sortFunc:, -border:slotSortDirection:
border:setSlot:sortFunc: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n sortFunc:(MiscCompareEntryFunc)func |
| Makes func the cell-to-cell comparison routine for the cells in slot n. The function, func, must match the following prototype from <MiscTableTypes.h>. |
typedef int (*MiscCompareEntryFunc)( int r1, int c1, int r2, int c2, MiscSlotSortInfo* info );
| The function is given the coordinates of the two cells, and a pointer to a structure containing additional sorting
information. The function should return an integer that is: (a) less than zero if the cell at (r1,c1) should sort before the
cell at (r2,c2), (b) equal to zero if the two cells should sort equally, or (c) greater than zero if the cell at (r1,c1) should
sort after the cell at (r2,c2).
The sort direction (ascending or descending) is applied to the value returned by the cell-to-cell comparison function by the slot-to-slot comparison function. So if you supply a custom cell-to-cell comparison function you should ignore the sort direction for that slot. You should always return the "ascending" sort-order value. Use this method when you need to perform custom sorting that the builtin sort-types cannot accommodate. See also: -border:setSlot:sortDirection:, -border:setSlot:sortType:, -border:slotSortFunc:
border:setSlot:sortType: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n sortType:(MiscSortType)x |
| Sets the type of sorting to be used by the builtin cell-to-cell comparison function for cells in slot n. The sort type, x, must be one of the following values from <MiscTableTypes.h>: |
MISC_SORT_STRING_CASE_INSENSITIVE
MISC_SORT_STRING_CASE_SENSITIVE
MISC_SORT_INT
MISC_SORT_UNSIGNED_INT
MISC_SORT_TAG
MISC_SORT_UNSIGNED_TAG
MISC_SORT_FLOAT
MISC_SORT_DOUBLE
MISC_SORT_SKIP
MISC_SORT_TITLE_CASE_INSENSITIVE
MISC_SORT_TITLE_CASE_SENSITIVE
MISC_SORT_STATE
MISC_SORT_UNSIGNED_STATE
| All other values are ignored. Each of the types is described below. |
MISC_SORT_STRING_CASE_INSENSITIVE
MISC_SORT_STRING_CASE_SENSITIVE
| The cells are compared as strings. The string values are retrieved using the -stringValueAt::. MISC_SORT_STRING_CASE_INSENSITIVE is the default sort-type. |
MISC_SORT_INT
MISC_SORT_UNSIGNED_INT
| The cells are compared as integers. The integer values are retrieved using the -intValueAt:: message. |
MISC_SORT_TAG
MISC_SORT_UNSIGNED_TAG
| The cells are compared as integers. The integer values are retrieved using the -tagAt:: message. This feature is useful for sorting that is handled "behind-the-scenes". For example, if the slot holds date information, you can put the UNIX time_t date value into the cell tag, and format the string value any way you wish. The slot will sort correctly regardless of the display format. It is also useful for slots that hold keywords from an ordered set of values, like the following enumeration: |
enum Severity { Notice, Warning, Error, Fatal };
| Sorting these alphabetically does not make sense, but if you put the enum value into the tag of the cell, you can sort them correctly. This sort type also makes it possible to sort slots that hold icons. |
MISC_SORT_FLOAT
| The cells are compared as single-precision floating point numbers. The values are retrieved using the -floatValueAt:: message. |
MISC_SORT_DOUBLE
| The cells are compared as double-precision floating point numbers. The values are retrieved using the -doubleValueAt:: message. |
MISC_SORT_SKIP
| The cells are not compared. All cells in slots with the MISC_SORT_SKIP sort-type are considered equal. This can be used for slots that should not affect the sorting. |
MISC_SORT_TITLE_CASE_INSENSITIVE
MISC_SORT_TITLE_CASE_SENSITIVE
| The cells are compared as strings. The string values are retrieved using the -titleAt::. This is provided to support ButtonCells. |
MISC_SORT_STATE
MISC_SORT_UNSIGNED_STATE
| The cells are compared as integers. The integer values are retrieved using the -stateAt:: message. This is provided to support ButtonCells. |
| See also: -border:setSlot:sortDirection:, -border:setSlot:sortFunc:, -border:slotSortType:
border:setSlot:tag: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n tag:(int)tag |
| Sets the tag for slot n to tag.
See also: -setCol:tag:, -setRow:tag:
border:setSlot:title: |
| - (void)border:(MiscBorderType)b |
| setSlot:(int)n title:(char const*)title |
| Sets the title for slot n to title. This method only works for borders with custom titles (that is, -border:b
setTitleMode:MISC_CUSTOM_TITLE). If the border does not have custom titles, the request is silently ignored. If the
border does have custom titles, the MiscTableScroll object will make a private copy of the title string, and update the
display if autodisplay is on.
See also: -border:setTitleMode:, -setCol:title:, -setRow:title:
border:setSlotOrder: |
| - border:(MiscBorderType)b |
| setSlotOrder:(MiscIntList*)list |
| Rearranges the slots to match the order specified by list. The list is organized in the original (physical) order of the
slots. Each value in the list is the new (visual) position for the corresponding slot. In other words, list is a physical to
visual mapping. This is useful for restoring the user's slot-order preference.
See also: -border:setSlotOrderFromString:, -border:setSlotSizes:, -border:slotOrder:
border:setSlotOrderFromString: |
| - border:(MiscBorderType)b |
| setSlotOrderFromString:(char const*)s |
| This is a convenience method which invokes -border:setSlotOrder: using an MiscIntList constructed from s.
See also: -border:setSlotOrder:, -border:setSlotSizes:, -border:slotOrder:, -initFromString: (MiscIntList), -readFromString: (MiscIntList)
border:setSlotSizes: |
| - border:(MiscBorderType)b |
| setSlotSizes:(MiscIntList*)list |
| Sets the sizes of all slots to the values in list. List is organized in original (physical) slot order. Each value is the size
of the corresponding slot. This method is useful for restoring the user's slot size preferences.
See also: -border:setSlotOrder:, -border:setSlotSizesFromString:, -border:slotSizes:
border:setSlotSizesFromString: |
| - border:(MiscBorderType)b |
| setSlotSizesFromString:(char const*)s |
| This is a convenience method which invokes -border:setSlotSizes: using an MiscIntList constructed from s.
See also: -border:setSlotOrder:, -border:setSlotSizes:, -border:slotSizes:, -initFromString: (MiscIntList), -readFromString: (MiscIntList)
border:setSlotSortVector:len: |
| - (void)border:(MiscBorderType)b |
| setSlotSortVector:(int const*)v len:(int)n |
| Sets the order in which slots are considered when sorting. Each value in v is the original (physical) position of a slot.
The slots will be compared in the order that they appear in v. Negative values reverse the sort direction (ascending /
descending) of the corresponding slot. The current visual slot order is used by default; use this method if that is not
what you want.
See also: -slotSortVector:len:
border:setTitleMode: |
| - (void)border:(MiscBorderType)b |
| setTitleMode:(MiscTableTitleMode)x |
| Sets the title-mode for a border. The title-mode, x, can be any of the following (declared in <MiscTableTypes.h>): |
MISC_NO_TITLE, // No titles on row/col cells.
MISC_NUMBER_TITLE, // Titles are sequential numbers.
MISC_ALPHA_TITLE, // Titles are sequential alphabetics...
MISC_CUSTOM_TITLE, // Titles are user-supplied strings...
MISC_DELEGATE_TITLE // Ask the delegate for titles.
| See also: -setColTitleMode:, -setRowTitleMode:, -tableScroll:border:slotTitle: (delegate method)
border:setTitlesOn: |
| - (BOOL)border:(MiscBorderType)b |
| setTitlesOn:(BOOL)on_off |
| Determines whether titles will be displayed or not. When on_off is YES, the titles will be displayed. When on_off is
NO, the titles will not be displayed. The titles must be displayed to let the user resize and drag slots. See Slot Sizing
in the introduction for more details.
See also: -setColTitlesOn: -setRowTitlesOn:
border:setUniformSizeSlots: |
| - (void)border:(MiscBorderType)b |
| setUniformSizeSlots:(NXCoord)uniform_size |
| Sets or clears the uniform-size for a border. If uniform_size is zero, then each slot on that border will be able to have
individually varying sizes. If uniform_size is non-zero, then every slot on that border will have the size, uniform_size.
When the slots on a border have a uniform size, the user will not be able to resize the slots. See Slot Sizing in the
introduction for more details.
See also: -setUniformSizeCols:, -setUniformSizeRows:
border:slotAdjustedSize: |
| - (NXCoord)border:(MiscBorderType)b |
| slotAdjustedSize:(int)slot |
| Returns the current display size of slot.
See also:
border:slotAtPosition: |
| - (int)border:(MiscBorderType)b |
| slotAtPosition:(int)pos |
| Returns the original physical position of the slot in visual position pos. This is the visual-to-physical conversion routine.
See also: -border:moveSlotFrom:to:, -border:slotPosition:, -colAtPosition:, -rowAtPosition:
border:slotCellPrototype: |
| - border:(MiscBorderType)b |
| slotCellPrototype:(int)slot |
| Returns the cell prototype for slot.
See also: -border:setSlot:cellPrototype:, -border:setSlot:cellType:, -colCellPrototype:, -rowCellPrototype:
border:slotCellType: |
| - (MiscTableCellStyle)border:(MiscBorderType)b |
| slotCellType:(int)slot |
| Returns the cell type for slot.
See also: -border:setSlot:cellPrototype:, -border:setSlot:cellType:, -colCellType:, -rowCellType:
border:slotDataSize: |
| - (NXCoord)border:(MiscBorderType)b |
| slotDataSize:(int)slot |
| No description.
See also:
border:slotDraggedFrom:to: |
| - (void)border:(MiscBorderType)b |
| slotDraggedFrom:(int)from_pos to:(int)to_pos |
| Internal method, invoked whenever the user drags a slot to a new position.
border:slotExpandsToData: |
| - (BOOL)border:(MiscBorderType)b |
| slotExpandsToData:(int)slot |
| Returns the state of the expands-to-data flag for slot. See Slot Sizing in the introduction for more details.
See also: -border:setSlot:expandsToData:, -colExpandsToData:, -rowExpandsToData:
border:slotIsAutosize: |
| - (BOOL)border:(MiscBorderType)b |
| slotIsAutosize:(int)slot |
| Returns the state of the autosize flag for slot. See Slot Sizing in the introduction for more details.
See also: -border:setSlot:autosize:, -colIsAutosize:, -rowIsAutosize:
border:slotIsSelected: |
| - (BOOL)border:(MiscBorderType)b |
| slotIsSelected:(MiscCoord_P)slot |
| Returns YES if slot is selected, else NO.
See also:
border:slotIsSizeable: |
| - (BOOL)border:(MiscBorderType)b |
| slotIsSizeable:(int)slot |
| Returns the state of the user-sizeable flag for slot. See Slot Sizing in the introduction for more details.
See also: -border:setSlot:sizeable:, -colIsSizeable:, -rowIsSizeable:
border:slotIsSorted: |
| - (BOOL)border:(MiscBorderType)b |
| slotIsSorted:(int)slot |
| This method compares slot with its neighbors. It returns YES if these slots are sorted relative to each other. It returns
NO if any of these slots are out of order with respect to the others. This method can be useful for determining whether
or not the table must be resorted when you are changing values in the table.
See also: -border:sortSlot:, -slotsAreSorted:
border:slotMaxSize: |
| - (NXCoord)border:(MiscBorderType)b |
| slotMaxSize:(int)slot |
| Returns the maximum size for slot. See Slot Sizing in the introduction for more details.
See also: -border:setSlot:maxSize:, -colMaxSize:, -rowMaxSize:
border:slotMinSize: |
| - (NXCoord)border:(MiscBorderType)b |
| slotMinSize:(int)slot |
| Returns the minimum size for slot. See Slot Sizing in the introduction for more details.
See also: -border:setSlot:minSize:, -colMinSize:, -rowMinSize:
border:slotOrder: |
| - border:(MiscBorderType)b |
| slotOrder:(MiscIntList*)list |
| Puts the current slot order into list. The list is organized in original (physical) slot order. Each value in the list is the
current (visual) position of the corresponding slot. In other words, list, is filled with the physical to visual mapping.
This method is useful for saving the user's slot order preference. You are responsible for allocating and freeing list.
See also: -border:setSlotOrder:, -border:setSlotSizes:, -border:slotOrderAsString:size:canExpand:
border:slotOrderAsString:size:canExpand: |
| - (char*)border:(MiscBorderType)b |
| slotOrderAsString:(char*)buff size:(int)buff_size canExpand:(BOOL)canExpand |
| Calls -border:slotOrder: with a temporary MiscIntList object, then sends it the -writeToString:size:canExpand:
message, with the values provided by the caller.
See also: -border:setSlotOrder:, -border:slotOrder:, -writeToString:size:canExpand: (MiscIntList)
border:slotPosition: |
| - (int)border:(MiscBorderType)b |
| slotPosition:(int)slot |
| Returns the current visual position of the slot whose original physical position was slot. This is the physical-to-visual
conversion routine.
See also: -border:moveSlotFrom:to:, -border:slotAtPosition:, -colPosition:, -rowPosition:
border:slotResized: |
| - (void)border:(MiscBorderType)b |
| slotResized:(int)n |
| Internal method called whenever the user resizes a slot.
border:slotSize: |
| - (NXCoord)border:(MiscBorderType)b |
| slotSize:(int)slot |
| Returns the target size for slot. See Slot Sizing in the introduction for more details.
See also: -border:setSlot:size:, -setCol:size:, -setRow:size:
border:slotSizes: |
| - border:(MiscBorderType)b |
| slotSizes:(MiscIntList*)list |
| Fills list with the sizes of all the slots. The list is organized in original (physical) slot order. The values are the sizes of
the correspond slot. This method is useful for saving the user's slot size preferences.
See also: -border:setSlotSizes:, -border:slotOrder:, -border:slotSizesAsString:size:canExpand:
border:slotSizesAsString:size:canExpand: |
| - (char*)border:(MiscBorderType)b |
| slotSizesAsString:(char*)buff size:(int)buff_size canExpand:(BOOL)canExpand |
| Calls -border:slotSizes: with a temporary MiscIntList object, then sends it the -writeToString:size:canExpand:
message, with the values provided by the caller.
See also: -border:slotSizes:, -writeToString:size:canExpand: (MiscIntList)
border:slotSortDirection: |
| - (MiscSortDirection)border:(MiscBorderType)b |
| slotSortDirection:(int)n |
| Returns the sort direction (ascending or descending) for slot n.
See also: -border:setSlot:sortDirection:
border:slotSortFunc: |
| - (MiscCompareEntryFunc)border:(MiscBorderType)b |
| slotSortFunc:(int)n |
| Returns the custom sort function for slot n, if any, otherwise it returns 0.
See also: -border:setSlot:sortFunc:
border:slotSortType: |
| - (MiscSortType)border:(MiscBorderType)b |
| slotSortType:(int)n |
| Returns the sort type of slot n.
See also: -border:setSlot:sortType:
border:slotTag: |
| - (int)border:(MiscBorderType)b |
| slotTag:(int)slot |
| Returns the tag value associated with slot.
See also: -border:setSlot:tag:, -colTag:, -rowTag:
border:slotTitle: |
| - (char const*)border:(MiscBorderType)b |
| slotTitle:(int)slot |
| Returns the title for slot.
See also: -border:setSlot:title:, -colTitle:, -rowTitle:
border:sortSlot: |
| - (BOOL)border:(MiscBorderType)b |
| sortSlot:(int)slot |
| Re-sorts a single slot. This method can be used to restore the sort order after a single slot has been added or changed in
such a way that it might not be in the correct sort position. The results are unpredictable if the other slots are not
already sorted.
See also: -sortSlots:, -sortCol:, -sortRow:
border:visualToPhysical: |
| - (void)border:(MiscBorderType)b |
| visualToPhysical:(MiscIntList*)list |
| Converts a list of current (visual) slot positions to their original (physical) positions.
See also: -border:slotAtPosition:, -border:slotPosition:
borderClearCursor: |
| - (void)borderClearCursor:(MiscBorderType)b |
| Turns off the keyboard cursor.
See also:
borderClearSelection: |
| - (void)borderClearSelection:(MiscBorderType)b |
| Unselects all slots that were selected.
See also:
borderCursor: |
| - (MiscCoord_P)borderCursor:(MiscBorderType)b |
| Returns the index of the slot that the keyboard cursor is currently on, or -1 if the keyboard cursor is not on any slot.
See also:
borderHasMultipleSelection: |
| - (BOOL)borderHasMultipleSelection:(MiscBorderType)b |
| Returns YES if more than one slot is selected, otherwise NO.
See also:
borderHasSelection: |
| - (BOOL)borderHasSelection:(MiscBorderType)b |
| Returns YES if at least one slot is selected, otherwise NO.
See also:
borderHasValidCursor: |
| - (BOOL)borderHasValidCursor:(MiscBorderType)b |
| Returns YES if the keyboard cursor is positioned on a valid slot, otherwise NO.
See also:
borderNumSelectedSlots: |