LibreOffice Module toolkit (master) 1
Public Member Functions | List of all members
svt::table::ITableModel Class Referenceabstract

declares the interface to implement by an abstract table model More...

#include <tablemodel.hxx>

Inheritance diagram for svt::table::ITableModel:
[legend]

Public Member Functions

virtual TableSize getColumnCount () const =0
 returns the number of columns in the table More...
 
virtual TableSize getRowCount () const =0
 returns the number of rows in the table More...
 
virtual bool hasColumnHeaders () const =0
 determines whether the table has column headers More...
 
virtual bool hasRowHeaders () const =0
 determines whether the table has row headers More...
 
virtual PColumnModel getColumnModel (ColPos column)=0
 returns a model for a certain column More...
 
virtual PTableRenderer getRenderer () const =0
 returns a renderer which is able to paint the table represented by this table model More...
 
virtual PTableInputHandler getInputHandler () const =0
 returns the component handling input in a view associated with the model More...
 
virtual TableMetrics getRowHeight () const =0
 determines the height of rows in the table. More...
 
virtual TableMetrics getColumnHeaderHeight () const =0
 determines the height of the column header row More...
 
virtual TableMetrics getRowHeaderWidth () const =0
 determines the width of the row header column More...
 
virtual ScrollbarVisibility getVerticalScrollbarVisibility () const =0
 returns the visibility mode of the vertical scrollbar More...
 
virtual ScrollbarVisibility getHorizontalScrollbarVisibility () const =0
 returns the visibility mode of the horizontal scrollbar More...
 
virtual void addTableModelListener (const PTableModelListener &i_listener)=0
 adds a listener to be notified of changes in the table model More...
 
virtual void removeTableModelListener (const PTableModelListener &i_listener)=0
 remove a listener to be notified of changes in the table model More...
 
virtual void getCellContent (ColPos const i_col, RowPos const i_row, css::uno::Any &o_cellContent)=0
 retrieves the content of the given cell More...
 
virtual void getCellToolTip (ColPos const i_col, RowPos const i_row, css::uno::Any &o_cellToolTip)=0
 returns an object which should be displayed as tooltip for the given cell More...
 
virtual css::uno::Any getRowHeading (RowPos const i_rowPos) const =0
 retrieves title of a given row More...
 
virtual ::std::optional< ::ColorgetLineColor () const =0
 returns the color to be used for rendering the grid lines. More...
 
virtual ::std::optional< ::ColorgetHeaderBackgroundColor () const =0
 returns the color to be used for rendering the header background. More...
 
virtual ::std::optional< ::ColorgetHeaderTextColor () const =0
 returns the color to be used for rendering the header text. More...
 
virtual ::std::optional< ::ColorgetActiveSelectionBackColor () const =0
 returns the color to be used for the background of selected cells, when the control has the focus More...
 
virtual ::std::optional< ::ColorgetInactiveSelectionBackColor () const =0
 returns the color to be used for the background of selected cells, when the control does not have the focus More...
 
virtual ::std::optional< ::ColorgetActiveSelectionTextColor () const =0
 returns the color to be used for the text of selected cells, when the control has the focus More...
 
virtual ::std::optional< ::ColorgetInactiveSelectionTextColor () const =0
 returns the color to be used for the text of selected cells, when the control does not have the focus More...
 
virtual ::std::optional< ::ColorgetTextColor () const =0
 returns the color to be used for rendering cell texts. More...
 
virtual ::std::optional< ::ColorgetTextLineColor () const =0
 returns the color to be used for text lines (underline, strikethrough) when rendering cell text. More...
 
virtual ::std::optional< ::std::vector< ::Color > > getRowBackgroundColors () const =0
 returns the colors to be used for the row backgrounds. More...
 
virtual css::style::VerticalAlignment getVerticalAlign () const =0
 determines the vertical alignment of content within a cell More...
 
virtual ITableDataSortgetSortAdapter ()=0
 returns an adapter to the sorting functionality of the model More...
 
virtual bool isEnabled () const =0
 returns enabled state. More...
 
virtual ~ITableModel ()
 destroys the table model instance More...
 

Detailed Description

declares the interface to implement by an abstract table model

Definition at line 241 of file tablemodel.hxx.

Constructor & Destructor Documentation

◆ ~ITableModel()

virtual svt::table::ITableModel::~ITableModel ( )
inlinevirtual

destroys the table model instance

Definition at line 446 of file tablemodel.hxx.

Member Function Documentation

◆ addTableModelListener()

virtual void svt::table::ITableModel::addTableModelListener ( const PTableModelListener i_listener)
pure virtual

adds a listener to be notified of changes in the table model

