Inputs a relayout resolves pixel rects against. More...
#include <PhosphorScrollEngine/ScrollTypes.h>
Public Attributes | |
| QRect | workArea |
| QRect | rawWorkArea |
| The screen's available geometry BEFORE the outer-gap shrink and the smart-gaps zeroing — still strut-adjusted, so panels stay respected. | |
| int | gap = 0 |
| StripAxis | axis = StripAxis::horizontal() |
| Which way this screen's strip runs. | |
| QList< qreal > | presetColumnWidths {1.0 / 3.0, 0.5, 2.0 / 3.0, 0.75, 1.0} |
| Preset proportion lists (the niri 1/3, 1/2, 2/3 plus 3/4 and full). | |
| QList< qreal > | presetWindowHeights {1.0 / 3.0, 0.5, 2.0 / 3.0, 0.75, 1.0} |
| CenterFocusedColumn | centerFocusedColumn = CenterFocusedColumn::Never |
| bool | alwaysCenterSingleColumn = false |
| bool | respectMinimumSize = true |
| Whether the strip's layout math honours windows' minimum frame sizes (the column MAIN floor, the tile CROSS floor and its rebalance, and the interactive-resize floor), and with them the extents a client's own commits hold its column and its tile to (committedFloor and committedCrossFloor below) and the peek floor that memory raises. | |
| bool | centerShortColumns = false |
| Whether a column whose visible tiles resolve to less than the column's own CROSS extent is centred on that axis instead of hugging the start edge. | |
| bool | cropStraddlers = false |
| Whether main-axis straddlers keep their TRUE rect for the effect to crop (true) instead of being clamped at the screen edge. | |
| WindowHeight | defaultWindowHeight {} |
| The context's default window height intent, seeded onto every fresh-created tile (restore paths overwrite it via setWindowHeightIntent). | |
| ColumnWidth | defaultColumnWidth = ColumnWidth::makeProportion(0.5) |
| The context's default column width — the un-maximize fallback for a full-MAIN-extent column with no stored pre-maximize intent. | |
| TabIndicatorParams | tabIndicator {} |
| Geometry inputs for the tab indicator drawn beside a tabbed column. | |
| std::function< QSize(const QString &windowId)> | committedFloor |
| Per window: the extent along the strip a client's own commits hold its column to (ScrollEngine::reportCommittedSize), read by the strip exactly like the tile's declared minimum along the strip and under the same respectMinimumSize gate. | |
| std::function< int(const QString &windowId)> | committedCrossFloor |
| Per window: the share of its column ACROSS the strip a client's own commits hold its tile to (ScrollEngine::reportCommittedSize), read by the strip exactly like the tile's declared minimum across the strip, and only under respectMinimumSize. | |
Inputs a relayout resolves pixel rects against.
The work area is the screen's available geometry already shrunk by the outer gaps; gap is the inner gap between columns and between tiles in a column.
| bool PhosphorScrollEngine::ScrollLayoutParams::alwaysCenterSingleColumn = false |
| StripAxis PhosphorScrollEngine::ScrollLayoutParams::axis = StripAxis::horizontal() |
Which way this screen's strip runs.
Resolved per screen in layoutParamsForScreen, so a portrait and a landscape monitor in one session hold different axes at the same time. A resolved axis is never an INPUT to a new layout: resolve it per screen, per pass, from the tri-state setting and the live work area, so a rotation or a monitor swap cannot hand one screen the other's verdict.
RECORDING the axis a past pass resolved is a different thing, and deliberate. ScrollState stamps both lastAppliedAxis (part of the view-delta baseline, which is meaningless without knowing which axis the offset was measured along) and resolvedAxis (what the flip sweep compares against). Those are history, not inputs, and must not be deleted in the name of the rule above.
Defaulted to Horizontal so every existing construction, the test fixtures included, keeps the historical layout with no edit.
| CenterFocusedColumn PhosphorScrollEngine::ScrollLayoutParams::centerFocusedColumn = CenterFocusedColumn::Never |
| bool PhosphorScrollEngine::ScrollLayoutParams::centerShortColumns = false |
Whether a column whose visible tiles resolve to less than the column's own CROSS extent is centred on that axis instead of hugging the start edge.
Off (the niri behaviour) a solo window with an explicit Fixed/Preset height sits at the top of its column and the slack is left below it. A column that already fills the cross axis, the all-Auto case included, resolves identically either way.
| std::function<int(const QString& windowId)> PhosphorScrollEngine::ScrollLayoutParams::committedCrossFloor |
Per window: the share of its column ACROSS the strip a client's own commits hold its tile to (ScrollEngine::reportCommittedSize), read by the strip exactly like the tile's declared minimum across the strip, and only under respectMinimumSize.
Already resolved for this params' axis, so a floor learned across a strip running the other way never reads here. 0 is no floor, and empty (the default) is no floor for any window, like committedFloor.
| std::function<QSize(const QString& windowId)> PhosphorScrollEngine::ScrollLayoutParams::committedFloor |
Per window: the extent along the strip a client's own commits hold its column to (ScrollEngine::reportCommittedSize), read by the strip exactly like the tile's declared minimum along the strip and under the same respectMinimumSize gate.
Answered as a size whose WIDTH is the floor along a horizontal strip and whose HEIGHT is the floor along a vertical one, so the strip takes axis.mainSize() of it and a floor learned on a strip running the other way never reads as its own. 0 on either axis is no floor. Empty (the default) is no floor for any window, which is what a strip laid out outside an engine gets; the engine sets it on every params it resolves, so the drag-insert probe and every verb read the same floors the apply does.
| bool PhosphorScrollEngine::ScrollLayoutParams::cropStraddlers = false |
Whether main-axis straddlers keep their TRUE rect for the effect to crop (true) instead of being clamped at the screen edge.
Resolved once in layoutParamsForScreen like every other per-screen bool, so the apply path does not fetch the override map a second time per batch for this one value.
| ColumnWidth PhosphorScrollEngine::ScrollLayoutParams::defaultColumnWidth = ColumnWidth::makeProportion(0.5) |
The context's default column width — the un-maximize fallback for a full-MAIN-extent column with no stored pre-maximize intent.
| WindowHeight PhosphorScrollEngine::ScrollLayoutParams::defaultWindowHeight {} |
The context's default window height intent, seeded onto every fresh-created tile (restore paths overwrite it via setWindowHeightIntent).
Default-constructed = Auto weight 1, the historical even split.
| int PhosphorScrollEngine::ScrollLayoutParams::gap = 0 |
| QList<qreal> PhosphorScrollEngine::ScrollLayoutParams::presetColumnWidths {1.0 / 3.0, 0.5, 2.0 / 3.0, 0.75, 1.0} |
Preset proportion lists (the niri 1/3, 1/2, 2/3 plus 3/4 and full).
Never empty — resolvers snap a Preset fraction anchor to the nearest entry. KEEP IN SYNC with FOUR other copies, not one:
| QList<qreal> PhosphorScrollEngine::ScrollLayoutParams::presetWindowHeights {1.0 / 3.0, 0.5, 2.0 / 3.0, 0.75, 1.0} |
| QRect PhosphorScrollEngine::ScrollLayoutParams::rawWorkArea |
The screen's available geometry BEFORE the outer-gap shrink and the smart-gaps zeroing — still strut-adjusted, so panels stay respected.
Only a maximized-to-edges column resolves against it; everything else reads workArea. Clamped to null exactly like workArea when the screen is unknown or removed, so the degenerate-area bails cover both.
| bool PhosphorScrollEngine::ScrollLayoutParams::respectMinimumSize = true |
Whether the strip's layout math honours windows' minimum frame sizes (the column MAIN floor, the tile CROSS floor and its rebalance, and the interactive-resize floor), and with them the extents a client's own commits hold its column and its tile to (committedFloor and committedCrossFloor below) and the peek floor that memory raises.
Off, the resolved rects obey the user's intents and the compositor's own min-size enforcement decides what overhangs, and no committed extent is learned or read. The work-area-oversized float escape for a DECLARED minimum ignores this flag; the one for a committed extent cannot fire without it, since nothing is learned.
| TabIndicatorParams PhosphorScrollEngine::ScrollLayoutParams::tabIndicator {} |
Geometry inputs for the tab indicator drawn beside a tabbed column.
Default-constructed = the family's own defaults, so a caller that never sets it gets an indicator that reserves nothing.
| QRect PhosphorScrollEngine::ScrollLayoutParams::workArea |