ui
tkui
MTableModel
MTableModel.ui::TableModel
alignViewPixelOffsetY(int moveDir)
- Align first resp. last row to border (depending on move direction).
calcMinimumWidth() : int
- Return the minimum width (sum of all columns)
calcPreferredColumnWidths()
-
calcPreferredColumnWidthsByCaption()
-
calcRowPixelYOffsets() : int
-
calcViewOffsetY(int dir)
-
centerRow()
- Adjust scroll offset so that the currently selected row is shown centered
compareCells(int col, rowA, rowB) : int
- Compare cell values and return -1 if _rowA precedes _rowB, 1 if _rowB precedes _rowA and 0 if the cell values are equal. Used by the table sorter. The default behaviour is to compare the cell string values. In case a column stores e.g. a timestamp you may want to implement a custom comparison.
decVisibleCursorIndex()
-
editColumnAtX(float x) : int
-
getCellCaption(int col, row) : String
- Return string representation of the respective cell value. Used in conjunction with the default cell renderer and the default @compareCells implementation.
getCellEditor(int col, row) : ui::TableCellEditor
- Return custom cell editor or null (= cell not editable). The returned editor will be displayed in a frameless modal dialog. If a value has been entered (and the editor was not canceled) the setCellValue() method will be called with the new value.
getCellIcon(int col, row) : ui::Icon
- Return icon for the respective cell value. Used in conjunction with the default cell renderer. Must return null if the cell has no icon.
getCellPosition(int col, row, ui::Point2f ret)
-
getCellRenderer(int col, row, visibleRow) : ui::Layer
- Return cell renderer layer. The cell renderer should have been updated with the current cell value before it is returned. The geometry of the renderer will be set by the caller. The default behaviour is to call @getCellCaption and @getCellIconName and use a Label to display the cell content.
getCellToolTipCaption(int col, row) : String
-
getColumnAtX(float x) : int
-
getColumnCaption(int col) : String
- Return the caption for the given column.
getColumnIcon(int col) : String
- Return the icon name for the given column. Must return null if the column has no icon.
getColumnWidth(int col) : int
- Return the column width (pixels). Used for the column header and to calculate cell positions.
getContextMenuOffsetX(int bKeyboard) : int
-
getContextMenuOffsetY(int bKeyboard) : int
-
getCursorIndex() : int
-
getDataSizeY() : int
- Return height of table data view (pixels).
getFirstVisibleRowHeight() : int
-
getFirstVisibleRowNr() : int
-
getLastVisibleRowHeight() : int
-
getLastVisibleRowNr() : int
-
getLeadSelection() : int
-
getMaximumColumnWidth(int col) : int
- Used to limit the column width to a sane value when the user resizes a column.
getMinimumColumnWidth(int col) : int
- Used to limit the column width to a sane value when the user resizes a column.
getNumColumns() : int
- Return the number of columns
getNumRows() : int
- Return the number of data rows.
getPreferredColumnWidth(int col) : int
- Return the preferred colum width (relative pixels). When layouting the column header, the effective column width is calculated by adding all preferred column widths to get the 100% width and then using the preferred column width of a single column as a weight relative to the current table width.
getRowHeight(int row) : int
- Return the height (in pixels) of the given row. Used to calculate the cell position. _row must be a model space row number.
getRowPixelOffsetY(int row) : int
-
getSortedRowNr(int viewNr) : int
- Map visible row number to model row number. If the row cannot be mapped, -1 is returned.
getTotalHeight() : int
- Return the height (in pixels) of all rows.
getTotalWidth() : int
- Return the width (in pixels) of all columns.
getUnsortedRowNr(int rowNr) : int
- Map model row number to visible row number.
getViewPixelOffsetY() : int
-
getVisibleRowNrAtY(int py) : int
-
handleCellEdited(ui::TableCellEditor tce)
- Can be used to retrieve the final editor value (value changed)
handleCellEditing(ui::TableCellEditor tce)
- Can be used to retrieve the current editor value (value changing)
handleCellOnMouse(int col, row, ui::MouseEvent ev) : int
- Can be used to implement in-place cell editing.
handleCursorIndexChanged()
-
handleRowClick(int bFoldHint) : int
- May be overwritten by derived classes to internally handle row clicks.
hasDataViewKeyboardFocus() : int
-
incVisibleCursorIndex()
-
initTableModel()
-
layoutColumns(int totalX)
-
selectNone()
- Deselect all rows
setColumnWidth(int col, width)
- Called when the user has resized a column.
setCursorIndex(int index)
-
setCursorIndexByPixel(float py)
-
setCursorIndexToFirstRow()
-
setCursorIndexToLastRow()
-
setLeadSelection(int leadIndex)
-
setPrimarySortColumn(int col)
-
setSecondarySortColumn(int col)
-
setViewPixelOffsetY(int y)
-
sortRows()
- Sort rows by primary/secondary columns. This method will use @compareCells to build the sorted_rows array.
tableModelChanged()
-
updateCellRendererLabelColor(ui::Label lb, int col, row, visibleRow)
- int
MINIMUM_ROW_HEIGHT
-
Method alignViewPixelOffsetY | |||||
Align first resp. last row to border (depending on move direction). | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method calcMinimumWidth | |||||
Return the minimum width (sum of all columns) | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method calcPreferredColumnWidths | |||
Signature | |||
|
Method calcPreferredColumnWidthsByCaption | |||
Signature | |||
|
Method calcRowPixelYOffsets | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method calcViewOffsetY | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method centerRow | |||
Adjust scroll offset so that the currently selected row is shown centered | |||
Signature | |||
|
Method compareCells | |||||||||||||||||||||||||
Compare cell values and return -1 if _rowA precedes _rowB, 1 if _rowB precedes _rowA and 0 if the cell values are equal. Used by the table sorter. The default behaviour is to compare the cell string values. In case a column stores e.g. a timestamp you may want to implement a custom comparison. | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Returns | |||||||||||||||||||||||||
|
Method decVisibleCursorIndex | |||
Signature | |||
|
Method editColumnAtX | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getCellCaption | ||||||||||||||||||||
Return string representation of the respective cell value. Used in conjunction with the default cell renderer and the default @compareCells implementation. | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Returns | ||||||||||||||||||||
Method getCellEditor | ||||||||||||||||||||
Return custom cell editor or null (= cell not editable). The returned editor will be displayed in a frameless modal dialog. If a value has been entered (and the editor was not canceled) the setCellValue() method will be called with the new value. | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Returns | ||||||||||||||||||||
Method getCellIcon | ||||||||||||||||||||
Return icon for the respective cell value. Used in conjunction with the default cell renderer. Must return null if the cell has no icon. | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Returns | ||||||||||||||||||||
Method getCellPosition | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method getCellRenderer | |||||||||||||||||||||||||
Return cell renderer layer. The cell renderer should have been updated with the current cell value before it is returned. The geometry of the renderer will be set by the caller. The default behaviour is to call @getCellCaption and @getCellIconName and use a Label to display the cell content. | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Returns | |||||||||||||||||||||||||
Method getCellToolTipCaption | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Returns | ||||||||||||||||||||
Method getColumnAtX | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getColumnCaption | ||||||||||
Return the caption for the given column. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
Method getColumnIcon | ||||||||||
Return the icon name for the given column. Must return null if the column has no icon. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
Method getColumnWidth | ||||||||||
Return the column width (pixels). Used for the column header and to calculate cell positions. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getContextMenuOffsetX | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getContextMenuOffsetY | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getCursorIndex | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getDataSizeY | |||||
Return height of table data view (pixels). | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getFirstVisibleRowHeight | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getFirstVisibleRowNr | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getLastVisibleRowHeight | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getLastVisibleRowNr | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getLeadSelection | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getMaximumColumnWidth | ||||||||||
Used to limit the column width to a sane value when the user resizes a column. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getMinimumColumnWidth | ||||||||||
Used to limit the column width to a sane value when the user resizes a column. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getNumColumns | |||||
Return the number of columns | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getNumRows | |||||
Return the number of data rows. | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getPreferredColumnWidth | ||||||||||
Return the preferred colum width (relative pixels). When layouting the column header, the effective column width is calculated by adding all preferred column widths to get the 100% width and then using the preferred column width of a single column as a weight relative to the current table width. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getRowHeight | ||||||||||
Return the height (in pixels) of the given row. Used to calculate the cell position. _row must be a model space row number. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getRowPixelOffsetY | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getSortedRowNr | ||||||||||
Map visible row number to model row number. If the row cannot be mapped, -1 is returned. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getTotalHeight | |||||
Return the height (in pixels) of all rows. | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getTotalWidth | |||||
Return the width (in pixels) of all columns. | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getUnsortedRowNr | ||||||||||
Map model row number to visible row number. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getViewPixelOffsetY | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getVisibleRowNrAtY | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method handleCellEdited | |||||
Can be used to retrieve the final editor value (value changed) | |||||
Signature | |||||
| |||||
Arguments | |||||
Method handleCellEditing | |||||
Can be used to retrieve the current editor value (value changing) | |||||
Signature | |||||
| |||||
Arguments | |||||
Method handleCellOnMouse | |||||||||||||||||||||||||
Can be used to implement in-place cell editing. | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Returns | |||||||||||||||||||||||||
|
Method handleCursorIndexChanged | |||
Signature | |||
|
Method handleRowClick | ||||||||||
May be overwritten by derived classes to internally handle row clicks. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method hasDataViewKeyboardFocus | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method incVisibleCursorIndex | |||
Signature | |||
|
Method initTableModel | |||
Signature | |||
|
Method layoutColumns | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method selectNone | |||
Deselect all rows | |||
Signature | |||
|
Method setColumnWidth | |||||||||||||||
Called when the user has resized a column. | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method setCursorIndex | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setCursorIndexByPixel | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setCursorIndexToFirstRow | |||
Signature | |||
|
Method setCursorIndexToLastRow | |||
Signature | |||
|
Method setLeadSelection | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setPrimarySortColumn | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setSecondarySortColumn | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setViewPixelOffsetY | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method sortRows | |||
Sort rows by primary/secondary columns. This method will use @compareCells to build the sorted_rows array. | |||
Signature | |||
|
Method tableModelChanged | |||
Signature | |||
|
Method updateCellRendererLabelColor | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
|
Constant MINIMUM_ROW_HEIGHT (int) | |
auto-generated by "DOG", the TkScript document generator. Mon, 28/Dec/2015 14:27:06