→ index of namespace ui
 
→ index of project ui
 
→ index of module MTableModel

Class MTableModel.ui::TableModel


Synopsis: A TableModel is assigned to exactly one TableView. TableModels are used to query cell attributes like values, renderers and editors.

  Derived classes:
  Methods:
  Constants:

Method alignViewPixelOffsetY
Align first resp. last row to border (depending on move direction).
Signature
alignViewPixelOffsetY(intmoveDir)
Arguments
intmoveDir–

 
→ top of page
Method calcAbsCellPosition
Signature
calcAbsCellPosition(intcol,
  introw,
  Point2fret 
  )  
Arguments
intcol–
introw–
Point2fret–

 
→ top of page
Method calcMinimumWidth
Return the minimum width (sum of all columns)
Signature
calcMinimumWidth():int
Returns
int–

 
→ top of page
Method calcPreferredColumnWidths
Signature
calcPreferredColumnWidths()

 
→ top of page
Method calcPreferredColumnWidthsByCaption
Signature
calcPreferredColumnWidthsByCaption()

 
→ top of page
Method calcRowPixelYOffsets
Signature
calcRowPixelYOffsets():int
Returns
int–

 
→ top of page
Method calcViewOffsetY
Signature
calcViewOffsetY(intdir)
Arguments
intdir–

 
→ top of page
Method canDropObject
Signature
canDropObject(ObjectdragObject,
  introw 
  )  
 :int
Arguments
ObjectdragObject–
introw–
Returns
int–

 
→ top of page
Method centerRow
Adjust scroll offset so that the currently selected row is shown centered
Signature
centerRow()

 
→ top of page
Method cloneLookAndFeelColors
Signature
cloneLookAndFeelColors():IntArray
Returns

 
→ top of page
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
compareCells(intcol,
  introwA,
  introwB 
  )  
 :int
Arguments
intcol–
introwA–
introwB–
Returns
int–

 
→ top of page
Method decVisibleCursorIndex
Signature
decVisibleCursorIndex()

 
→ top of page
Method deselectRow
Signature
deselectRow(introw)
 :int
Arguments
introw–
Returns
int–

 
→ top of page
Method editColumn
Signature
editColumn(intcolNr,
  introwNr 
  )  
 :int
Arguments
intcolNr–
introwNr–
Returns
int–

 
→ top of page
Method editColumnAtX
Signature
editColumnAtX(floatx)
 :int
Arguments
floatx–
Returns
int–

 
→ top of page
Method editColumnNextRow
Signature
editColumnNextRow()

 
→ top of page
Method editColumnPreviousRow
Signature
editColumnPreviousRow()

 
→ top of page
Method getCellCaption
Return string representation of the respective cell value. Used in conjunction with the default cell renderer and the default @compareCells implementation.
Signature
getCellCaption(intcol,
  introw 
  )  
 :String
Arguments
intcol–
introw–
Returns
String–

 
→ top of page
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
getCellEditor(intcol,
  introw 
  )  
 :ui::TableCellEditor
Arguments
intcol–
introw–
Returns

 
→ top of page
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
getCellIcon(intcol,
  introw 
  )  
 :ui::Icon
Arguments
intcol–
introw–
Returns

 
→ top of page
Method getCellPosition
Signature
getCellPosition(intcol,
  introw,
  Point2fret 
  )  
Arguments
intcol–
introw–
Point2fret–

 
→ top of page
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
getCellRenderer(intcol,
  introw,
  intvisibleRow 
  )  
 :ui::Layer
Arguments
intcol–
introw–
intvisibleRow–
Returns

 
→ top of page
Method getCellSize
Signature
getCellSize(intcol,
  introw,
  Point2fret 
  )  
Arguments
intcol–
introw–
Point2fret–

 
→ top of page
Method getCellToolTipCaption
Signature
getCellToolTipCaption(intcol,
  introw 
  )  
 :String
Arguments
intcol–
introw–
Returns
String–

 
→ top of page
Method getColumnAtX
Signature
getColumnAtX(floatx)
 :int
Arguments
floatx–
Returns
int–

 
→ top of page
Method getColumnCaption
Return the caption for the given column.
Signature
getColumnCaption(intcol)
 :String
Arguments
intcol–
Returns
String–

 
→ top of page
Method getColumnIcon
Return the icon name for the given column. Must return null if the column has no icon.
Signature
getColumnIcon(intcol)
 :String
Arguments
intcol–
Returns
String–

 
→ top of page
Method getColumnWidth
Return the column width (pixels). Used for the column header and to calculate cell positions.
Signature
getColumnWidth(intcol)
 :int
