TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::LayoutOverride Struct Reference

Per-element overrides of style layout properties. More...

#include <gui_core/layout/gui_constraints.h>

Classes

struct  [struct].grid
 Grid item overrides; Default tracks and start < 0 keep the style's values. More...

Public Member Functions

 LayoutOverride ()=default
constexpr bool HasFixedWidth () const
 Whether an explicit width / height is set; axis 0 = width, 1 = height.
constexpr bool HasFixedHeight () const
constexpr bool HasFixedAxis (int axis) const
constexpr bool IsFullyConstrained () const
 Both width and height are explicit.
constexpr int32_t ClampWidth (int32_t w) const
 Clamps a size to the min / max constraints, ignoring the explicit size.
constexpr int32_t ClampHeight (int32_t h) const
int2 Size () const
 The explicit sizes; kAuto on axes without one.
int2 ApplySize (int2 s) const
 The explicit size where set, else s clamped to min / max.
int32_t ApplyWidth (int32_t s) const
int32_t ApplyHeight (int32_t s) const
constexpr bool IsInFlowX () const
 True when the element takes part in the parent's flow on that axis (see PositionConstraintAxis::IsInFlow).
constexpr bool IsInFlowY () const
constexpr bool IsInFlow () const
constexpr bool IsInFlowAxis (int axis) const
void ApplyHorizontal (IntRect &rect, const IntRect &targetRect) const
 Positions rect on one axis against targetRect (the parent, or the anchor target).
void ApplyVertical (IntRect &rect, const IntRect &targetRect) const
template<class PxFn>
void ResolveCss (const PxFn &px)
 CSS px to pixels; ElementStorage::Add does it with the style manager's Px.
LayoutOverride & Centered () &
 Centered in the parent on both axes.
LayoutOverride && Centered () &&
LayoutOverride & ClampScroll (bool v=true) &
 Overrides the style's scroll clamping (false = unclamped / infinite scroll).
LayoutOverride && ClampScroll (bool v=true) &&
uint32_t GetFlexGrow (const LayoutStyle *ls) const
 Resolvers take the element's layout style (may be null) and return the effective value.
uint32_t GetFlexShrink (const LayoutStyle *ls) const
BreakBehavior GetBreakBehavior (const LayoutStyle *ls) const
bool GetBreakBefore (const LayoutStyle *ls) const
bool GetBreakAfter (const LayoutStyle *ls) const
bool GetKeepWithNext (const LayoutStyle *ls) const
bool GetClampScroll (const LayoutStyle *ls) const
IconSide GetIconSide (const LayoutStyle *ls) const
uint16_t GetIconTextGap (const LayoutStyle *ls) const
GridProperties GetGridItem (const LayoutStyle *layoutStyle) const
 Style values with non-Default overrides applied.

Static Public Member Functions

static LayoutOverride Auto ()
 No overrides: everything comes from the style.
static LayoutOverride FixedSize (CssPx w, CssPx h)
 Sizes in CSS px (scaled by the UI scale) or in Pixels (as they are); see gui_units.h.
static LayoutOverride FixedSize (Pixels w, Pixels h)
static LayoutOverride FixedSize (int2 pixels)
static LayoutOverride FixedWidth (CssPx w)
static LayoutOverride FixedWidth (Pixels w)
static LayoutOverride FixedHeight (CssPx h)
static LayoutOverride FixedHeight (Pixels h)

Public Attributes

SizeConstraintAxis width {}
SizeConstraintAxis height {}
 Size constraints; set with the size builders.
PositionConstraintAxis x {}
PositionConstraintAxis y {}
 Position constraints; set with the position builders.
FlexOverride flex {}
 flex-grow / flex-shrink overrides
struct  grid
int16_t iconTextGapOverride = -1
 Icon layout overrides (-1 = use style).
IconSide iconSideOverride: 3 = IconSide::None
 None = use style.
uint8_t breakBehaviorOverride: 3 = 0
 0 = use style, otherwise BreakBehavior + 1
TriState clampScroll: 2 = TriState::Default
 Override of the style's scroll clamping.
bool outOfFlow = false
 Set by ElementStorage::Add for display:none / visibility:collapsed; such elements take no space in the parent's flex/grid.
LayoutOverride & Size (CssPx w, CssPx h) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && Size (CssPx w, CssPx h) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & Size (Pixels w, Pixels h) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && Size (Pixels w, Pixels h) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & Size (int2 pixels) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && Size (int2 pixels) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & Width (CssPx w) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && Width (CssPx w) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & Width (Pixels w) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && Width (Pixels w) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & Height (CssPx h) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && Height (CssPx h) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & Height (Pixels h) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && Height (Pixels h) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & MinWidth (CssPx w) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && MinWidth (CssPx w) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & MinWidth (Pixels w) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && MinWidth (Pixels w) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & MinHeight (CssPx h) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && MinHeight (CssPx h) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & MinHeight (Pixels h) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && MinHeight (Pixels h) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & MaxWidth (CssPx w) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && MaxWidth (CssPx w) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & MaxWidth (Pixels w) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && MaxWidth (Pixels w) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & MaxHeight (CssPx h) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && MaxHeight (CssPx h) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & MaxHeight (Pixels h) &
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride && MaxHeight (Pixels h) &&
 Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).
LayoutOverride & Position (int2 p) &
 Position builders, in pixels (near = left/top, far = right/bottom).
LayoutOverride && Position (int2 p) &&
 Position builders, in pixels (near = left/top, far = right/bottom).
