MarginSpec
MarginSpec
Section titled “MarginSpec”#include <Layout.hpp>Specifies spacing around all four sides.
Can be configured per-side or using helper functions.
Public Attributes
Section titled “Public Attributes”| Return | Name | Description |
|---|---|---|
ScalarSpec | top | |
ScalarSpec | bottom | |
ScalarSpec | left | |
ScalarSpec | right | Spacing on each side. |
ScalarSpec topbottom
Section titled “bottom”ScalarSpec bottomScalarSpec leftScalarSpec rightSpacing on each side.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
int | resolvedTop const inline | Resolves top margin. |
int | resolvedBottom const inline | Resolves bottom margin. |
int | resolvedLeft const inline | Resolves left margin. |
int | resolvedRight const inline | Resolves right margin. |
resolvedTop
Section titled “resolvedTop”const inline
inline int resolvedTop(int h) constResolves top margin.
resolvedBottom
Section titled “resolvedBottom”const inline
inline int resolvedBottom(int h) constResolves bottom margin.
resolvedLeft
Section titled “resolvedLeft”const inline
inline int resolvedLeft(int w) constResolves left margin.
resolvedRight
Section titled “resolvedRight”const inline
inline int resolvedRight(int w) constResolves right margin.
Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
MarginSpec | all static inline | Helper: Create equal margins on all sides. |
MarginSpec | xy static inline | Helper: Create margins with separate X and Y values. |
MarginSpec | none static inline | Helper: Create zero margins. |
static inline
static inline MarginSpec all(ScalarSpec v)Helper: Create equal margins on all sides.
static inline
static inline MarginSpec xy(ScalarSpec x, ScalarSpec y)Helper: Create margins with separate X and Y values.
static inline
static inline MarginSpec none()Helper: Create zero margins.