Arguments
intcol–
Returns
int–

 
→ top of page
Method getContextMenuOffsetX
Signature
getContextMenuOffsetX(intbKeyboard)
 :int
Arguments
intbKeyboard–
Returns
int–

 
→ top of page
Method getContextMenuOffsetY
Signature
getContextMenuOffsetY(intbKeyboard)
 :int
Arguments
intbKeyboard–
Returns
int–

 
→ top of page
Method getCursorIndex
Signature
getCursorIndex():int
Returns
int–

 
→ top of page
Method getDataSizeY
Return height of table data view (pixels).
Signature
getDataSizeY():int
Returns
int–

 
→ top of page
Method getDragObject
Signature
getDragObject(introw)
 :Object
Arguments
introw–
Returns
Object–

 
→ top of page
Method getFirstSelectedRow
Signature
getFirstSelectedRow():int
Returns
int–

 
→ top of page
Method getFirstVisibleRowHeight
Signature
getFirstVisibleRowHeight():int
Returns
int–

 
→ top of page
Method getFirstVisibleRowNr
Signature
getFirstVisibleRowNr():int
Returns
int–

 
→ top of page
Method getLastSelectedRow
Signature
getLastSelectedRow():int
Returns
int–

 
→ top of page
Method getLastVisibleRowHeight
Signature
getLastVisibleRowHeight():int
Returns
int–

 
→ top of page
Method getLastVisibleRowNr
Signature
getLastVisibleRowNr():int
Returns
int–

 
→ top of page
Method getLeadSelection
Signature
getLeadSelection():int
Returns
int–

 
→ top of page
Method getMaximumColumnWidth
Used to limit the column width to a sane value when the user resizes a column.
Signature
getMaximumColumnWidth(intcol)
 :int
Arguments
intcol–
Returns
int–

 
→ top of page
Method getMaximumColumnWidthScaled
Signature
getMaximumColumnWidthScaled(intcol)
 :int
Arguments
intcol–
Returns
int–

 
→ top of page
Method getMinimumColumnWidth
Used to limit the column width to a sane value when the user resizes a column.
Signature
getMinimumColumnWidth(intcol)
 :int
Arguments
intcol–
Returns
int–

 
→ top of page
Method getMinimumColumnWidthScaled
Signature
getMinimumColumnWidthScaled(intcol)
 :int
Arguments
intcol–
Returns
int–

 
→ top of page
Method getNumColumns
Return the number of columns
Signature
getNumColumns():int
Returns
int–

 
→ top of page
Method getNumRows
Return the number of data rows.
Signature
getNumRows():int
Returns
int–

 
→ top of page
Method getNumSelectedRows
Signature
getNumSelectedRows():int
Returns
int–

 
→ top of page
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
getPreferredColumnWidth(intcol)
 :int
Arguments
intcol–
Returns
int–

 
→ top of page
Method getPreferredColumnWidthScaled
Signature
getPreferredColumnWidthScaled(intcol)
 :int
Arguments
intcol–
Returns
int–

 
→ top of page
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
getRowHeight(introw)
 :int
Arguments
introw–
Returns
int–

 
→ top of page
Method getRowPixelOffsetY
Signature
getRowPixelOffsetY(introw)
 :int
Arguments
introw–
Returns
int–

 
→ top of page
Method getSelectedRows
Signature
getSelectedRows():IntArray
Returns

 
→ top of page
Method getSelectedRowsIncludingCursor
Signature
getSelectedRowsIncludingCursor():IntArray
Returns

 
→ top of page
Method getSortedRowNr
Map visible row number to model row number. If the row cannot be mapped, -1 is returned.
Signature
getSortedRowNr(intviewNr)
 :int
Arguments
intviewNr–
Returns
int–

 
→ top of page
Method getTotalHeight
Return the height (in pixels) of all rows.
Signature
getTotalHeight():int
Returns
int–

 
→ top of page
Method getTotalWidth
Return the width (in pixels) of all columns.
Signature
getTotalWidth():int
Returns
int–

 
→ top of page
Method getUnsortedRowNr
Map model row number to visible row number.
Signature
getUnsortedRowNr(introwNr)
 :int
Arguments
introwNr–
Returns
int–

 
→ top of page
Method getViewPixelOffsetY
Signature
getViewPixelOffsetY():int
Returns
int–

 
→ top of page
Method getVisibleRowNrAtY
Signature
getVisibleRowNrAtY(intpy)
 :int