LayoutOverride & Position (int32_t px, int32_t py) &
 Position builders, in pixels (near = left/top, far = right/bottom).
LayoutOverride && Position (int32_t px, int32_t py) &&
 Position builders, in pixels (near = left/top, far = right/bottom).
LayoutOverride & Position (int32_t t, int32_t r, int32_t b, int32_t l) &
 Position builders, in pixels (near = left/top, far = right/bottom).
LayoutOverride && Position (int32_t t, int32_t r, int32_t b, int32_t l) &&
 Position builders, in pixels (near = left/top, far = right/bottom).
LayoutOverride & Position (const EdgeInset &i) &
 Position builders, in pixels (near = left/top, far = right/bottom).
LayoutOverride && Position (const EdgeInset &i) &&
 Position builders, in pixels (near = left/top, far = right/bottom).
LayoutOverride & Relative () &
 In flow, shifted by the given offsets from the laid-out position.
LayoutOverride && Relative () &&
 In flow, shifted by the given offsets from the laid-out position.
LayoutOverride & Relative (const EdgeInset &i) &
 In flow, shifted by the given offsets from the laid-out position.
LayoutOverride && Relative (const EdgeInset &i) &&
 In flow, shifted by the given offsets from the laid-out position.
LayoutOverride & Relative (int32_t t, int32_t r, int32_t b, int32_t l) &
 In flow, shifted by the given offsets from the laid-out position.
LayoutOverride && Relative (int32_t t, int32_t r, int32_t b, int32_t l) &&
 In flow, shifted by the given offsets from the laid-out position.
LayoutOverride & Relative (int32_t px, int32_t py) &
 In flow, shifted by the given offsets from the laid-out position.
LayoutOverride && Relative (int32_t px, int32_t py) &&
 In flow, shifted by the given offsets from the laid-out position.
LayoutOverride & Relative (const int2 &p) &
 In flow, shifted by the given offsets from the laid-out position.
LayoutOverride && Relative (const int2 &p) &&
 In flow, shifted by the given offsets from the laid-out position.
LayoutOverride & Absolute (const EdgeInset &i) &
 Out of flow, inset from the parent's edges; scrolls with the parent's content.
LayoutOverride && Absolute (const EdgeInset &i) &&
 Out of flow, inset from the parent's edges; scrolls with the parent's content.
LayoutOverride & Absolute (int32_t t, int32_t r, int32_t b, int32_t l) &
 Out of flow, inset from the parent's edges; scrolls with the parent's content.
LayoutOverride && Absolute (int32_t t, int32_t r, int32_t b, int32_t l) &&
 Out of flow, inset from the parent's edges; scrolls with the parent's content.
LayoutOverride & Absolute (int32_t px, int32_t py) &
 Out of flow, inset from the parent's edges; scrolls with the parent's content.
LayoutOverride && Absolute (int32_t px, int32_t py) &&
 Out of flow, inset from the parent's edges; scrolls with the parent's content.
LayoutOverride & Absolute (const int2 &p) &
 Out of flow, inset from the parent's edges; scrolls with the parent's content.
LayoutOverride && Absolute (const int2 &p) &&
 Out of flow, inset from the parent's edges; scrolls with the parent's content.
LayoutOverride & Anchored (ID target, AnchorPlacement pl, const int2 &off={}, AutoFlipMode af=AutoFlipMode::None) &
 Placed next to / inside the target element per the placement, plus an offset in pixels.
LayoutOverride && Anchored (ID target, AnchorPlacement pl, const int2 &off={}, AutoFlipMode af=AutoFlipMode::None) &&
 Placed next to / inside the target element per the placement, plus an offset in pixels.
LayoutOverride & Anchored (ID target, AnchorPlacement pl, int32_t ox, int32_t oy, AutoFlipMode af=AutoFlipMode::None) &
 Placed next to / inside the target element per the placement, plus an offset in pixels.
LayoutOverride && Anchored (ID target, AnchorPlacement pl, int32_t ox, int32_t oy, AutoFlipMode af=AutoFlipMode::None) &&
 Placed next to / inside the target element per the placement, plus an offset in pixels.
LayoutOverride & Anchored (ID target, AnchorPlacementAxis px, int32_t ox, AnchorPlacementAxis py, int32_t oy, AutoFlipMode af=AutoFlipMode::None) &
 Placed next to / inside the target element per the placement, plus an offset in pixels.
LayoutOverride && Anchored (ID target, AnchorPlacementAxis px, int32_t ox, AnchorPlacementAxis py, int32_t oy, AutoFlipMode af=AutoFlipMode::None) &&
 Placed next to / inside the target element per the placement, plus an offset in pixels.
LayoutOverride & Overhang (const int2 &o) &
 After Anchored: how far past the work area the element may reach on each axis, for see-through room around what it shows (a shadow): flips and clamps keep only the rest on the screen.
LayoutOverride && Overhang (const int2 &o) &&
 Placed next to / inside the target element per the placement, plus an offset in pixels.
LayoutOverride & PositionX (PositionConstraintAxis ax) &
 Sets one axis's constraint, or only its PositionType.
LayoutOverride && PositionX (PositionConstraintAxis ax) &&
 Sets one axis's constraint, or only its PositionType.
LayoutOverride & PositionY (PositionConstraintAxis ay) &
 Sets one axis's constraint, or only its PositionType.
LayoutOverride && PositionY (PositionConstraintAxis ay) &&
 Sets one axis's constraint, or only its PositionType.
