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

Per-side edge gap values (resolved, non-negative pixel values) More...

#include <phosphor-layout-api/include/PhosphorLayoutApi/EdgeGaps.h>

Public Member Functions

bool operator== (const EdgeGaps &) const =default
 
bool isUniform () const
 

Static Public Member Functions

static EdgeGaps uniform (int gap)
 

Public Attributes

int top = 8
 
int bottom = 8
 
int left = 8
 
int right = 8
 

Static Public Attributes

static constexpr int UseGlobal = -1
 Sentinel value meaning "use the global edge-gap setting for this side" (rather than an explicit pixel override).
 

Detailed Description

Per-side edge gap values (resolved, non-negative pixel values)

Used wherever a layout has independent margins on each screen edge (top/bottom/left/right). Both manual zone layouts (PhosphorZones::Layout) and tiling-algorithm output (PhosphorTiles::TilingAlgorithm) consume this shape, so it lives in the shared API library that both depend on.

When per-side edge gaps are disabled, callers materialise a uniform set via EdgeGaps::uniform(gap). Default member values (8 px) represent the application default.

Note
Manual Layout::rawOuterGaps() returns an EdgeGaps whose fields may carry the UseGlobal sentinel (meaning "fall back to the global setting for this side"); those must be resolved via the layout's getEffectiveOuterGaps() before use in geometry calculations.

Member Function Documentation

◆ isUniform()

bool PhosphorLayout::EdgeGaps::isUniform ( ) const
inline

◆ operator==()

bool PhosphorLayout::EdgeGaps::operator== ( const EdgeGaps ) const
default

◆ uniform()

static EdgeGaps PhosphorLayout::EdgeGaps::uniform ( int  gap)
inlinestatic

Member Data Documentation

◆ bottom

int PhosphorLayout::EdgeGaps::bottom = 8

◆ left

int PhosphorLayout::EdgeGaps::left = 8

◆ right

int PhosphorLayout::EdgeGaps::right = 8

◆ top

int PhosphorLayout::EdgeGaps::top = 8

◆ UseGlobal

constexpr int PhosphorLayout::EdgeGaps::UseGlobal = -1
staticconstexpr

Sentinel value meaning "use the global edge-gap setting for this side" (rather than an explicit pixel override).

Manual layouts store this in any of the four fields to defer to the global setting; Layout::getEffectiveOuterGaps resolves it to a concrete pixel value before geometry calculations consume the struct.


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