Arguments
intpy–
Returns
int–

 
→ top of page
Method handleCellEdited
Can be used to retrieve the final editor value (value changed)
Signature
handleCellEdited(ui::TableCellEditortce)
Arguments

 
→ top of page
Method handleCellEditing
Can be used to retrieve the current editor value (value changing)
Signature
handleCellEditing(ui::TableCellEditortce)
Arguments

 
→ top of page
Method handleCellOnMouse
Can be used to implement in-place cell editing.
Signature
handleCellOnMouse(intcol,
  introw,
  ui::MouseEventev 
  )  
 :int
Arguments
intcol–
introw–
ui::MouseEventev–
Returns
int–

 
→ top of page
Method handleCursorIndexChanged
Signature
handleCursorIndexChanged()

 
→ top of page
Method handleRowClick
May be overwritten by derived classes to internally handle row clicks.
Signature
handleRowClick(intbFoldHint)
 :int
Arguments
intbFoldHint–
Returns
int–

 
→ top of page
Method hasDataViewKeyboardFocus
Signature
hasDataViewKeyboardFocus():int
Returns
int–

 
→ top of page
Method incVisibleCursorIndex
Signature
incVisibleCursorIndex()

 
→ top of page
Method initCheckBox
Signature
initCheckBox(ui::CheckBoxcb)
Arguments

 
→ top of page
Method initTableModel
Signature
initTableModel()

 
→ top of page
Method isLeadSelection
Signature
isLeadSelection():int
Returns
int–

 
→ top of page
Method isRowSelected
Signature
isRowSelected(intidx)
Arguments
intidx–

 
→ top of page
Method layoutColumns
Signature
layoutColumns(inttotalX)
Arguments
inttotalX–

 
→ top of page
Method onDropObject
Signature
onDropObject(Objecto,
  introw 
  )  
 :int
Arguments
Objecto–
introw–
Returns
int–

 
→ top of page
Method selectAll
Select all rows
Signature
selectAll()

 
→ top of page
Method selectNone
Deselect all rows
Signature
selectNone()

 
→ top of page
Method selectRow
Signature
selectRow(introw)
 :int
Arguments
introw–
Returns
int–

 
→ top of page
Method selectRowRange
Signature
selectRowRange(intstartIdx,
  intendIdx 
  )  
Arguments
intstartIdx–
intendIdx–

 
→ top of page
Method setColumnWidth
Called when the user has resized a column.
Signature
setColumnWidth(intcol,
  intwidth 
  )  
Arguments
intcol–
intwidth–

 
→ top of page
Method setCursorIndex
Signature
setCursorIndex(intindex)
Arguments
intindex–

 
→ top of page
Method setCursorIndexByPixel
Signature
setCursorIndexByPixel(floatpy)
Arguments
floatpy–

 
→ top of page
Method setCursorIndexRaw
Signature
setCursorIndexRaw(intcursorIndex)
Arguments
intcursorIndex–

 
→ top of page
Method setCursorIndexToFirstRow
Signature
setCursorIndexToFirstRow()

 
→ top of page
Method setCursorIndexToLastRow
Signature
setCursorIndexToLastRow()

 
→ top of page
Method setLeadSelection
Signature
setLeadSelection(intleadIndex)
Arguments
intleadIndex–

 
→ top of page
Method setPrimarySortColumn
Signature
setPrimarySortColumn(intcol)
Arguments
intcol–

 
→ top of page
Method setSecondarySortColumn
Signature
setSecondarySortColumn(intcol)
Arguments
intcol–

 
→ top of page
Method setSelectedRows
Signature
setSelectedRows(IntArrayia)
Arguments
IntArrayia–

 
→ top of page
Method setViewPixelOffsetY
Signature
setViewPixelOffsetY(inty)
Arguments
inty–

 
→ top of page
Method sortRows
Sort rows by primary/secondary columns. This method will use @compareCells to build the sorted_rows array.
Signature
sortRows()

 
→ top of page
Method tableModelChanged
Signature
tableModelChanged()

 
→ top of page
Method tableModelGetTmpLabelFont
Signature
tableModelGetTmpLabelFont():ui::Font
Returns

 
→ top of page
Method tableModelLookAndFeelChanged
Signature
tableModelLookAndFeelChanged()

 
→ top of page
Method updateCellRendererColors
Signature
updateCellRendererColors(Objectl,
  intcol,
  introw,
  intvisibleRow 
  )  
Arguments
Objectl–
intcol–
introw–
intvisibleRow–

 
→ top of page
Constant MINIMUM_ROW_HEIGHT (int)

 