LayoutOverride & WithTypeX (PositionType t) &
 Sets one axis's constraint, or only its PositionType.
LayoutOverride && WithTypeX (PositionType t) &&
 Sets one axis's constraint, or only its PositionType.
LayoutOverride & WithTypeY (PositionType t) &
 Sets one axis's constraint, or only its PositionType.
LayoutOverride && WithTypeY (PositionType t) &&
 Sets one axis's constraint, or only its PositionType.
LayoutOverride & StickyX (int16_t threshold=0) &
 See PositionConstraintAxis::Sticky.
LayoutOverride && StickyX (int16_t threshold=0) &&
 See PositionConstraintAxis::Sticky.
LayoutOverride & StickyY (int16_t threshold=0) &
 See PositionConstraintAxis::Sticky.
LayoutOverride && StickyY (int16_t threshold=0) &&
 See PositionConstraintAxis::Sticky.
LayoutOverride & Sticky (int16_t thresholdX=0, int16_t thresholdY=0) &
 See PositionConstraintAxis::Sticky.
LayoutOverride && Sticky (int16_t thresholdX=0, int16_t thresholdY=0) &&
 See PositionConstraintAxis::Sticky.
LayoutOverride & BreakAfter (bool v=true) &
 Forces a line break after / before this element, or keeps it on the same line as the next one.
LayoutOverride && BreakAfter (bool v=true) &&
 Forces a line break after / before this element, or keeps it on the same line as the next one.
LayoutOverride & BreakBefore (bool v=true) &
 Forces a line break after / before this element, or keeps it on the same line as the next one.
LayoutOverride && BreakBefore (bool v=true) &&
 Forces a line break after / before this element, or keeps it on the same line as the next one.
LayoutOverride & KeepWithNext (bool v=true) &
 Forces a line break after / before this element, or keeps it on the same line as the next one.
LayoutOverride && KeepWithNext (bool v=true) &&
 Forces a line break after / before this element, or keeps it on the same line as the next one.
LayoutOverride & FlexGrow (int16_t v) &
 Overrides the style's flex-grow / flex-shrink.
LayoutOverride && FlexGrow (int16_t v) &&
 Overrides the style's flex-grow / flex-shrink.
LayoutOverride & FlexShrink (int16_t v) &
 Overrides the style's flex-grow / flex-shrink.
LayoutOverride && FlexShrink (int16_t v) &&
 Overrides the style's flex-grow / flex-shrink.
LayoutOverride & NoGrow () &
 Shorthands for FlexGrow(0) / FlexShrink(0).
LayoutOverride && NoGrow () &&
 Shorthands for FlexGrow(0) / FlexShrink(0).
LayoutOverride & NoShrink () &
 Shorthands for FlexGrow(0) / FlexShrink(0).
LayoutOverride && NoShrink () &&
 Shorthands for FlexGrow(0) / FlexShrink(0).
LayoutOverride & SetIconSide (IconSide s) &
 Overrides the style's icon side / icon-text gap (pixels).
LayoutOverride && SetIconSide (IconSide s) &&
 Overrides the style's icon side / icon-text gap (pixels).
LayoutOverride & IconTextGap (int16_t gap) &
 Overrides the style's icon side / icon-text gap (pixels).
LayoutOverride && IconTextGap (int16_t gap) &&
 Overrides the style's icon side / icon-text gap (pixels).
LayoutOverride & ColumnTrack (GridTrack t) &
 Overrides the style's column / row track size.
LayoutOverride && ColumnTrack (GridTrack t) &&
 Overrides the style's column / row track size.
LayoutOverride & RowTrack (GridTrack t) &
 Overrides the style's column / row track size.
LayoutOverride && RowTrack (GridTrack t) &&
 Overrides the style's column / row track size.
LayoutOverride & GridColumn (int16_t start, int16_t span=1) &
 Explicit grid placement: start cell and span.
LayoutOverride && GridColumn (int16_t start, int16_t span=1) &&
 Explicit grid placement: start cell and span.
LayoutOverride & GridRow (int16_t start, int16_t span=1) &
 Explicit grid placement: start cell and span.
LayoutOverride && GridRow (int16_t start, int16_t span=1) &&
 Explicit grid placement: start cell and span.

Detailed Description

Per-element overrides of style layout properties.

Sizes are CSS px; the builders chain:

BeginWindow(windowID, "Hello", LayoutOverride{}.Size(360, 160));
BeginVertical(LayoutOverride{}.FlexGrow(1));                  // fill the free space
Button("Object", onClick, LayoutOverride{}.NoGrow());         // keep its natural width
BeginWindow(windowID, "Docking", theme.mainWindowStyleRef,
            LayoutOverride::FixedSize(900, 600).Centered()); 
Examples
controls/controls.cpp, custom_theme/custom_theme.cpp, docking/docking.cpp, and hello_world/hello_world.cpp.

Constructor & Destructor Documentation

◆ LayoutOverride()

tachyon::LayoutOverride::LayoutOverride ( )
default

Member Function Documentation

◆ Auto()

LayoutOverride tachyon::LayoutOverride::Auto ( )
inlinestatic

No overrides: everything comes from the style.

Examples
docking/docking.cpp.

◆ FixedSize() [1/3]

LayoutOverride tachyon::LayoutOverride::FixedSize ( CssPx w,
CssPx h )
inlinestatic

Sizes in CSS px (scaled by the UI scale) or in Pixels (as they are); see gui_units.h.

Examples
docking/docking.cpp.

◆ FixedSize() [2/3]

