RenderNode Struct
Public Members
| VNodeType | type { VNodeType::Box } |
| std::string | name |
| std::string | path |
| std::string | text |
| int | style |
| int | children |
| int | comboOptions |
| std::string | comboSelected |
Detailed Description
A node describes a particular UI element: a hierarchical component (nodes can compose other nodes) based on a primitive type that can be rendered by a consumer reconciler.
The render tree is composed with Layers
.lyr files that Vortex refers to as styles since they describe UI elements.
VApp::build_render_tree() produces the nodes from the loaded styles.
The following demonstrates how a node is structured from a style:
Launch Card: // type = `VNodeType::Box`
// Attribute declarations // name = "Launch Card"
// path = "Launch Card"
Label << Vortex/Text: // text = ""
Text: "Launch the service" // style = { ... }
// children = {
// { type = `VNodeType::Text`
// name = "Label"
// path = "Launch Card/Label"
// text = "Launch the service"
// style = { ... }
// children = {}
// }
// }
Member Variable Documentation
VNodeType type { VNodeType::Box }
Type of node; VNodeType::Box by default
std::string name
The node's style name; the last path segment
std::string path
Full /-separated style path (e.g. "Main Window/Greeting")
std::string text
Text content from either the style's declared Text attribute, or the
bind_text() value when bound.
int style
Style resolved from .lyr
int children
Child nodes
int comboOptions
ComboBox only: List of available options
std::string comboSelected
ComboBox only: Selected option's ID