HikoGUI
A low latency retained GUI
|
#include <hikogui/layout/box_constraints.hpp>
Public Member Functions | |
constexpr | box_constraints (box_constraints const &) noexcept=default |
constexpr | box_constraints (box_constraints &&) noexcept=default |
constexpr box_constraints & | operator= (box_constraints const &) noexcept=default |
constexpr box_constraints & | operator= (box_constraints &&) noexcept=default |
constexpr | box_constraints (extent2 minimum, extent2 preferred, extent2 maximum, hi::alignment alignment=hi::alignment{}, hi::margins margins=hi::margins{}) noexcept |
constexpr box_constraints | constrain (extent2 new_minimum, extent2 new_maximum) const noexcept |
constexpr box_constraints & | operator+= (extent2 const &rhs) noexcept |
constexpr box_constraints | operator+ (extent2 const &rhs) const noexcept |
constexpr bool | holds_invariant () const noexcept |
Data Fields | |
extent2 | minimum = {} |
extent2 | preferred = {} |
extent2 | maximum = {} |
hi::margins | margins = {} |
hi::alignment | alignment = hi::alignment{} |
Friends | |
constexpr friend bool | operator== (box_constraints const &, box_constraints const &) noexcept=default |
constexpr box_constraints | max (box_constraints const &lhs, extent2 const &rhs) noexcept |
constexpr box_constraints | max (box_constraints const &lhs, box_constraints const &rhs) noexcept |
Makes a constraint that encompasses both given constraints. | |
template<std::convertible_to< box_constraints >... Args> | |
constexpr box_constraints | max (box_constraints const &first, box_constraints const &second, box_constraints const &third, Args const &...args) noexcept |
2D constraints.
This type holds multiple possible sizes that an 2D object may be. We need multiple sizes in case there is a non-linear relation between the width and height of an object.
|
friend |
Makes a constraint that encompasses both given constraints.
lhs | The left hand side box constraints. |
rhs | The right hand side box constraints. |