LayoutOverride tachyon::LayoutOverride::FixedSize ( Pixels w,
Pixels h )
inlinestatic

◆ FixedSize() [3/3]

LayoutOverride tachyon::LayoutOverride::FixedSize ( int2 pixels)
inlinestatic

◆ FixedWidth() [1/2]

LayoutOverride tachyon::LayoutOverride::FixedWidth ( CssPx w)
inlinestatic

◆ FixedWidth() [2/2]

LayoutOverride tachyon::LayoutOverride::FixedWidth ( Pixels w)
inlinestatic

◆ FixedHeight() [1/2]

LayoutOverride tachyon::LayoutOverride::FixedHeight ( CssPx h)
inlinestatic

◆ FixedHeight() [2/2]

LayoutOverride tachyon::LayoutOverride::FixedHeight ( Pixels h)
inlinestatic

◆ HasFixedWidth()

bool tachyon::LayoutOverride::HasFixedWidth ( ) const
inlineconstexpr

Whether an explicit width / height is set; axis 0 = width, 1 = height.

◆ HasFixedHeight()

bool tachyon::LayoutOverride::HasFixedHeight ( ) const
inlineconstexpr

◆ HasFixedAxis()

bool tachyon::LayoutOverride::HasFixedAxis ( int axis) const
inlineconstexpr

◆ IsFullyConstrained()

bool tachyon::LayoutOverride::IsFullyConstrained ( ) const
inlineconstexpr

Both width and height are explicit.

◆ ClampWidth()

int32_t tachyon::LayoutOverride::ClampWidth ( int32_t w) const
inlineconstexpr

Clamps a size to the min / max constraints, ignoring the explicit size.

◆ ClampHeight()

int32_t tachyon::LayoutOverride::ClampHeight ( int32_t h) const
inlineconstexpr

◆ Size() [1/7]

int2 tachyon::LayoutOverride::Size ( ) const
inline

The explicit sizes; kAuto on axes without one.

Examples
controls/controls.cpp, custom_theme/custom_theme.cpp, and hello_world/hello_world.cpp.

◆ ApplySize()

int2 tachyon::LayoutOverride::ApplySize ( int2 s) const
inline

The explicit size where set, else s clamped to min / max.

◆ ApplyWidth()

int32_t tachyon::LayoutOverride::ApplyWidth ( int32_t s) const
inline

◆ ApplyHeight()

int32_t tachyon::LayoutOverride::ApplyHeight ( int32_t s) const
inline

◆ IsInFlowX()

bool tachyon::LayoutOverride::IsInFlowX ( ) const
inlineconstexpr

True when the element takes part in the parent's flow on that axis (see PositionConstraintAxis::IsInFlow).

◆ IsInFlowY()

bool tachyon::LayoutOverride::IsInFlowY ( ) const
inlineconstexpr

◆ IsInFlow()

bool tachyon::LayoutOverride::IsInFlow ( ) const
inlineconstexpr

◆ IsInFlowAxis()

bool tachyon::LayoutOverride::IsInFlowAxis ( int axis) const
inlineconstexpr

◆ ApplyHorizontal()

void tachyon::LayoutOverride::ApplyHorizontal ( IntRect & rect,
const IntRect & targetRect ) const
inline

Positions rect on one axis against targetRect (the parent, or the anchor target).

◆ ApplyVertical()

void tachyon::LayoutOverride::ApplyVertical ( IntRect & rect,
const IntRect & targetRect ) const
inline

◆ Size() [2/7]

LayoutOverride & tachyon::LayoutOverride::Size ( CssPx w,
CssPx h ) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Size() [3/7]

LayoutOverride && tachyon::LayoutOverride::Size ( CssPx w,
CssPx h ) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Size() [4/7]

LayoutOverride & tachyon::LayoutOverride::Size ( Pixels w,
Pixels h ) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Size() [5/7]

LayoutOverride && tachyon::LayoutOverride::Size ( Pixels w,
Pixels h ) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Size() [6/7]

LayoutOverride & tachyon::LayoutOverride::Size ( int2 pixels) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Size() [7/7]

LayoutOverride && tachyon::LayoutOverride::Size ( int2 pixels) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Width() [1/4]

LayoutOverride & tachyon::LayoutOverride::Width ( CssPx w) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Width() [2/4]

LayoutOverride && tachyon::LayoutOverride::Width ( CssPx w) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Width() [3/4]

LayoutOverride & tachyon::LayoutOverride::Width ( Pixels w) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Width() [4/4]

LayoutOverride && tachyon::LayoutOverride::Width ( Pixels w) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Height() [1/4]

LayoutOverride & tachyon::LayoutOverride::Height ( CssPx h) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Height() [2/4]

LayoutOverride && tachyon::LayoutOverride::Height ( CssPx h) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Height() [3/4]

LayoutOverride & tachyon::LayoutOverride::Height ( Pixels h) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ Height() [4/4]

LayoutOverride && tachyon::LayoutOverride::Height ( Pixels h) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MinWidth() [1/4]

LayoutOverride & tachyon::LayoutOverride::MinWidth ( CssPx w) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MinWidth() [2/4]

LayoutOverride && tachyon::LayoutOverride::MinWidth ( CssPx w) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MinWidth() [3/4]

LayoutOverride & tachyon::LayoutOverride::MinWidth ( Pixels w) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MinWidth() [4/4]

LayoutOverride && tachyon::LayoutOverride::MinWidth ( Pixels w) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MinHeight() [1/4]

