struct GUISizeConstraints

Options that control how is a GUI element size constrained

Public

Constructors

GUISizeConstraints

GUISizeConstraints() = default

Methods

staticCreate

static GUISizeConstraints Create()

Creates new object with no constraints.

staticCreate

static GUISizeConstraints Create(const GUIOptions &options)

Creates new constraints from user defined options.

staticCreate

static GUISizeConstraints Create(const TInlineArray<GUIOption, 4> &options)

Creates new constraints from user defined options.

UpdateWithStyleSheetRule

void UpdateWithStyleSheetRule(const GUIStyleSheetRules &rule)

Updates constraints from the provided style sheet rule.

If user has not manually set a specific constraint, that property will be inherited from the rule.

CalculateConstrainedOptimalSize

GUILogicalSize CalculateConstrainedOptimalSize(const GUILogicalSize &unconstrainedOptimalSize) const

Constrains the provided optimal element size based on active constraints.

CalculateConstrainedSizeRange

GUIConstrainedSizeRange CalculateConstrainedSizeRange(const GUILogicalSize &unconstrainedOptimalSize) const

Constrains the provided optimal element size based on active constraints.

IsWidthFixed

bool IsWidthFixed() const

Checks do the constraint contain fixed width.

IsHeightFixed

bool IsHeightFixed() const

Checks do the constraint contains fixed height.

IsWidthExpanding

bool IsWidthExpanding() const

Returns true if the GUI element will attempt to expand to fill all available width.

IsHeightExpanding

bool IsHeightExpanding() const

Returns true if the GUI element will attempt to expand to fill all available height.

Fields

ExplicitPosition

GUILogicalPoint ExplicitPosition

MinimumWidth

GUILogicalUnit MinimumWidth

MaximumWidth

GUILogicalUnit MaximumWidth

MinimumHeight

GUILogicalUnit MinimumHeight

MaximumHeight

GUILogicalUnit MaximumHeight

FlexibleWidthWeight

float FlexibleWidthWeight

FlexibleHeightWeight

float FlexibleHeightWeight

Flags

GUISizeConstraintFlags Flags