LayoutNode¶
class LayoutNode(nodeName: String = "LayoutNode") : Measurable, Placeable, AUINode, MeasureScope
The concrete node type that forms Archie's UI scene graph.
Every composable in the Archie GUI framework ultimately creates one LayoutNode. It handles measurement, draw-chain rendering (including DrawModifier wrapping), z-index sorting, input hit-testing, and the Ctrl+Shift debug overlay.
Do not instantiate directly — use Layout and higher-level composables instead.
Parameters¶
- nodeName: A human-readable label shown in the debug overlay for this node.
Constructors¶
LayoutNode¶
constructor(nodeName: String = "LayoutNode")
Parameters
- nodeName: A human-readable label shown in the debug overlay for this node.
Properties¶
absoluteCoords¶
Absolute on-screen coordinates, accumulating parent offsets up the scene graph.
children¶
val children: MutableList<LayoutNode>
Mutable list of child LayoutNodes, managed by AUINodeApplier.
debug¶
Whether the debug overlay is active. Setting this on a child propagates to the root.
drawModifiers¶
var drawModifiers: List<DrawModifier>
Ordered list of DrawModifiers extracted from modifier.
extraDebug¶
var extraDebug: Boolean
Whether the extended modifier info is shown in the debug overlay. Setting this propagates to the root.
height¶
The measured height in pixels.
layoutChangingModifiers¶
Ordered list of LayoutChangingModifiers extracted from modifier.
measurePolicy¶
open override var measurePolicy: MeasurePolicy
modifier¶
parent¶
var parent: LayoutNode?
The parent LayoutNode in the scene graph, or null for root nodes.
processedModifier¶
var processedModifier: Map<KClass<out Modifier.Element<*>>, Modifier.Element<*>>
Processed modifier map keyed by element type for O(1) lookup.
renderer¶
rootNode¶
val rootNode: LayoutNode
The topmost ancestor LayoutNode (the root of this subtree).
size¶
The measured size as an IntSize value.
width¶
The measured width in pixels.
x¶
y¶
zIndex¶
The effective z-index for this node, used for draw and input ordering.
Functions¶
get¶
inline fun <T : Modifier.Element<T>> get(): T?
Retrieves the merged Modifier.Element of type T from processedModifier, or null.
getMaxZ¶
Computes the maximum effective z-depth in this subtree, adding layerOffset.
isBounded¶
measure¶
open override fun measure(constraints: Constraints): Placeable
Measures this node within constraints and returns a Placeable for placement.
Parameters
- constraints: The size constraints imposed by the parent.
placeAt¶
Places this node at the given screen coordinates.
Parameters
-
x: Absolute x position in screen pixels.
-
y: Absolute y position in screen pixels.
render¶
Renders this node and its entire subtree, with z-index translation, draw-modifier wrapping, and the optional debug overlay.