LayoutOverride & tachyon::LayoutOverride::MinHeight ( CssPx h) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MinHeight() [2/4]

LayoutOverride && tachyon::LayoutOverride::MinHeight ( CssPx h) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MinHeight() [3/4]

LayoutOverride & tachyon::LayoutOverride::MinHeight ( Pixels h) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MinHeight() [4/4]

LayoutOverride && tachyon::LayoutOverride::MinHeight ( Pixels h) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MaxWidth() [1/4]

LayoutOverride & tachyon::LayoutOverride::MaxWidth ( CssPx w) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MaxWidth() [2/4]

LayoutOverride && tachyon::LayoutOverride::MaxWidth ( CssPx w) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MaxWidth() [3/4]

LayoutOverride & tachyon::LayoutOverride::MaxWidth ( Pixels w) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MaxWidth() [4/4]

LayoutOverride && tachyon::LayoutOverride::MaxWidth ( Pixels w) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MaxHeight() [1/4]

LayoutOverride & tachyon::LayoutOverride::MaxHeight ( CssPx h) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MaxHeight() [2/4]

LayoutOverride && tachyon::LayoutOverride::MaxHeight ( CssPx h) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MaxHeight() [3/4]

LayoutOverride & tachyon::LayoutOverride::MaxHeight ( Pixels h) &
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ MaxHeight() [4/4]

LayoutOverride && tachyon::LayoutOverride::MaxHeight ( Pixels h) &&
inline

Size, min and max size, in CSS px (scaled by the UI scale) or Pixels (as they are).

◆ ResolveCss()

template<class PxFn>
void tachyon::LayoutOverride::ResolveCss ( const PxFn & px)
inline

CSS px to pixels; ElementStorage::Add does it with the style manager's Px.

◆ Position() [1/8]

LayoutOverride & tachyon::LayoutOverride::Position ( int2 p) &
inline

Position builders, in pixels (near = left/top, far = right/bottom).

Position() is out of flow in overlay space (PositionType::Fixed): it ignores the parent's scroll.

◆ Position() [2/8]

LayoutOverride && tachyon::LayoutOverride::Position ( int2 p) &&
inline

Position builders, in pixels (near = left/top, far = right/bottom).

Position() is out of flow in overlay space (PositionType::Fixed): it ignores the parent's scroll.

◆ Position() [3/8]

LayoutOverride & tachyon::LayoutOverride::Position ( int32_t px,
int32_t py ) &
inline

Position builders, in pixels (near = left/top, far = right/bottom).

Position() is out of flow in overlay space (PositionType::Fixed): it ignores the parent's scroll.

◆ Position() [4/8]

LayoutOverride && tachyon::LayoutOverride::Position ( int32_t px,
int32_t py ) &&
inline

Position builders, in pixels (near = left/top, far = right/bottom).

Position() is out of flow in overlay space (PositionType::Fixed): it ignores the parent's scroll.

◆ Position() [5/8]

LayoutOverride & tachyon::LayoutOverride::Position ( int32_t t,
int32_t r,
int32_t b,
int32_t l ) &
inline

Position builders, in pixels (near = left/top, far = right/bottom).

Position() is out of flow in overlay space (PositionType::Fixed): it ignores the parent's scroll.

◆ Position() [6/8]

LayoutOverride && tachyon::LayoutOverride::Position ( int32_t t,
int32_t r,
int32_t b,
int32_t l ) &&
inline

Position builders, in pixels (near = left/top, far = right/bottom).

Position() is out of flow in overlay space (PositionType::Fixed): it ignores the parent's scroll.

◆ Position() [7/8]

LayoutOverride & tachyon::LayoutOverride::Position ( const EdgeInset & i) &
inline

Position builders, in pixels (near = left/top, far = right/bottom).

Position() is out of flow in overlay space (PositionType::Fixed): it ignores the parent's scroll.

◆ Position() [8/8]

LayoutOverride && tachyon::LayoutOverride::Position ( const EdgeInset & i) &&
inline

Position builders, in pixels (near = left/top, far = right/bottom).

Position() is out of flow in overlay space (PositionType::Fixed): it ignores the parent's scroll.

◆ Centered() [1/2]

LayoutOverride & tachyon::LayoutOverride::Centered ( ) &
inline

Centered in the parent on both axes.

Examples
docking/docking.cpp.

◆ Centered() [2/2]

LayoutOverride && tachyon::LayoutOverride::Centered ( ) &&
inline

◆ Relative() [1/10]

LayoutOverride & tachyon::LayoutOverride::Relative ( ) &
inline

In flow, shifted by the given offsets from the laid-out position.

◆ Relative() [2/10]

LayoutOverride && tachyon::LayoutOverride::Relative ( ) &&
inline

In flow, shifted by the given offsets from the laid-out position.

◆ Relative() [3/10]

LayoutOverride & tachyon::LayoutOverride::Relative ( const EdgeInset & i) &
inline

In flow, shifted by the given offsets from the laid-out position.

◆ Relative() [4/10]

LayoutOverride && tachyon::LayoutOverride::Relative ( const EdgeInset & i) &&
inline

In flow, shifted by the given offsets from the laid-out position.

◆ Relative() [5/10]

LayoutOverride & tachyon::LayoutOverride::Relative ( int32_t t,
int32_t r,
int32_t b,
int32_t l ) &
inline

In flow, shifted by the given offsets from the laid-out position.

◆ Relative() [6/10]

LayoutOverride && tachyon::LayoutOverride::Relative ( int32_t t,
int32_t r,
int32_t b,
int32_t l ) &&
inline

