|
wxMaxima
|
Whatever can give a matrix real scrollbars. More...
#include <MatrixScrollHost.h>
Public Member Functions | |
| virtual wxCoord | ScrollbarThickness () const =0 |
| How thick a native scrollbar is, in worksheet pixels. | |
| virtual void | MatrixDrawn (MatrCell *matrix)=0 |
| A matrix that needs scrollbars has just been drawn. | |
Whatever can give a matrix real scrollbars.
A matrix too large for the window can be shown in a viewport with native scrollbars (Configuration::OversizedMatrices::scroll). Cells are model objects, though: the same MatrCell is laid out for the screen, for printing and for every graphical export, and only one of those has a window a scrollbar could live in. So the cell never creates a widget itself. It only knows its viewport, its scroll offset and where its scrollbars belong, and tells the host each time it is drawn; the host – the Worksheet's MatrixScrollbars – owns the actual wxScrollBars.
The host is reached through Configuration::GetMatrixScrollHost(), which only the worksheet's own configuration ever has set. A configuration for printing or exporting doesn't, and a matrix laid out under one elides its middle instead, since paper and image files can't scroll.
|
pure virtual |
A matrix that needs scrollbars has just been drawn.
Called from MatrCell::Draw(), i.e. from inside the paint handler, so the host must not create, move or show windows here – only note what is needed, and act once the paint is over.
Implemented in MatrixScrollbars, and FakeScrollHost.
|
pure virtual |
How thick a native scrollbar is, in worksheet pixels.
Implemented in MatrixScrollbars, and FakeScrollHost.