36#ifndef WORKSHEETLAYOUT_H
37#define WORKSHEETLAYOUT_H
67 std::function<
GroupCell *()> getLastCell);
145 std::function<
GroupCell *()> m_getLastCell;
149 int m_maxWidth_Cached = -1;
157 int m_scrollUnit = 10;
159 bool m_adjustWorksheetSizeNeeded =
false;
Implementation of an observing weak Cell pointer.
The pure arithmetic that turns a laid-out worksheet's extent into the scrollable (virtual) size and s...
A weak non-owning pointer that becomes null whenever the observed object is destroyed.
Definition: CellPtr.h:511
The base class all cell types the worksheet can consist of are derived from.
Definition: Cell.h:141
The configuration storage for the current worksheet.
Definition: Configuration.h:97
A cell grouping input (and, if there is one, also the output) cell to a foldable item.
Definition: GroupCell.h:87
The layout/recalculation engine of a worksheet.
Definition: WorksheetLayout.h:54
void RequestAdjustSize()
Flag the virtual (scroll) size as needing re-adjustment.
Definition: WorksheetLayout.h:132
void RequestRecalculation(Cell *start)
Schedule a recalculation of the worksheet starting with the cell start.
Definition: WorksheetLayout.cpp:136
void GetMaxPoint(int *width, int *height)
Get the coordinates of the bottom right point of the worksheet.
Definition: WorksheetLayout.cpp:178
void UpdateConfigurationClientSize()
Inform the configuration about the view's current client size.
Definition: WorksheetLayout.cpp:165
void AdjustSize()
Adjust the virtual size and scrollbars to the document's extent.
Definition: WorksheetLayout.cpp:224
int GetScrollUnit() const
The scroll granularity (device px per scroll unit) AdjustSize() last applied.
Definition: WorksheetLayout.h:123
int GroupCellWidthWithMargins(int cellWidth) const
The horizontal space a group cell of the given width occupies.
Definition: WorksheetLayout.cpp:171
bool RecalculateIfNeeded(bool timeout=false, long timeSliceMs=50)
Perform the scheduled recalculation, if one is pending.
Definition: WorksheetLayout.cpp:41
void CancelPendingRecalculation()
Drop any pending recalculation (e.g. when the document is cleared).
Definition: WorksheetLayout.h:135
The narrow view surface the worksheet's layout pipeline needs.
Definition: WorksheetSizeMath.h:172
Remembers the last virtual size applied, so an unchanged size is a no-op.
Definition: WorksheetSizeMath.h:188