In flow, shifted by the given offsets from the laid-out position.

◆ Relative() [7/10]

LayoutOverride & tachyon::LayoutOverride::Relative ( int32_t px,
int32_t py ) &
inline

In flow, shifted by the given offsets from the laid-out position.

◆ Relative() [8/10]

LayoutOverride && tachyon::LayoutOverride::Relative ( int32_t px,
int32_t py ) &&
inline

In flow, shifted by the given offsets from the laid-out position.

◆ Relative() [9/10]

LayoutOverride & tachyon::LayoutOverride::Relative ( const int2 & p) &
inline

In flow, shifted by the given offsets from the laid-out position.

◆ Relative() [10/10]

LayoutOverride && tachyon::LayoutOverride::Relative ( const int2 & p) &&
inline

In flow, shifted by the given offsets from the laid-out position.

◆ Absolute() [1/8]

LayoutOverride & tachyon::LayoutOverride::Absolute ( const EdgeInset & i) &
inline

Out of flow, inset from the parent's edges; scrolls with the parent's content.

◆ Absolute() [2/8]

LayoutOverride && tachyon::LayoutOverride::Absolute ( const EdgeInset & i) &&
inline

Out of flow, inset from the parent's edges; scrolls with the parent's content.

◆ Absolute() [3/8]

LayoutOverride & tachyon::LayoutOverride::Absolute ( int32_t t,
int32_t r,
int32_t b,
int32_t l ) &
inline

Out of flow, inset from the parent's edges; scrolls with the parent's content.

◆ Absolute() [4/8]

LayoutOverride && tachyon::LayoutOverride::Absolute ( int32_t t,
int32_t r,
int32_t b,
int32_t l ) &&
inline

Out of flow, inset from the parent's edges; scrolls with the parent's content.

◆ Absolute() [5/8]

LayoutOverride & tachyon::LayoutOverride::Absolute ( int32_t px,
int32_t py ) &
inline

Out of flow, inset from the parent's edges; scrolls with the parent's content.

◆ Absolute() [6/8]

LayoutOverride && tachyon::LayoutOverride::Absolute ( int32_t px,
int32_t py ) &&
inline

Out of flow, inset from the parent's edges; scrolls with the parent's content.

◆ Absolute() [7/8]

LayoutOverride & tachyon::LayoutOverride::Absolute ( const int2 & p) &
inline

Out of flow, inset from the parent's edges; scrolls with the parent's content.

◆ Absolute() [8/8]

LayoutOverride && tachyon::LayoutOverride::Absolute ( const int2 & p) &&
inline

Out of flow, inset from the parent's edges; scrolls with the parent's content.

◆ Anchored() [1/6]

LayoutOverride & tachyon::LayoutOverride::Anchored ( ID target,
AnchorPlacement pl,
const int2 & off = {},
AutoFlipMode af = AutoFlipMode::None ) &
inline

Placed next to / inside the target element per the placement, plus an offset in pixels.

af flips the placement when it would leave the work area.

◆ Anchored() [2/6]

LayoutOverride && tachyon::LayoutOverride::Anchored ( ID target,
AnchorPlacement pl,
const int2 & off = {},
AutoFlipMode af = AutoFlipMode::None ) &&
inline

Placed next to / inside the target element per the placement, plus an offset in pixels.

af flips the placement when it would leave the work area.

◆ Anchored() [3/6]

LayoutOverride & tachyon::LayoutOverride::Anchored ( ID target,
AnchorPlacement pl,
int32_t ox,
int32_t oy,
AutoFlipMode af = AutoFlipMode::None ) &
inline

Placed next to / inside the target element per the placement, plus an offset in pixels.

af flips the placement when it would leave the work area.

◆ Anchored() [4/6]

LayoutOverride && tachyon::LayoutOverride::Anchored ( ID target,
AnchorPlacement pl,
int32_t ox,
int32_t oy,
AutoFlipMode af = AutoFlipMode::None ) &&
inline

Placed next to / inside the target element per the placement, plus an offset in pixels.

af flips the placement when it would leave the work area.

◆ Anchored() [5/6]

LayoutOverride & tachyon::LayoutOverride::Anchored ( ID target,
AnchorPlacementAxis px,
int32_t ox,
AnchorPlacementAxis py,
int32_t oy,
AutoFlipMode af = AutoFlipMode::None ) &
inline

Placed next to / inside the target element per the placement, plus an offset in pixels.

af flips the placement when it would leave the work area.

◆ Anchored() [6/6]

LayoutOverride && tachyon::LayoutOverride::Anchored ( ID target,
AnchorPlacementAxis px,
int32_t ox,
AnchorPlacementAxis py,
int32_t oy,
AutoFlipMode af = AutoFlipMode::None ) &&
inline

Placed next to / inside the target element per the placement, plus an offset in pixels.

af flips the placement when it would leave the work area.

◆ Overhang() [1/2]

LayoutOverride & tachyon::LayoutOverride::Overhang ( const int2 & o) &
inline

After Anchored: how far past the work area the element may reach on each axis, for see-through room around what it shows (a shadow): flips and clamps keep only the rest on the screen.

◆ Overhang() [2/2]

LayoutOverride && tachyon::LayoutOverride::Overhang ( const int2 & o) &&
inline

Placed next to / inside the target element per the placement, plus an offset in pixels.

af flips the placement when it would leave the work area.

◆ PositionX() [1/2]

