45 aNewPointer = PointerStyle::HSplit;
57 if ( ( aPoint.
X() > tableSize.
Width() )
61 aNewPointer = PointerStyle::NotAllowed;
65 aNewPointer = PointerStyle::HSplit;
76 ShowTrackFlags::Split | ShowTrackFlags::TrackWindow
87 OSL_ENSURE(
false,
"ColumnResize::handleMouseDown: suspicious: MouseButtonDown while still tracking?" );
117 tools::Long const maxWidthLogical = pColumn->getMaxWidth();
118 tools::Long const minWidthLogical = pColumn->getMinWidth();
128 tools::Long const requestedWidth = requestedEnd - columnStart;
132 if ( requestedEnd >= columnStart )
136 if ( oldEnd > requestedEnd )
139 if ( ( minWidthLogical != 0 ) && ( requestedWidthLogical < minWidthLogical ) )
140 requestedWidthLogical = minWidthLogical;
142 else if ( oldEnd < requestedEnd )
145 if ( ( maxWidthLogical != 0 ) && ( requestedWidthLogical >= maxWidthLogical ) )
146 requestedWidthLogical = maxWidthLogical;
148 pColumn->setWidth( requestedWidthLogical );
152 i_tableControl.
setPointer( PointerStyle::Arrow );
171 bool handled =
false;
174 if ( tableCell.
nRow >= 0 )
196 if ( tableCell.
nRow >= 0 )
225 OSL_ENSURE(
false,
"ColumnSortHandler::handleMouseDown: called while already active - suspicious!" );
229 if ( i_tableControl.
getModel()->getSortAdapter() ==
nullptr )
const Point & GetPosPixel() const
constexpr tools::Long X() const
SelectionMode GetSelectionMode() const
bool SelMouseButtonDown(const MouseEvent &rMEvt)
bool SelMouseButtonUp(const MouseEvent &rMEvt)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
virtual FunctionResult handleMouseDown(ITableControl &i_tableControl, MouseEvent const &i_event) override
virtual FunctionResult handleMouseUp(ITableControl &i_tableControl, MouseEvent const &i_event) override
virtual FunctionResult handleMouseMove(ITableControl &i_tableControl, MouseEvent const &i_event) override
virtual FunctionResult handleMouseDown(ITableControl &i_tableControl, MouseEvent const &i_event) override
virtual FunctionResult handleMouseMove(ITableControl &i_tableControl, MouseEvent const &i_event) override
virtual FunctionResult handleMouseUp(ITableControl &i_tableControl, MouseEvent const &i_event) override
defines a callback interface to be implemented by a concrete table control
virtual void activateCell(ColPos const i_col, RowPos const i_row)=0
activates the given cell
virtual ::Size getTableSizePixel() const =0
retrieves the size of the table window, in pixels
virtual void captureMouse()=0
captures the mouse to the table window
virtual PTableModel getModel() const =0
returns the table model
virtual void setPointer(PointerStyle i_pointer)=0
sets a new mouse pointer for the table window
virtual void hideTracking()=0
hides a previously shown tracking rectangle
virtual SelectionEngine * getSelEngine()=0
returns selection engine
virtual tools::Long pixelWidthToAppFont(tools::Long const i_pixels) const =0
calculates a width, given in pixels, into an AppFont-based width
virtual void releaseMouse()=0
releases the mouse, after it had previously been captured
virtual void showTracking(tools::Rectangle const &i_location, ShowTrackFlags const i_flags)=0
shows a tracking rectangle
virtual void invalidate(TableArea const i_what)=0
invalidates the table window
virtual ColumnMetrics getColumnMetrics(ColPos const i_column) const =0
retrieves the metrics for a given column
virtual TableCell hitTest(const Point &rPoint) const =0
does a hit test for the given pixel coordinates
provides sorting functionality for the data underlying an ITableModel
virtual ColumnSort getCurrentSortOrder() const =0
retrieves the current sort order of the data
virtual void sortByColumn(ColPos const i_column, ColumnSortDirection const i_sortDirection)=0
sorts the rows in the model by the given column's data, in the given direction.
virtual FunctionResult handleMouseDown(ITableControl &i_tableControl, MouseEvent const &i_event) override
virtual FunctionResult handleMouseUp(ITableControl &i_tableControl, MouseEvent const &i_event) override
virtual FunctionResult handleMouseMove(ITableControl &i_tableControl, MouseEvent const &i_event) override
#define ENSURE_OR_RETURN(c, m, r)
std::shared_ptr< IColumnModel > PColumnModel
tools::Long nEndPixel
the end of the column, in pixels, plus 1.
tools::Long nStartPixel
the start of the column, in pixels.
ColumnSortDirection eSortDirection
#define COL_INVALID
denotes an invalid column index
#define ROW_COL_HEADERS
denotes the row containing the column headers