|
wxMaxima
|
The native scrollbars of the matrices a worksheet shows in a viewport. More...
#include <MatrixScrollbars.h>
Public Member Functions | |
| MatrixScrollbars (wxScrolled< wxWindow > *worksheet) | |
| MatrixScrollbars (const MatrixScrollbars &)=delete | |
| MatrixScrollbars & | operator= (const MatrixScrollbars &)=delete |
| wxCoord | ScrollbarThickness () const override |
| How thick a native scrollbar is, in worksheet pixels. | |
| void | MatrixDrawn (MatrCell *matrix) override |
| A matrix that needs scrollbars has just been drawn. | |
| void | BeginPaint () |
| To be called before a paint draws any cell. | |
| void | EndPaint (const wxRegion &updateRegion) |
| To be called once a paint has drawn all it is going to. | |
| void | Sync () |
| Creates, moves, shows and hides scrollbars as the last paint found. | |
| size_t | VisibleScrollbars () const |
| How many scrollbars are visible right now (for tests) | |
The native scrollbars of the matrices a worksheet shows in a viewport.
A MatrCell in Configuration::OversizedMatrices::scroll mode knows where its scrollbars belong, but owns no window: see MatrixScrollHost for why. This is the worksheet's side of that arrangement. It keeps one real wxScrollBar per scrollbar a matrix needs, as a child window of the worksheet, and keeps them in line with the matrices:
Moving a matrix's scrollbar scrolls the matrix (MatrCell::ScrollTo()) and redraws just it; no relayout is needed. The mouse wheel over the matrix still scrolls the worksheet, so a matrix never traps the wheel, and the scrollbars never keep the keyboard focus: typing always goes to the worksheet.
| void MatrixScrollbars::EndPaint | ( | const wxRegion & | updateRegion | ) |
To be called once a paint has drawn all it is going to.
| updateRegion | what the paint repainted, in window coordinates |
|
overridevirtual |
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.
Implements MatrixScrollHost.
|
overridevirtual |
How thick a native scrollbar is, in worksheet pixels.
Implements MatrixScrollHost.