LayoutOverride & tachyon::LayoutOverride::PositionX ( PositionConstraintAxis ax) &
inline

Sets one axis's constraint, or only its PositionType.

◆ PositionX() [2/2]

LayoutOverride && tachyon::LayoutOverride::PositionX ( PositionConstraintAxis ax) &&
inline

Sets one axis's constraint, or only its PositionType.

◆ PositionY() [1/2]

LayoutOverride & tachyon::LayoutOverride::PositionY ( PositionConstraintAxis ay) &
inline

Sets one axis's constraint, or only its PositionType.

◆ PositionY() [2/2]

LayoutOverride && tachyon::LayoutOverride::PositionY ( PositionConstraintAxis ay) &&
inline

Sets one axis's constraint, or only its PositionType.

◆ WithTypeX() [1/2]

LayoutOverride & tachyon::LayoutOverride::WithTypeX ( PositionType t) &
inline

Sets one axis's constraint, or only its PositionType.

◆ WithTypeX() [2/2]

LayoutOverride && tachyon::LayoutOverride::WithTypeX ( PositionType t) &&
inline

Sets one axis's constraint, or only its PositionType.

◆ WithTypeY() [1/2]

LayoutOverride & tachyon::LayoutOverride::WithTypeY ( PositionType t) &
inline

Sets one axis's constraint, or only its PositionType.

◆ WithTypeY() [2/2]

LayoutOverride && tachyon::LayoutOverride::WithTypeY ( PositionType t) &&
inline

Sets one axis's constraint, or only its PositionType.

◆ StickyX() [1/2]

LayoutOverride & tachyon::LayoutOverride::StickyX ( int16_t threshold = 0) &
inline

◆ StickyX() [2/2]

LayoutOverride && tachyon::LayoutOverride::StickyX ( int16_t threshold = 0) &&
inline

◆ StickyY() [1/2]

LayoutOverride & tachyon::LayoutOverride::StickyY ( int16_t threshold = 0) &
inline

◆ StickyY() [2/2]

LayoutOverride && tachyon::LayoutOverride::StickyY ( int16_t threshold = 0) &&
inline

◆ Sticky() [1/2]

LayoutOverride & tachyon::LayoutOverride::Sticky ( int16_t thresholdX = 0,
int16_t thresholdY = 0 ) &
inline

◆ Sticky() [2/2]

LayoutOverride && tachyon::LayoutOverride::Sticky ( int16_t thresholdX = 0,
int16_t thresholdY = 0 ) &&
inline

◆ BreakAfter() [1/2]

LayoutOverride & tachyon::LayoutOverride::BreakAfter ( bool v = true) &
inline

Forces a line break after / before this element, or keeps it on the same line as the next one.

◆ BreakAfter() [2/2]

LayoutOverride && tachyon::LayoutOverride::BreakAfter ( bool v = true) &&
inline

Forces a line break after / before this element, or keeps it on the same line as the next one.

◆ BreakBefore() [1/2]

LayoutOverride & tachyon::LayoutOverride::BreakBefore ( bool v = true) &
inline

Forces a line break after / before this element, or keeps it on the same line as the next one.

◆ BreakBefore() [2/2]

LayoutOverride && tachyon::LayoutOverride::BreakBefore ( bool v = true) &&
inline

Forces a line break after / before this element, or keeps it on the same line as the next one.

◆ KeepWithNext() [1/2]

LayoutOverride & tachyon::LayoutOverride::KeepWithNext ( bool v = true) &
inline

Forces a line break after / before this element, or keeps it on the same line as the next one.

◆ KeepWithNext() [2/2]

LayoutOverride && tachyon::LayoutOverride::KeepWithNext ( bool v = true) &&
inline

Forces a line break after / before this element, or keeps it on the same line as the next one.

◆ FlexGrow() [1/2]

LayoutOverride & tachyon::LayoutOverride::FlexGrow ( int16_t v) &
inline

Overrides the style's flex-grow / flex-shrink.

Examples
controls/controls.cpp, custom_theme/custom_theme.cpp, and hello_world/hello_world.cpp.

◆ FlexGrow() [2/2]

LayoutOverride && tachyon::LayoutOverride::FlexGrow ( int16_t v) &&
inline

Overrides the style's flex-grow / flex-shrink.

◆ FlexShrink() [1/2]

LayoutOverride & tachyon::LayoutOverride::FlexShrink ( int16_t v) &
inline

Overrides the style's flex-grow / flex-shrink.

◆ FlexShrink() [2/2]

LayoutOverride && tachyon::LayoutOverride::FlexShrink ( int16_t v) &&
inline

Overrides the style's flex-grow / flex-shrink.

◆ NoGrow() [1/2]

LayoutOverride & tachyon::LayoutOverride::NoGrow ( ) &
inline

Shorthands for FlexGrow(0) / FlexShrink(0).

Examples
controls/controls.cpp, and docking/docking.cpp.

◆ NoGrow() [2/2]

LayoutOverride && tachyon::LayoutOverride::NoGrow ( ) &&
inline

Shorthands for FlexGrow(0) / FlexShrink(0).

◆ NoShrink() [1/2]

LayoutOverride & tachyon::LayoutOverride::NoShrink ( ) &
inline

Shorthands for FlexGrow(0) / FlexShrink(0).

◆ NoShrink() [2/2]

LayoutOverride && tachyon::LayoutOverride::NoShrink ( ) &&
inline

Shorthands for FlexGrow(0) / FlexShrink(0).

◆ SetIconSide() [1/2]

