GGUI::GGSize struct

Size along one axis. A bare number is a fixed size (.Width = 84); otherwise GGSize::Grow() etc., or the short names in GGUI::StyleKeywords.

Public static functions

static auto Fit() -> GGSize constexpr
The size of its content.
static auto Fixed(float units) -> GGSize constexpr
units UI units.
static auto Grow(float weight = 1.0f) -> GGSize constexpr
weight shares of the leftover space.
static auto Percent(float percent) -> GGSize constexpr
percent of the parent's size.

Constructors, destructors, conversion operators

GGSize() defaulted constexpr
The size of its content.
template<typename TNumber>
GGSize(TNumber units) constexpr
A number is a fixed size in UI units.
GGSize(SizeMode mode, float value, float min = 0.0f, float max = std::numeric_limits<float>::max()) constexpr
Min and max clamp the result, whatever the mode.

Public variables

SizeMode Mode
how it is worked out
float Value
units, weight, or percent, by Mode
float Min
the least it is, whatever the mode
float Max
the most it is, whatever the mode

Friends

auto operator==(const GGSize&, const GGSize&) -> bool defaulted
every member equal