Layout node representing a single UI element in the layout tree. More...
#include <Layout.hpp>
Public Member Functions | |
| void | insertChild (LayoutNode *child, size_t index) |
| Insert a child node at a specific index. | |
Public Attributes | |
| LayoutNode * | parent = nullptr |
| Parent node in the layout tree. | |
| std::vector< LayoutNode * > | children |
| Child nodes. | |
| void * | context = nullptr |
| Opaque context pointer for user data. | |
| std::function< void(LayoutNode *, float, float)> | measureFunc = nullptr |
| Measure function for intrinsic sizing (e.g., text). | |
Dimensional Properties | |
| FlexValue | width |
| Element width. | |
| FlexValue | height |
| Element height. | |
Positional Properties | |
| FlexValue | left |
| Left position offset. | |
| FlexValue | top |
| Top position offset. | |
| FlexValue | right |
| Right position offset. | |
| FlexValue | bottom |
| Bottom position offset. | |
Margin Properties | |
| FlexValue | marginLeft |
| Left margin. | |
| FlexValue | marginTop |
| Top margin. | |
| FlexValue | marginRight |
| Right margin. | |
| FlexValue | marginBottom |
| Bottom margin. | |
Padding Properties | |
| FlexValue | paddingLeft |
| Left padding. | |
| FlexValue | paddingTop |
| Top padding. | |
| FlexValue | paddingRight |
| Right padding. | |
| FlexValue | paddingBottom |
| Bottom padding. | |
Border Properties | |
| FlexValue | borderWidth |
| Border width. | |
Flex Properties | |
| float | flexGrow = 0.0f |
| Flex grow factor. | |
| float | flexShrink = 1.0f |
| Flex shrink factor. | |
Layout Properties | |
| FlexDirection | flexDirection = FlexDirection::Column |
| Direction of flex layout. | |
| PositionType | positionType = PositionType::Relative |
| Position type (relative or absolute). | |
| Justify | justifyContent = Justify::FlexStart |
| Justify content alignment. | |
| Align | alignItems = Align::Stretch |
| Align items cross-axis alignment. | |
| Align | alignSelf = Align::Auto |
| Align self override. | |
| FlexWrap | flexWrap = FlexWrap::NoWrap |
| Flex wrap behavior. | |
Computed Layout Values | |
| float | computedLeft = 0.0f |
| Computed left position. | |
| float | computedTop = 0.0f |
| Computed top position. | |
| float | computedWidth = 0.0f |
| Computed width. | |
| float | computedHeight = 0.0f |
| Computed height. | |
Layout node representing a single UI element in the layout tree.
Definition at line 41 of file Layout.hpp.
|
inline |
Insert a child node at a specific index.
| child | The child node to insert. |
| index | The position to insert at. |
Definition at line 111 of file Layout.hpp.
| Align vex::LayoutNode::alignItems = Align::Stretch |
Align items cross-axis alignment.
Definition at line 92 of file Layout.hpp.
| Align vex::LayoutNode::alignSelf = Align::Auto |
Align self override.
Definition at line 93 of file Layout.hpp.
| FlexValue vex::LayoutNode::borderWidth |
Border width.
Definition at line 78 of file Layout.hpp.
| FlexValue vex::LayoutNode::bottom |
Bottom position offset.
Definition at line 57 of file Layout.hpp.
| std::vector<LayoutNode*> vex::LayoutNode::children |
Child nodes.
Definition at line 43 of file Layout.hpp.
| float vex::LayoutNode::computedHeight = 0.0f |
Computed height.
Definition at line 105 of file Layout.hpp.
| float vex::LayoutNode::computedLeft = 0.0f |
Computed left position.
Definition at line 102 of file Layout.hpp.
| float vex::LayoutNode::computedTop = 0.0f |
Computed top position.
Definition at line 103 of file Layout.hpp.
| float vex::LayoutNode::computedWidth = 0.0f |
Computed width.
Definition at line 104 of file Layout.hpp.
| void* vex::LayoutNode::context = nullptr |
Opaque context pointer for user data.
Definition at line 44 of file Layout.hpp.
| FlexDirection vex::LayoutNode::flexDirection = FlexDirection::Column |
Direction of flex layout.
Definition at line 89 of file Layout.hpp.
| float vex::LayoutNode::flexGrow = 0.0f |
Flex grow factor.
Definition at line 83 of file Layout.hpp.
| float vex::LayoutNode::flexShrink = 1.0f |
Flex shrink factor.
Definition at line 84 of file Layout.hpp.
| FlexWrap vex::LayoutNode::flexWrap = FlexWrap::NoWrap |
Flex wrap behavior.
Definition at line 94 of file Layout.hpp.
| FlexValue vex::LayoutNode::height |
Element height.
Definition at line 49 of file Layout.hpp.
| Justify vex::LayoutNode::justifyContent = Justify::FlexStart |
Justify content alignment.
Definition at line 91 of file Layout.hpp.
| FlexValue vex::LayoutNode::left |
Left position offset.
Definition at line 54 of file Layout.hpp.
| FlexValue vex::LayoutNode::marginBottom |
Bottom margin.
Definition at line 65 of file Layout.hpp.
| FlexValue vex::LayoutNode::marginLeft |
Left margin.
Definition at line 62 of file Layout.hpp.
| FlexValue vex::LayoutNode::marginRight |
Right margin.
Definition at line 64 of file Layout.hpp.
| FlexValue vex::LayoutNode::marginTop |
Top margin.
Definition at line 63 of file Layout.hpp.
| std::function<void(LayoutNode*, float, float)> vex::LayoutNode::measureFunc = nullptr |
Measure function for intrinsic sizing (e.g., text).
Definition at line 98 of file Layout.hpp.
| FlexValue vex::LayoutNode::paddingBottom |
Bottom padding.
Definition at line 73 of file Layout.hpp.
| FlexValue vex::LayoutNode::paddingLeft |
Left padding.
Definition at line 70 of file Layout.hpp.
| FlexValue vex::LayoutNode::paddingRight |
Right padding.
Definition at line 72 of file Layout.hpp.
| FlexValue vex::LayoutNode::paddingTop |
Top padding.
Definition at line 71 of file Layout.hpp.
| LayoutNode* vex::LayoutNode::parent = nullptr |
Parent node in the layout tree.
Definition at line 42 of file Layout.hpp.
| PositionType vex::LayoutNode::positionType = PositionType::Relative |
Position type (relative or absolute).
Definition at line 90 of file Layout.hpp.
| FlexValue vex::LayoutNode::right |
Right position offset.
Definition at line 56 of file Layout.hpp.
| FlexValue vex::LayoutNode::top |
Top position offset.
Definition at line 55 of file Layout.hpp.
| FlexValue vex::LayoutNode::width |
Element width.
Definition at line 48 of file Layout.hpp.