VEX Engine
Retro looking game engine made in vulkan mostly because i wanted to understand it better.
Loading...
Searching...
No Matches
vex::LayoutNode Struct Reference

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

LayoutNodeparent = 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.

Detailed Description

Layout node representing a single UI element in the layout tree.

Definition at line 41 of file Layout.hpp.

Member Function Documentation

◆ insertChild()

void vex::LayoutNode::insertChild ( LayoutNode * child,
size_t index )
inline

Insert a child node at a specific index.

Parameters
childThe child node to insert.
indexThe position to insert at.

Definition at line 111 of file Layout.hpp.

Member Data Documentation

◆ alignItems

Align vex::LayoutNode::alignItems = Align::Stretch

Align items cross-axis alignment.

Definition at line 92 of file Layout.hpp.

◆ alignSelf

Align vex::LayoutNode::alignSelf = Align::Auto

Align self override.

Definition at line 93 of file Layout.hpp.

◆ borderWidth

FlexValue vex::LayoutNode::borderWidth

Border width.

Definition at line 78 of file Layout.hpp.

◆ bottom

FlexValue vex::LayoutNode::bottom

Bottom position offset.

Definition at line 57 of file Layout.hpp.

◆ children

std::vector<LayoutNode*> vex::LayoutNode::children

Child nodes.

Definition at line 43 of file Layout.hpp.

◆ computedHeight

float vex::LayoutNode::computedHeight = 0.0f

Computed height.

Definition at line 105 of file Layout.hpp.

◆ computedLeft

float vex::LayoutNode::computedLeft = 0.0f

Computed left position.

Definition at line 102 of file Layout.hpp.

◆ computedTop

float vex::LayoutNode::computedTop = 0.0f

Computed top position.

Definition at line 103 of file Layout.hpp.

◆ computedWidth

float vex::LayoutNode::computedWidth = 0.0f

Computed width.

Definition at line 104 of file Layout.hpp.

◆ context

void* vex::LayoutNode::context = nullptr

Opaque context pointer for user data.

Definition at line 44 of file Layout.hpp.

◆ flexDirection

FlexDirection vex::LayoutNode::flexDirection = FlexDirection::Column

Direction of flex layout.

Definition at line 89 of file Layout.hpp.

◆ flexGrow

float vex::LayoutNode::flexGrow = 0.0f

Flex grow factor.

Definition at line 83 of file Layout.hpp.

◆ flexShrink

float vex::LayoutNode::flexShrink = 1.0f

Flex shrink factor.

Definition at line 84 of file Layout.hpp.

◆ flexWrap

FlexWrap vex::LayoutNode::flexWrap = FlexWrap::NoWrap

Flex wrap behavior.

Definition at line 94 of file Layout.hpp.

◆ height

FlexValue vex::LayoutNode::height

Element height.

Definition at line 49 of file Layout.hpp.

◆ justifyContent

Justify vex::LayoutNode::justifyContent = Justify::FlexStart

Justify content alignment.

Definition at line 91 of file Layout.hpp.

◆ left

FlexValue vex::LayoutNode::left

Left position offset.

Definition at line 54 of file Layout.hpp.

◆ marginBottom

FlexValue vex::LayoutNode::marginBottom

Bottom margin.

Definition at line 65 of file Layout.hpp.

◆ marginLeft

FlexValue vex::LayoutNode::marginLeft

Left margin.

Definition at line 62 of file Layout.hpp.

◆ marginRight

FlexValue vex::LayoutNode::marginRight

Right margin.

Definition at line 64 of file Layout.hpp.

◆ marginTop

FlexValue vex::LayoutNode::marginTop

Top margin.

Definition at line 63 of file Layout.hpp.

◆ measureFunc

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.

◆ paddingBottom

FlexValue vex::LayoutNode::paddingBottom

Bottom padding.

Definition at line 73 of file Layout.hpp.

◆ paddingLeft

FlexValue vex::LayoutNode::paddingLeft

Left padding.

Definition at line 70 of file Layout.hpp.

◆ paddingRight

FlexValue vex::LayoutNode::paddingRight

Right padding.

Definition at line 72 of file Layout.hpp.

◆ paddingTop

FlexValue vex::LayoutNode::paddingTop

Top padding.

Definition at line 71 of file Layout.hpp.

◆ parent

LayoutNode* vex::LayoutNode::parent = nullptr

Parent node in the layout tree.

Definition at line 42 of file Layout.hpp.

◆ positionType

PositionType vex::LayoutNode::positionType = PositionType::Relative

Position type (relative or absolute).

Definition at line 90 of file Layout.hpp.

◆ right

FlexValue vex::LayoutNode::right

Right position offset.

Definition at line 56 of file Layout.hpp.

◆ top

FlexValue vex::LayoutNode::top

Top position offset.

Definition at line 55 of file Layout.hpp.

◆ width

FlexValue vex::LayoutNode::width

Element width.

Definition at line 48 of file Layout.hpp.


The documentation for this struct was generated from the following file: