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

The narrow view surface the worksheet's layout pipeline needs. More...

#include <WorksheetSizeMath.h>

Inheritance diagram for WorksheetView:
[legend]

Public Member Functions

virtual void GetViewClientSize (int *width, int *height) const =0
 The visible client area, in device pixels.
 
virtual int GetViewScrollUnitY () const =0
 The current vertical scroll position, in scroll units (not pixels).
 
virtual void SetViewVirtualSize (int width, int height)=0
 Set the scrollable (virtual) area, in device pixels.
 
virtual void SetViewScrollRate (int rate)=0
 Set the scroll granularity (device pixels per scroll unit) on both axes.
 
virtual void GetViewPosition (int *x, int *y) const =0
 The view's position within its parent, in device pixels (wxWindow::GetPosition).
 

Detailed Description

The narrow view surface the worksheet's layout pipeline needs.

Worksheet's AdjustSize() historically read the window (client size, scroll position) and wrote the scrollbars (virtual size, scroll rate) inline, which meant the deduplication and scroll-position-preserving logic could only ever run inside a live GUI. This abstract interface pulls those four operations out so the apply step can be driven headlessly by a mock view.

The method names deliberately differ from the wxScrolled ones they forward to, so a class can inherit both wxScrolled and this without name-collision. Kept GUI-free (plain ints, no wx types) so a mock has nothing to pull in.

Member Function Documentation

◆ GetViewClientSize()

virtual void WorksheetView::GetViewClientSize ( int *  width,
int *  height 
) const
pure virtual

The visible client area, in device pixels.

Implemented in Worksheet.

◆ GetViewPosition()

virtual void WorksheetView::GetViewPosition ( int *  x,
int *  y 
) const
pure virtual

The view's position within its parent, in device pixels (wxWindow::GetPosition).

Implemented in Worksheet.

◆ GetViewScrollUnitY()

virtual int WorksheetView::GetViewScrollUnitY ( ) const
pure virtual

The current vertical scroll position, in scroll units (not pixels).

Implemented in Worksheet.

◆ SetViewScrollRate()

virtual void WorksheetView::SetViewScrollRate ( int  rate)
pure virtual

Set the scroll granularity (device pixels per scroll unit) on both axes.

Implemented in Worksheet.

◆ SetViewVirtualSize()

virtual void WorksheetView::SetViewVirtualSize ( int  width,
int  height 
)
pure virtual

Set the scrollable (virtual) area, in device pixels.

Implemented in Worksheet.


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