Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorScrollEngine::ScrollVisibleTile Struct Reference

One visible tile of a strip: the unit of the scroll "zone number" space. More...

#include <PhosphorScrollEngine/ScrollEngineTypes.h>

Public Attributes

QString windowId
int columnIndex = -1
 Strip index of the owning column.
int zoneNumber = 0
 The tile's 1-based zone number, stamped by the walk.
QRect rect
 Absolute pixel rect, clipped to the work area.
int tabCount = 0
 How many tabs the owning column's indicator shows, and 0 when it draws no indicator at all.
int activeTabIndex = -1
 Which tab of tabCount this tile is, 0-based, and -1 when the column draws no indicator.
TabIndicatorPosition tabIndicatorPosition = TabIndicatorPosition::Left
 Which edge of the column the indicator runs along.
qreal tabLengthProportion = 0.0
 How much of that edge the indicator covers, 0 to 1, centered on it (TabIndicatorParams::indicatorRectFor centers on the long axis).

Detailed Description

One visible tile of a strip: the unit of the scroll "zone number" space.

Zone number N is ScrollEngine::visibleTiles(screenId).at(N - 1) — sequential in strip order (columns left to right, tiles top to bottom). That is the ADDRESS space, and it is single-sourced: previews label it and the Snap-to-Zone digits resolve against it through moveFocusedToPosition, both from that one walk, so they always name the same tile.

The ACTION a digit performs is COARSER than the address it resolves. A digit naming a stack-mate of the operated window reorders that window inside its column, but a digit naming a tile in ANOTHER column moves the whole active COLUMN to that column's strip position — the deliberate pre-tile-numbering behaviour, kept because the column is the strip's unit of travel. The consequence is real and is not a bug: stack-mates travel along, and after a cross-column move the operated window's own number may differ from the digit pressed (any stacked column shifts the walk, and Always/OnOverflow centering re-derives the visible set around the new active column).

Member Data Documentation

◆ activeTabIndex

int PhosphorScrollEngine::ScrollVisibleTile::activeTabIndex = -1

Which tab of tabCount this tile is, 0-based, and -1 when the column draws no indicator.

A resolved tabbed column has exactly one non-hidden tile, so exactly one visible tile carries the column's tab data.

◆ columnIndex

int PhosphorScrollEngine::ScrollVisibleTile::columnIndex = -1

Strip index of the owning column.

Not the zone number, and not unique across the walk — a stacked column contributes one entry per visible tile, all carrying the same index. Read by callers that need to tell stack-mates apart from separate columns; the engine's own tests and the D-Bus adaptor test are the only such callers today.

◆ rect

QRect PhosphorScrollEngine::ScrollVisibleTile::rect

Absolute pixel rect, clipped to the work area.

◆ tabCount

int PhosphorScrollEngine::ScrollVisibleTile::tabCount = 0

How many tabs the owning column's indicator shows, and 0 when it draws no indicator at all.

The gate is the resolved indicator rect, where the compositor's tab-strip payload starts too (engine_apply.cpp): that one rect already folds in the master switch, the single-tab skip and "this column is not tabbed". The emitter's gate differs from this one both ways: it drops a column still in view whose every tile parked, so such a column can carry an indicator here the screen does not draw, and it keeps a DEPARTING column's pills for the outgoing leg of a view slide, while no visible tile is left to carry them here. Counts the column's tiles including the hidden ones — those ARE the tabs; only minimized tiles are absent, and they have no pill on screen either.

◆ tabIndicatorPosition

TabIndicatorPosition PhosphorScrollEngine::ScrollVisibleTile::tabIndicatorPosition = TabIndicatorPosition::Left

Which edge of the column the indicator runs along.

Meaningful only while tabCount is above zero; the default matches ResolvedColumn::tabIndicatorPosition's.

◆ tabLengthProportion

qreal PhosphorScrollEngine::ScrollVisibleTile::tabLengthProportion = 0.0

How much of that edge the indicator covers, 0 to 1, centered on it (TabIndicatorParams::indicatorRectFor centers on the long axis).

The RESOLVED proportion, measured off the two rects rather than copied from the setting, so the rounding and the 1px floor the resolve applied are already in it.

The indicator's THICKNESS deliberately does not ride along. It is a handful of pixels, which is under half a pixel once a preview scales a screen into a thumbnail, so every renderer of this has to floor it to something legible and a true value would only invite one of them to draw an invisible indicator faithfully.

◆ windowId

QString PhosphorScrollEngine::ScrollVisibleTile::windowId

◆ zoneNumber

int PhosphorScrollEngine::ScrollVisibleTile::zoneNumber = 0

The tile's 1-based zone number, stamped by the walk.

THE number space: every consumer (preview labels, the OSD, the Snap-to-Zone digits) reads this rather than re-deriving an ordinal from its own iteration, so no consumer can drift out of step with another.


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