LAttributeNode Struct
Public Members
| LDeclaration | declaration |
| LExpression | expression |
| std::vector<LState> | states |
Detailed Description
An attribute node is a declared expression representing a labeled unit of data, with optional states.
LAttributeNodeis the parsed declaration whereasLAttributeis the live runtime object. Since a single declaration can name several targets, one node can produce several live attributes.
Title: "Status" // declaration = {
// item = {{"Title"}} }
// expression -> value -> string = "Status"
Window/(Left,Right) Pane/Corner Radius: 5 // Declares two attributes;
// declaration = {
// traversal = {
// {{"Window"}},
// {{"Left","Right"}, {"Pane"}} }
// item = {{"Corner"}, {"Radius"}} }
// expression -> value -> number = 5
Fill: Theme/Primary // declaration = {
// item = {{"Fill"}} }
// expression -> reference = {
// traversal = {"Theme"}
// item = "Primary" }
Text Color: #111 // declaration = {
@Alert: Red // item = {{"Text"}, {"Color"}} }
@Success: Green // expression -> value -> color = #ff111111
// states = {
// { conditions = {"Alert"}
// expression -> reference = {
// item = "Red"} },
// { conditions = {"Success"}
// expression -> reference = {
// item = "Green"} } }
// Same as above; states can go inline after the main expression or on
// separate lines in an indented block underneath.
Text Color: #111 @Alert: Red @Success: Green
Member Variable Documentation
LDeclaration declaration
Identifies the attribute(s) being declared
LExpression expression
The attribute's value or reference to another attribute
std::vector<LState> states
States that condition the attribute