26#include <com/sun/star/awt/grid/GridDataEvent.hpp>
27#include <com/sun/star/awt/grid/XGridColumnModel.hpp>
28#include <com/sun/star/awt/grid/XGridDataModel.hpp>
29#include <com/sun/star/awt/grid/XGridColumn.hpp>
30#include <com/sun/star/awt/grid/XGridColumn.hpp>
31#include <com/sun/star/style/VerticalAlignment.hpp>
41 class UnoGridColumnFacade;
67 virtual ::std::optional< ::Color >
getLineColor()
const override;
74 virtual ::std::optional< ::Color >
getTextColor()
const override;
76 virtual ::std::optional< ::std::vector< ::Color > >
78 virtual css::style::VerticalAlignment
88 void appendColumn( css::uno::Reference< css::awt::grid::XGridColumn >
const & i_column );
89 void insertColumn(
ColPos const i_position, css::uno::Reference< css::awt::grid::XGridColumn >
const & i_column );
97 void setDataModel( css::uno::Reference< css::awt::grid::XGridDataModel >
const & i_gridDataModel );
99 css::uno::Reference< css::awt::grid::XGridDataModel >
101 void setColumnModel( css::uno::Reference< css::awt::grid::XGridColumnModel >
const & i_gridColumnModel );
103 css::uno::Reference< css::awt::grid::XGridColumnModel >
172 css::uno::WeakReference< css::awt::grid::XGridDataModel >
m_aDataModel;
provides sorting functionality for the data underlying an ITableModel
declares the interface to implement by an abstract table model
virtual PTableInputHandler getInputHandler() const override
returns the component handling input in a view associated with the model
void notifyRowsInserted(css::awt::grid::GridDataEvent const &i_event) const
::std::optional< ::std::vector< ::Color > > m_aRowColors
virtual ScrollbarVisibility getVerticalScrollbarVisibility() const override
returns the visibility mode of the vertical scrollbar
ModellListeners m_aListeners
void setActiveSelectionTextColor(css::uno::Any const &i_color)
virtual TableMetrics getRowHeight() const override
determines the height of rows in the table.
virtual void addTableModelListener(const PTableModelListener &i_listener) override
adds a listener to be notified of changes in the table model
virtual ::std::optional< ::Color > getHeaderBackgroundColor() const override
returns the color to be used for rendering the header background.
virtual bool hasColumnHeaders() const override
determines whether the table has column headers
void setVerticalAlign(css::style::VerticalAlignment _rAlign)
virtual ::std::optional< ::Color > getActiveSelectionTextColor() const override
returns the color to be used for the text of selected cells, when the control has the focus
::std::optional< ::Color > m_aActiveSelectionTextColor
virtual ::std::optional< ::std::vector< ::Color > > getRowBackgroundColors() const override
returns the colors to be used for the row backgrounds.
::std::optional< ::Color > m_aGridLineColor
virtual TableSize getColumnCount() const override
returns the number of columns in the table
void setVerticalScrollbarVisibility(ScrollbarVisibility const i_visibility)
void notifyRowsRemoved(css::awt::grid::GridDataEvent const &i_event) const
void setTextColor(css::uno::Any const &i_color)
void setTextLineColor(css::uno::Any const &i_color)
virtual TableSize getRowCount() const override
returns the number of rows in the table
bool hasDataModel() const
::std::optional< ::Color > m_aHeaderBackgroundColor
void setHeaderBackgroundColor(css::uno::Any const &i_color)
void setRowHeaders(bool _bRowHeaders)
virtual void removeTableModelListener(const PTableModelListener &i_listener) override
remove a listener to be notified of changes in the table model
virtual void getCellToolTip(ColPos const i_col, RowPos const i_row, css::uno::Any &o_cellToolTip) override
returns an object which should be displayed as tooltip for the given cell
virtual css::uno::Any getRowHeading(RowPos const i_rowPos) const override
retrieves title of a given row
virtual ::std::optional< ::Color > getInactiveSelectionBackColor() const override
returns the color to be used for the background of selected cells, when the control does not have the...
::std::optional< ::Color > m_aHeaderTextColor
virtual ::std::optional< ::Color > getHeaderTextColor() const override
returns the color to be used for rendering the header text.
void setRowHeaderWidth(TableMetrics _nWidth)
virtual TableMetrics getColumnHeaderHeight() const override
determines the height of the column header row
ColPos getColumnPos(UnoGridColumnFacade const &i_column) const
retrieves the index of a column within the model
::std::optional< ::Color > m_aInactiveSelectionBackColor
void setColumnHeaderHeight(TableMetrics _nHeight)
TableMetrics nRowHeaderWidth
void setDataModel(css::uno::Reference< css::awt::grid::XGridDataModel > const &i_gridDataModel)
void setInactiveSelectionBackColor(css::uno::Any const &i_color)
virtual TableMetrics getRowHeaderWidth() const override
determines the width of the row header column
void setEnabled(bool _bEnabled)
void notifyAllDataChanged() const
notifies a change in all data represented by the model.
virtual ::std::optional< ::Color > getActiveSelectionBackColor() const override
returns the color to be used for the background of selected cells, when the control has the focus
virtual css::style::VerticalAlignment getVerticalAlign() const override
determines the vertical alignment of content within a cell
void setHeaderTextColor(css::uno::Any const &i_color)
::std::optional< ::Color > m_aInactiveSelectionTextColor
css::uno::Reference< css::awt::grid::XGridColumnModel > getColumnModel() const
::std::optional< ::Color > m_aActiveSelectionBackColor
void setRowHeight(TableMetrics _nHeight)
::std::optional< ::Color > m_aTextLineColor
virtual ::std::optional< ::Color > getInactiveSelectionTextColor() const override
returns the color to be used for the text of selected cells, when the control does not have the focus
::std::optional< ::Color > m_aTextColor
css::style::VerticalAlignment m_eVerticalAlign
::std::vector< PTableModelListener > ModellListeners
void setColumnModel(css::uno::Reference< css::awt::grid::XGridColumnModel > const &i_gridColumnModel)
void setActiveSelectionBackColor(css::uno::Any const &i_color)
ScrollbarVisibility eVScrollMode
virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const override
returns the visibility mode of the horizontal scrollbar
ScrollbarVisibility eHScrollMode
css::uno::WeakReference< css::awt::grid::XGridDataModel > m_aDataModel
void insertColumn(ColPos const i_position, css::uno::Reference< css::awt::grid::XGridColumn > const &i_column)
::std::vector< PColumnModel > ColumnModels
void setInactiveSelectionTextColor(css::uno::Any const &i_color)
void setRowBackgroundColors(css::uno::Any const &i_APIValue)
bool hasColumnModel() const
void setHorizontalScrollbarVisibility(ScrollbarVisibility const i_visibility)
css::uno::Reference< css::awt::grid::XGridDataModel > getDataModel() const
virtual ::std::optional< ::Color > getLineColor() const override
returns the color to be used for rendering the grid lines.
virtual ::std::optional< ::Color > getTextLineColor() const override
returns the color to be used for text lines (underline, strikethrough) when rendering cell text.
void setLineColor(css::uno::Any const &i_color)
virtual ~UnoControlTableModel() override
virtual void sortByColumn(ColPos const i_column, ColumnSortDirection const i_sortDirection) override
sorts the rows in the model by the given column's data, in the given direction.
void impl_notifyTableMetricsChanged() const
virtual PTableRenderer getRenderer() const override
returns a renderer which is able to paint the table represented by this table model
void notifyDataChanged(css::awt::grid::GridDataEvent const &i_event) const
virtual ColumnSort getCurrentSortOrder() const override
retrieves the current sort order of the data
virtual ITableDataSort * getSortAdapter() override
returns an adapter to the sorting functionality of the model
TableMetrics nColumnHeaderHeight
virtual ::std::optional< ::Color > getTextColor() const override
returns the color to be used for rendering cell texts.
virtual bool isEnabled() const override
returns enabled state.
css::uno::WeakReference< css::awt::grid::XGridColumnModel > m_aColumnModel
void appendColumn(css::uno::Reference< css::awt::grid::XGridColumn > const &i_column)
virtual bool hasRowHeaders() const override
determines whether the table has row headers
void removeColumn(ColPos const i_position)
void setColumnHeaders(bool _bColumnHeaders)
PTableInputHandler pInputHandler
void notifyColumnChange(ColPos const i_columnPos, ColumnAttributeGroup const i_attributeGroup) const
notifies a change in a column belonging to the model
virtual void getCellContent(ColPos const i_col, RowPos const i_row, css::uno::Any &o_cellContent) override
retrieves the content of the given cell
sal_Int32 TableSize
a value denoting the size of a table
sal_Int32 RowPos
a value denoting a row position within a table
std::shared_ptr< ITableRenderer > PTableRenderer
sal_Int32 ColPos
a value denoting a column position within a table
std::shared_ptr< ITableInputHandler > PTableInputHandler
std::shared_ptr< IColumnModel > PColumnModel
std::shared_ptr< ITableModelListener > PTableModelListener