class
Opal::UI::LayerStack
- Opal::UI::LayerStack
- Reference
- Object
Overview
Manages a depth-ordered stack of Layer surfaces.
Composites layers in sorted z-index order onto a target buffer,
ensuring overlays, floating windows, dropdowns, and notifications
render with correct depth, transparency, and clipping.
Defined in:
opal/ui/layer_stack.crConstant Summary
-
TIER_BACKGROUND =
0 -
Standard semantic z-index tier constants
-
TIER_CONTENT =
100 -
TIER_CURSOR =
1000 -
TIER_MODALS =
800 -
TIER_OVERLAYS =
500 -
TIER_TOASTS =
900 -
TIER_WINDOWS =
200
Constructors
Instance Method Summary
-
#add(layer : Layer) : Layer
Adds an existing layer to the stack.
-
#bring_to_front(layer : Layer) : self
Elevates a layer above all other layers currently in its tier.
-
#clear : self
Clears all registered layers from the stack.
-
#compose(target : Buffer) : Nil
Composites all visible layers onto the target buffer in ascending z-index order.
-
#create_layer(width : Int32, height : Int32, z_index : Int32 = TIER_CONTENT, x : Int32 = 0, y : Int32 = 0, transparent_bg : Bool = true) : Layer
Factory method to create, configure, and register a new layer.
- #layers : Array(Layer)
-
#remove(layer : Layer) : Bool
Removes a layer from the stack.
-
#send_to_back(layer : Layer) : self
Lowers a layer below all other layers in the stack.
Constructor Detail
Instance Method Detail
Elevates a layer above all other layers currently in its tier.
Composites all visible layers onto the target buffer in ascending z-index order.
Factory method to create, configure, and register a new layer.
Lowers a layer below all other layers in the stack.