wxMaxima
Loading...
Searching...
No Matches
Public Member Functions
MatrixScrollHost Class Referenceabstract

Whatever can give a matrix real scrollbars. More...

#include <MatrixScrollHost.h>

Inheritance diagram for MatrixScrollHost:
[legend]

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.
 

Detailed Description

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.

Member Function Documentation

◆ MatrixDrawn()

virtual void MatrixScrollHost::MatrixDrawn ( MatrCell *  matrix)
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.

◆ ScrollbarThickness()

virtual wxCoord MatrixScrollHost::ScrollbarThickness ( ) const
pure virtual

How thick a native scrollbar is, in worksheet pixels.

Implemented in MatrixScrollbars, and FakeScrollHost.


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