Implemented in svt::table::UnoControlTableModel.

◆ getActiveSelectionBackColor()

virtual ::std::optional< ::Color > svt::table::ITableModel::getActiveSelectionBackColor ( ) const
pure virtual

returns the color to be used for the background of selected cells, when the control has the focus

If this value is not set, a default color from the style settings will be used.

Implemented in svt::table::UnoControlTableModel.

◆ getActiveSelectionTextColor()

virtual ::std::optional< ::Color > svt::table::ITableModel::getActiveSelectionTextColor ( ) const
pure virtual

returns the color to be used for the text of selected cells, when the control has the focus

If this value is not set, a default color from the style settings will be used.

Implemented in svt::table::UnoControlTableModel.

◆ getCellContent()

virtual void svt::table::ITableModel::getCellContent ( ColPos const  i_col,
RowPos const  i_row,
css::uno::Any &  o_cellContent 
)
pure virtual

retrieves the content of the given cell

Implemented in svt::table::UnoControlTableModel.

◆ getCellToolTip()

virtual void svt::table::ITableModel::getCellToolTip ( ColPos const  i_col,
RowPos const  i_row,
css::uno::Any &  o_cellToolTip 
)
pure virtual

returns an object which should be displayed as tooltip for the given cell

At the moment, only string-convertible values are supported here. In the future, one might imagine displaying scaled-down versions of a graphic in a cell, and a larger version of that very graphic as tooltip.

If no tooltip object is provided, then the cell content is used, and displayed as tooltip for the cell if and only if it doesn't fit into the cell's space itself.

Parameters
i_colThe column index of the cell in question. COL_ROW_HEADERS is a valid argument here.
i_rowThe row index of the cell in question.
o_cellToolTiptakes the tooltip object upon return.

Implemented in svt::table::UnoControlTableModel.

◆ getColumnCount()

virtual TableSize svt::table::ITableModel::getColumnCount ( ) const
pure virtual

returns the number of columns in the table

Implemented in svt::table::UnoControlTableModel.

◆ getColumnHeaderHeight()

virtual TableMetrics svt::table::ITableModel::getColumnHeaderHeight ( ) const
pure virtual

determines the height of the column header row

This method is not to be called if ->hasColumnHeaders() returned <FALSE>.

Returns
the logical height of the column header row, in app-font units. Must be greater than 0.

Implemented in svt::table::UnoControlTableModel.

◆ getColumnModel()

virtual PColumnModel svt::table::ITableModel::getColumnModel ( ColPos  column)
pure virtual

returns a model for a certain column

Parameters
columnthe index of the column in question. Must be greater than or equal 0, and smaller than the return value of ->getColumnCount()
Returns
the model of the column in question. Must not be <NULL>

Implemented in svt::table::UnoControlTableModel.

◆ getHeaderBackgroundColor()

virtual ::std::optional< ::Color > svt::table::ITableModel::getHeaderBackgroundColor ( ) const
pure virtual

returns the color to be used for rendering the header background.

If this value is not set, a default color from the style settings will be used.

Implemented in svt::table::UnoControlTableModel.

◆ getHeaderTextColor()

virtual ::std::optional< ::Color > svt::table::ITableModel::getHeaderTextColor ( ) const
pure virtual

returns the color to be used for rendering the header text.

If this value is not set, a default color from the style settings will be used.

Implemented in svt::table::UnoControlTableModel.

◆ getHorizontalScrollbarVisibility()

virtual ScrollbarVisibility svt::table::ITableModel::getHorizontalScrollbarVisibility ( ) const
pure virtual

returns the visibility mode of the horizontal scrollbar

Implemented in svt::table::UnoControlTableModel.

◆ getInactiveSelectionBackColor()

virtual ::std::optional< ::Color > svt::table::ITableModel::getInactiveSelectionBackColor ( ) const
pure virtual

returns the color to be used for the background of selected cells, when the control does not have the focus

If this value is not set, a default color from the style settings will be used.

Implemented in svt::table::UnoControlTableModel.

◆ getInactiveSelectionTextColor()

virtual ::std::optional< ::Color > svt::table::ITableModel::getInactiveSelectionTextColor ( ) const
pure virtual

returns the color to be used for the text of selected cells, when the control does not have the focus

If this value is not set, a default color from the style settings will be used.

Implemented in svt::table::UnoControlTableModel.

◆ getInputHandler()

virtual PTableInputHandler svt::table::ITableModel::getInputHandler ( ) const
pure virtual

returns the component handling input in a view associated with the model

Implemented in svt::table::UnoControlTableModel.

◆ getLineColor()

virtual ::std::optional< ::Color > svt::table::ITableModel::getLineColor ( ) const
pure virtual

