How much space a widget asks for along one dimension, in backend units (a character cell on the TUI).
More...
#include <view.hpp>
|
| static constexpr Sizing | content () noexcept |
| | Size to the content.
|
| static constexpr Sizing | fixed (int units) noexcept |
| | A fixed size.
|
| static constexpr Sizing | stretch (int weight=1) noexcept |
| | A share of the leftover space.
|
How much space a widget asks for along one dimension, in backend units (a character cell on the TUI).
Definition at line 270 of file view.hpp.
◆ Kind
The sizing rule.
| Enumerator |
|---|
| Content | As much as the content needs.
|
| Fixed | Exactly amount units.
|
| Stretch | A share of the leftover space, weighted by amount.
|
Definition at line 272 of file view.hpp.
◆ content()
| constexpr Sizing morph::ui::Sizing::content |
( |
| ) |
|
|
inlinestaticnodiscardconstexprnoexcept |
Size to the content.
- Returns
- The sizing.
Definition at line 284 of file view.hpp.
◆ fixed()
| constexpr Sizing morph::ui::Sizing::fixed |
( |
int | units | ) |
|
|
inlinestaticnodiscardconstexprnoexcept |
A fixed size.
- Parameters
-
| units | The size in backend units. |
- Returns
- The sizing.
Definition at line 289 of file view.hpp.
◆ stretch()
| constexpr Sizing morph::ui::Sizing::stretch |
( |
int | weight = 1 | ) |
|
|
inlinestaticnodiscardconstexprnoexcept |
A share of the leftover space.
- Parameters
-
| weight | The share's weight. |
- Returns
- The sizing.
Definition at line 294 of file view.hpp.
◆ operator==()
| bool morph::ui::Sizing::operator== |
( |
Sizing const & | | ) |
const |
|
default |
Memberwise equality.
- Returns
- Whether both rules and amounts match.
◆ kind
◆ amount
| int morph::ui::Sizing::amount = 0 |
Units for Fixed, weight for Stretch, unused for Content.
Definition at line 280 of file view.hpp.
The documentation for this struct was generated from the following file: