Summary
Functions
<, and returns the Lua code that creates it.Lumen.element.Functions
Creates the instance of an element, with its panel or its rendered child, inside a container panel.
Parameters
- element Map
- container Panel the panel that hosts are created in
- root Map the root the instance belongs to
- parent Map the parent instance, nil at the root
Returns
- Map the instance, or nil if the element could not be created
No documentation available.
No documentation available.
No documentation available.
No documentation available.
Parses one element, with its attributes and children, starting at its <, and returns
the Lua code that creates it. Newlines inside of the markup are kept in the code at the
places where they were, so that the lines of embedded expressions do not move.
Parameters
- state Map compiler state;
posis at the<and is left right after the element
Returns
- String Lua code
reconcile(instance, element, container, root, parent)
client packages/lumen/lib/cl_reconciler.lua:297Reconciles one slot of the tree: updates the instance if the element is of the same type and key, replaces it otherwise.
Parameters
- instance Map the instance in the slot, or nil
- element Map the element for the slot, or nil to empty it
- container Panel
- root Map
- parent Map
Returns
- Map the instance now in the slot, or nil
Reconciles the children of a host, a fragment or the root against a list of elements, matching them by key or by position.
Parameters
- parent Map the instance whose children they are
- old_children List<Map> the current instances
- children List the new children: elements, text and false for left out children
Returns
- List<Map> the instances now there
Copies Lua code from the current position, replacing every piece of markup with a call to
Lumen.element. Stops at the end of the source, or at the } that closes the expression
when asked to.
Parameters
- state Map compiler state;
posis where to start and is left at the}when stopping there - stop_at_brace Boolean stop at the first
}that is not matched by a{of its own
Returns
- String the transformed code
- Number how many tokens other than comments and spaces it has
Takes an instance down: runs the effect cleanups of its components, clears its refs and removes its panels.
Parameters
- instance Map
No documentation available.
No documentation available.
No documentation available.
No documentation available.
No documentation available.
No documentation available.
No documentation available.
No documentation available.
No documentation available.
No documentation available.
Brings an instance in line with a new element of the same type.
Parameters
- instance Map
- element Map