returns the color to be used for rendering the grid lines.

If this value is not set, a default color from the style settings will be used.

Implemented in svt::table::UnoControlTableModel.

◆ getRenderer()

virtual PTableRenderer svt::table::ITableModel::getRenderer ( ) const
pure virtual

returns a renderer which is able to paint the table represented by this table model

Returns
the renderer to use. Must not be <NULL>

Implemented in svt::table::UnoControlTableModel.

◆ getRowBackgroundColors()

virtual ::std::optional< ::std::vector< ::Color > > svt::table::ITableModel::getRowBackgroundColors ( ) const
pure virtual

returns the colors to be used for the row backgrounds.

If this value is not set, every second row will have a background color derived from the style settings's selection color, the other rows will not have a special background at all.

If this value is an empty sequence, the rows will not have a special background at all, instead the normal background of the complete control will be used.

If value is a non-empty sequence, then rows will have the background colors as specified in the sequence, in alternating order.

Implemented in svt::table::UnoControlTableModel.

◆ getRowCount()

virtual TableSize svt::table::ITableModel::getRowCount ( ) const
pure virtual

returns the number of rows in the table

Implemented in svt::table::UnoControlTableModel.

◆ getRowHeaderWidth()

virtual TableMetrics svt::table::ITableModel::getRowHeaderWidth ( ) const
pure virtual

determines the width of the row header column

This method is not to be called if ->hasRowHeaders() returned <FALSE>.

Returns
the logical width of the row header column, in app-font units. Must be greater than 0.

Implemented in svt::table::UnoControlTableModel.

◆ getRowHeading()

virtual css::uno::Any svt::table::ITableModel::getRowHeading ( RowPos const  i_rowPos) const
pure virtual

retrieves title of a given row

Implemented in svt::table::UnoControlTableModel.

◆ getRowHeight()

virtual TableMetrics svt::table::ITableModel::getRowHeight ( ) const
pure virtual

determines the height of rows in the table.

Returns
the logical height of rows in the table, in app-font units. The height must be greater 0.

Implemented in svt::table::UnoControlTableModel.

◆ getSortAdapter()

virtual ITableDataSort * svt::table::ITableModel::getSortAdapter ( )
pure virtual

returns an adapter to the sorting functionality of the model

It is legitimate to return <NULL> here, in this case, the table model does not support sorting.

Implemented in svt::table::UnoControlTableModel.

◆ getTextColor()

virtual ::std::optional< ::Color > svt::table::ITableModel::getTextColor ( ) const
pure virtual

returns the color to be used for rendering cell texts.

If this value is not set, a default color from the style settings will be used.

Implemented in svt::table::UnoControlTableModel.

◆ getTextLineColor()

virtual ::std::optional< ::Color > svt::table::ITableModel::getTextLineColor ( ) const
pure virtual

returns the color to be used for text lines (underline, strikethrough) when rendering cell text.

If this value is not set, a default color from the style settings will be used.

Implemented in svt::table::UnoControlTableModel.

◆ getVerticalAlign()

virtual css::style::VerticalAlignment svt::table::ITableModel::getVerticalAlign ( ) const
pure virtual

determines the vertical alignment of content within a cell

Implemented in svt::table::UnoControlTableModel.

◆ getVerticalScrollbarVisibility()

virtual ScrollbarVisibility svt::table::ITableModel::getVerticalScrollbarVisibility ( ) const
pure virtual

returns the visibility mode of the vertical scrollbar

Implemented in svt::table::UnoControlTableModel.

◆ hasColumnHeaders()

virtual bool svt::table::ITableModel::hasColumnHeaders ( ) const
pure virtual

determines whether the table has column headers

If this method returns <TRUE>, the renderer returned by ->getRenderer must be able to render column headers.

See also
IColumnRenderer

Implemented in svt::table::UnoControlTableModel.

◆ hasRowHeaders()

virtual bool svt::table::ITableModel::hasRowHeaders ( ) const
pure virtual

determines whether the table has row headers

If this method returns <TRUE>, the renderer returned by ->getRenderer must be able to render row headers.

See also
IColumnRenderer

Implemented in svt::table::UnoControlTableModel.

◆ isEnabled()

virtual bool svt::table::ITableModel::isEnabled ( ) const
pure virtual

returns enabled state.

Implemented in svt::table::UnoControlTableModel.

◆ removeTableModelListener()

virtual void svt::table::ITableModel::removeTableModelListener ( const PTableModelListener i_listener)
pure virtual

remove a listener to be notified of changes in the table model

Implemented in svt::table::UnoControlTableModel.


The documentation for this class was generated from the following file: