private: /// the control whose impl-instance we implement
TableControl& m_rAntiImpl; /// the model of the table control
PTableModel m_pModel; /// the input handler to use, usually the input handler as provided by ->m_pModel
PTableInputHandler m_pInputHandler; /// info about the widths of our columns
ColumnPositions m_aColumnWidths;
/// the height of a single row in the table, measured in pixels
tools::Long m_nRowHeightPixel; /// the height of the column header row in the table, measured in pixels
tools::Long m_nColHeaderHeightPixel; /// the width of the row header column in the table, measured in pixels
tools::Long m_nRowHeaderWidthPixel;
/// the number of columns in the table control. Cached model value.
TableSize m_nColumnCount;
/// the number of rows in the table control. Cached model value.
TableSize m_nRowCount;
/** the window to contain all data content, including header bars
Thewindow'supperleftcornerisatposition(0,0),relativetothe tablecontrol,whichisthedirectparentofthedatawindow.
*/
VclPtr<TableDataWindow> m_pDataWindow; /// the vertical scrollbar, if any
VclPtr<ScrollBar> m_pVScroll; /// the horizontal scrollbar, if any
VclPtr<ScrollBar> m_pHScroll;
VclPtr<ScrollBarBox> m_pScrollCorner; //selection engine - for determining selection range, e.g. single, multiple
std::unique_ptr<SelectionEngine> m_pSelEngine; //vector which contains the selected rows
std::vector<RowPos> m_aSelectedRows; //part of selection engine
std::unique_ptr<TableFunctionSet> m_pTableFunctionSet; //part of selection engine
RowPos m_nAnchor; bool m_bUpdatingColWidths;
/** to be called when the anti-impl instance has been resized
*/ void onResize();
/** paints the table control content which intersects with the given rectangle
*/ void doPaintContent(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rUpdateRect);
/** moves the cursor to the cell with the given coordinates
/** ensures that the given coordinate is visible @param_nColumn thecolumnpositionwhichshouldbevisible.Mustbenon-negative,andsmaller thanthecolumncount. @param_nRow therowpositionwhichshouldbevisibleMustbenon-negative,andsmaller thantherowcount.
*/ void ensureVisible( ColPos _nColumn, RowPos _nRow );
/** retrieves the content of the given cell, converted to a string
*/
OUString getCellContentAsString( RowPos const i_row, ColPos const i_col );
/** returns the position of the current row in the selection vector */ staticint getRowSelectedNumber(const ::std::vector<RowPos>& selectedRows, RowPos current);
/** invalidates the part of the data window which is covered by the given rows @parami_firstRow theindexofthefirstrowtoincludeintheinvalidation @parami_lastRow theindexofthelastrowtoincludeintheinvalidation,orROW_INVALIDiftheinvalidation shouldhappendowntothebottomofthedatawindow.
*/ void invalidateRowRange( RowPos const i_firstRow, RowPos const i_lastRow );
/** invalidates the part of the data window which is covered by the given row
*/ void invalidateRow( RowPos const i_row ) { invalidateRowRange( i_row, i_row ); }
/** invalidates all selected rows
*/ void invalidateSelectedRows();
/** marks the given row as selected, by putting it into m_aSelectedRows @return <TRUE/>ifandonlyiftherowwaspreviously<em>not</em>markedasselected
*/ bool markRowAsSelected( RowPos const i_rowIndex );
/** marks all rows as deselected @return <TRUE/>ifandonlyiftheselectionactuallychangedbythisoperation
*/ bool markAllRowsAsDeselected();
/** marks all rows as selected @return <FALSE/>ifandonlyifallrowswereselectedalready.
*/ bool markAllRowsAsSelected();
/** positions all child windows, e.g. the both scrollbars, the corner window, and the data window
*/ void impl_ni_positionChildWindows(
tools::Rectangle const & i_dataCellPlayground, boolconst i_verticalScrollbar, boolconst i_horizontalScrollbar
);
/** equivalent to impl_ni_ScrollRows, but checks the instances invariants beforehand (in a non-product build only)
*/
TableSize impl_scrollRows( TableSize const i_rowDelta );
/** scrolls the view by the given number of columns
/** equivalent to impl_ni_ScrollColumns, but checks the instances invariants beforehand (in a non-product build only)
*/
TableSize impl_scrollColumns( TableSize const i_columnDelta );
/** retrieves the area occupied by the totality of (at least partially) visible cells
//see seleng.hxx, seleng.cxx, FunctionSet overridables, part of selection engine class TableFunctionSet : public FunctionSet
{ private:
TableControl_Impl* m_pTableControl;
RowPos m_nCurrentRow;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.