LayoutOverride & tachyon::LayoutOverride::SetIconSide ( IconSide s) &
inline

Overrides the style's icon side / icon-text gap (pixels).

◆ SetIconSide() [2/2]

LayoutOverride && tachyon::LayoutOverride::SetIconSide ( IconSide s) &&
inline

Overrides the style's icon side / icon-text gap (pixels).

◆ IconTextGap() [1/2]

LayoutOverride & tachyon::LayoutOverride::IconTextGap ( int16_t gap) &
inline

Overrides the style's icon side / icon-text gap (pixels).

◆ IconTextGap() [2/2]

LayoutOverride && tachyon::LayoutOverride::IconTextGap ( int16_t gap) &&
inline

Overrides the style's icon side / icon-text gap (pixels).

◆ ClampScroll() [1/2]

LayoutOverride & tachyon::LayoutOverride::ClampScroll ( bool v = true) &
inline

Overrides the style's scroll clamping (false = unclamped / infinite scroll).

◆ ClampScroll() [2/2]

LayoutOverride && tachyon::LayoutOverride::ClampScroll ( bool v = true) &&
inline

◆ ColumnTrack() [1/2]

LayoutOverride & tachyon::LayoutOverride::ColumnTrack ( GridTrack t) &
inline

Overrides the style's column / row track size.

◆ ColumnTrack() [2/2]

LayoutOverride && tachyon::LayoutOverride::ColumnTrack ( GridTrack t) &&
inline

Overrides the style's column / row track size.

◆ RowTrack() [1/2]

LayoutOverride & tachyon::LayoutOverride::RowTrack ( GridTrack t) &
inline

Overrides the style's column / row track size.

◆ RowTrack() [2/2]

LayoutOverride && tachyon::LayoutOverride::RowTrack ( GridTrack t) &&
inline

Overrides the style's column / row track size.

◆ GridColumn() [1/2]

LayoutOverride & tachyon::LayoutOverride::GridColumn ( int16_t start,
int16_t span = 1 ) &
inline

Explicit grid placement: start cell and span.

◆ GridColumn() [2/2]

LayoutOverride && tachyon::LayoutOverride::GridColumn ( int16_t start,
int16_t span = 1 ) &&
inline

Explicit grid placement: start cell and span.

◆ GridRow() [1/2]

LayoutOverride & tachyon::LayoutOverride::GridRow ( int16_t start,
int16_t span = 1 ) &
inline

Explicit grid placement: start cell and span.

◆ GridRow() [2/2]

LayoutOverride && tachyon::LayoutOverride::GridRow ( int16_t start,
int16_t span = 1 ) &&
inline

Explicit grid placement: start cell and span.

◆ GetFlexGrow()

uint32_t tachyon::LayoutOverride::GetFlexGrow ( const LayoutStyle * ls) const
inline

Resolvers take the element's layout style (may be null) and return the effective value.

◆ GetFlexShrink()

uint32_t tachyon::LayoutOverride::GetFlexShrink ( const LayoutStyle * ls) const
inline

◆ GetBreakBehavior()

BreakBehavior tachyon::LayoutOverride::GetBreakBehavior ( const LayoutStyle * ls) const
inline

◆ GetBreakBefore()

bool tachyon::LayoutOverride::GetBreakBefore ( const LayoutStyle * ls) const
inline

◆ GetBreakAfter()

bool tachyon::LayoutOverride::GetBreakAfter ( const LayoutStyle * ls) const
inline

◆ GetKeepWithNext()

bool tachyon::LayoutOverride::GetKeepWithNext ( const LayoutStyle * ls) const
inline

◆ GetClampScroll()

bool tachyon::LayoutOverride::GetClampScroll ( const LayoutStyle * ls) const
inline

◆ GetIconSide()

IconSide tachyon::LayoutOverride::GetIconSide ( const LayoutStyle * ls) const
inline

◆ GetIconTextGap()

uint16_t tachyon::LayoutOverride::GetIconTextGap ( const LayoutStyle * ls) const
inline

◆ GetGridItem()

GridProperties tachyon::LayoutOverride::GetGridItem ( const LayoutStyle * layoutStyle) const
inline

Style values with non-Default overrides applied.

Member Data Documentation

◆ width

SizeConstraintAxis tachyon::LayoutOverride::width {}

◆ height

SizeConstraintAxis tachyon::LayoutOverride::height {}

Size constraints; set with the size builders.

◆ x

PositionConstraintAxis tachyon::LayoutOverride::x {}

◆ y

PositionConstraintAxis tachyon::LayoutOverride::y {}

Position constraints; set with the position builders.

◆ flex

FlexOverride tachyon::LayoutOverride::flex {}

flex-grow / flex-shrink overrides

◆ grid

struct tachyon::LayoutOverride::[struct].grid tachyon::LayoutOverride::grid

◆ iconTextGapOverride

int16_t tachyon::LayoutOverride::iconTextGapOverride = -1

Icon layout overrides (-1 = use style).

◆ iconSideOverride

IconSide tachyon::LayoutOverride::iconSideOverride

None = use style.

◆ breakBehaviorOverride

uint8_t tachyon::LayoutOverride::breakBehaviorOverride

0 = use style, otherwise BreakBehavior + 1

◆ clampScroll

TriState tachyon::LayoutOverride::clampScroll

Override of the style's scroll clamping.

◆ outOfFlow

bool tachyon::LayoutOverride::outOfFlow = false

Set by ElementStorage::Add for display:none / visibility:collapsed; such elements take no space in the parent's flex/grid.


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