Project Modules:MAbstractXMLForm , MAcceleratorKey , MAcceleratorList , MAction , MActionConsumer , MActionProvider , MBezier01Edit , MBezierEdit , MButton , MCharFilter , MCharFilterBinary255Expr , MCharFilterFloat , MCharFilterFloatExpr , MCharFilterHex , MCharFilterHexExpr , MCharFilterHexShort , MCharFilterHexShortExpr , MCharFilterUFix16 , MCheckBox , MChoiceDialog , MCmdProvider , MColorBox , MColorButton , MComboBox , MComboBoxPopup , MComboBoxTM , MComboField , MComposite , MControl , MCursorShapes , MDial , MDialog , MDragHandleLabel , MDynamicPopupMenuAction , MFBO , MFloatAction , MFloatField , MFloatingLayer , MFloatParam , MFloatParamDialog , MFloatParamEditor , MFlowLayout , MFont , MFontCache , MFontResource , MForm , MFT2Face , MFT2FontResource , MFT2Glyph , MGeometry4f , MGraph , MGraphForm , MGridLayout , MHiddenPanel , MHSVColorPicker , MIcon , MIconCache , MInfoDialog , MIntAction , MKeyAction , MKeyboardMonitor , MKeyHelpDialog , MLabel , MLayer , MLayerSwitch , MLayout , MLogger , MLookAndFeel , MLookAndFeel_Dark , MLookAndFeel_Light , MLookAndFeel_Mono , MMouseEvent , MObjectAction , MOpaquePanel , MPanel , MPNGIcon , MPopupMenu , MPopupMenuBar , MPopupMenuBarButton , MPopupMenuButton , MPopupMenuCheckButton , MPopupMenuFolderButton , MPopupMenuSeparator , MPopupMenuWindowDock , MRadioButton , MRadioButtonGroup , MRectangle2f , MRepeatButton , MScroller , MScrollPane , MShader , MShader_ColorGrading , MShader_GradientH , MShader_GradientR , MShader_GradientV , MShader_InvertColor , MShader_PatternFill , MShader_PatternGradientH , MShader_PatternGradientR , MShader_PatternGradientV , MShader_SharpenFilter , MShader_SharpenFilterAndColorGrading , MShape , MShapePolyline , MSizeGroup , MSizeGroupX , MSizeGroupXY , MSizeGroupY , MSlider , MSpacer , MSplitPane , MStatusBar , MStringAction , MStringDialog , MSuperBorderLayout , MTableCellEditor , MTableCellEditorCheckBox , MTableCellEditorComboBox , MTableCellEditorFloatParam , MTableCellEditorString , MTableModel , MTableView , MTableViewData , MTableViewHeader , MTabSwitch , MTextEdit , MTextEditDialog , MTextField , MTextFieldIncDec , MTextInputDialog , MTextView , MTimerAction , MTitledPanel , MToolTip , MTransparentPanel , MTreeTableModel , MTreeTableNode , MUI , MUIConstants , MUIPluginLoader , MUIRenderer , MUserDataContainer , MValueAction , MView , MViewPane , MWindow , MWindowDock , MWindowTitleBar , MXFMObject , MXMLForm , MXYPad 
Project Classes:CmdProvider , ColorBox , graph::AttribsBase , graph::BBox , graph::Canvas , graph::Cell , graph::Edge , graph::GR , graph::Graph , graph::GRGradient , graph::GRPalette , graph::GRParseContext , graph::GRStyle , graph::GRUtils , graph::Node , graph::Port , graph::PortsBase , HSVColorPicker , ui::AbstractXMLForm , ui::AcceleratorKey , ui::AcceleratorList , ui::Action , ui::ActionConsumer , ui::ActionProvider , ui::Bezier01Edit , ui::BezierEdit , ui::BezierEditState , ui::BezierHistory , ui::BezierLUT01 , ui::BorderLayout , ui::Button , ui::CharFilter , ui::CharFilterBinary255Expr , ui::CharFilterFloat , ui::CharFilterFloatExpr , ui::CharFilterHex , ui::CharFilterHexExpr , ui::CharFilterHexShort , ui::CharFilterHexShortExpr , ui::CharFilterUFix16 , ui::CheckBox , ui::ChoiceDialog , ui::ColorButton , ui::ComboBox , ui::ComboBoxPopup , ui::ComboBoxTM , ui::ComboField , ui::Composite , ui::Control , ui::CursorShapes , ui::Dial , ui::Dialog , ui::DragHandleLabel , ui::DynamicPopupMenuAction , ui::FBO , ui::FloatAction , ui::FloatField , ui::FloatingLayer , ui::FloatParam , ui::FloatParamDialog , ui::FloatParamEditor , ui::FlowLayout , ui::Font , ui::FontCache , ui::FontResource , ui::Form , ui::FT2Face , ui::FT2FontResource , ui::FT2Glyph , ui::FT2LocalFileFontResource , ui::FT2PakFileFontResource , ui::Geometry4f , ui::GraphEdge , ui::GraphEdgeArrow , ui::GraphForm , ui::GraphPortButton , ui::GridLayout , ui::HiddenPanel , ui::Icon , ui::IconCache , ui::InfoDialog , ui::IntAction , ui::KeyAction , ui::KeyboardFocusListener , ui::KeyboardMonitor , ui::KeyboardMonitorEntry , ui::KeyHelpButton , ui::KeyHelpDialog , ui::KeyHelpToolTip , ui::KeyRepeatAction , ui::KeyRepeatConsumer , ui::Label , ui::Layer , ui::LayerSwitch , ui::Layout , ui::Logger , ui::LookAndFeel , ui::LookAndFeelDefs , ui::LookAndFeel_Dark , ui::LookAndFeel_Light , ui::LookAndFeel_Mono , ui::MouseEvent , ui::MouseHoldAction , ui::MouseHoldConsumer , ui::ObjectAction , ui::OpaquePanel , ui::Panel , ui::PNGIcon , ui::PopupMenu , ui::PopupMenuBar , ui::PopupMenuBarButton , ui::PopupMenuButton , ui::PopupMenuCheckButton , ui::PopupMenuFolderButton , ui::PopupMenuRadioButton , ui::PopupMenuSeparator , ui::PopupMenuWindowDock , ui::RadioButton , ui::RadioButtonGroup , ui::Rectangle2f , ui::RepeatButton , ui::Scroller , ui::ScrollPane , ui::Shader , ui::Shader_ColorGrading , ui::Shader_GradientH , ui::Shader_GradientR , ui::Shader_GradientV , ui::Shader_InvertColor , ui::Shader_PatternFill , ui::Shader_PatternGradientH , ui::Shader_PatternGradientR , ui::Shader_PatternGradientV , ui::Shader_SharpenFilter , ui::Shader_SharpenFilterAndColorGrading , ui::Shape , ui::ShapePolyline , ui::SizeGroup , ui::SizeGroupX , ui::SizeGroupXY , ui::SizeGroupY , ui::Slider , ui::Spacer , ui::SplitPane , ui::StatusBar , ui::StatusBarListener , ui::StatusBarMessage , ui::StringAction , ui::StringDialog , ui::StringDialogTextField , ui::SuperBorderLayout , ui::TableCellEditor , ui::TableCellEditorCheckBox , ui::TableCellEditorComboBox , ui::TableCellEditorFloatParam , ui::TableCellEditorString , ui::TableGraphPanel , ui::TableModel , ui::TableView , ui::TableViewData , ui::TableViewHeader , ui::TabSwitch , ui::TabSwitchLabelPanel , ui::TextEdit , ui::TextEditDialog , ui::TextEditPlugin , ui::TextEditUndoEntry , ui::TextField , ui::TextFieldIncDec , ui::TextInputDialog , ui::TextView , ui::TextViewSyntaxHighlighter , ui::TimerAction , ui::TitledPanel , ui::ToolTip , ui::TransparentPanel , ui::TreeTableModel , ui::TreeTableNode , ui::TriadKeyConsumer , ui::UI , ui::UIConstants , ui::UIRenderer , ui::UserDataContainer , ui::ValueAction , ui::View , ui::ViewPane , ui::Window , ui::WindowDock , ui::WindowTitleBar , ui::XFMObject , ui::XMLForm , ui::XYPad 
Project Functions:getTableViewStepCoarse , Screen_onApplicationActive , Screen_onClose , Screen_onDrainEventQueue , Screen_onDraw , Screen_onDropFiles , Screen_onExpose , Screen_onInputFocusActive , Screen_onKeyboard , Screen_onMouse , Screen_onMouseFocusActive , Screen_onMoveWindow , Screen_onOpen , Screen_onResize , Screen_onTimer , SetDebugLevel , SetDebugLevel , SetEnableProfiling 
All Namespaces:default , graph , ui 
All Projects:core , eqxmms , ShaderVG , ShaderVG_Text , tkanalogrytm , tkchipmunk , tkclap , tkfileutils , tkfreeglut , tkfreetype2 , tkfreeverb , tkmath , tkmidi , tkmidipipe , tkminnie , tkoldmath , tkopengl , tkportaudio , tkradiastools , tksamplechain , tksampleedit , tksampler , tksdl , tksdl_net , tksidplay2 , tkspeexdsp , tksqlite , tktriangulate , tkui , tkvst2 , tkzip , ui , yingtest 


auto-generated by "DOG", the TkScript document generator. Tue, 3/Mar/2026 18:10:18