LayoutTree

Global data for the layout tree.

Constructors

this
this(Node root, FluidBackend backend)

Create a new tree with the given node as its root, and using the given backend for I/O.

this
this(Node root)

Create a new tree with the given node as its root. Use the default backend, if any is present.

Members

Aliases

io
alias io = backend
Undocumented in source.

Functions

bindInput
void bindInput(InputActionID action, InputStroke stroke)

Bind a key stroke or button to given input action. Multiple key strokes are allowed to match given action.

bindInputReplace
void bindInputReplace(InputActionID action, InputStroke stroke)

Bind a key stroke or button to given input action, replacing any previously bound inputs.

clearBoundInput
bool clearBoundInput(InputActionID action)

Remove any inputs bound to given input action.

filterActions
auto filterActions()

List actions in the tree, remove finished actions while iterating.

intersectScissors
Rectangle intersectScissors(Rectangle rect)

Intersect the given rectangle against current scissor area.

layerForStroke
inout(InputLayer)* layerForStroke(InputStroke stroke)

Find a layer for the given input stroke.

poll
void poll()

Fetch tree events (e.g. actions)

popScissors
void popScissors(Rectangle lastScissorsMode)
Undocumented in source. Be warned that the author may not have intended to support it.
pushScissors
Rectangle pushScissors(Rectangle rect)

Start scissors mode.

queueAction
void queueAction(TreeAction action)

Queue an action to perform while iterating the tree.

restoreDefaultInputBinds
void restoreDefaultInputBinds()

Restore defaults for given actions.

Properties

disabledDepth
deprecated inout(uint) disabledDepth [@property getter]

Current depth of "disabled" nodes, incremented for any node descended into, while any of the ancestors is disabled.

Variables

_disabledDepth
uint _disabledDepth;
Undocumented in source.
actions
DList!TreeAction actions;

Tree actions queued to execute during next draw.

activeActions
DList!InputBinding activeActions;

Actions that have just triggered.

backend
FluidBackend backend;

Access to core input and output facilities.

boundInputs
InputLayer[] boundInputs;

Input strokes bound to emit given action signals.

depth
uint depth;

Current node drawing depth.

downActions
DList!InputBinding downActions;

Actions that are currently held down.

focus
FluidFocusable focus;

Currently focused node.

focusBox
Rectangle focusBox;

Padding box of the currently focused node. Only available after the node has been drawn.

focusDirection
FocusDirection focusDirection;

Focus direction data.

hover
Node hover;

Top-most hovered node in the tree.

isBranchDisabled
bool isBranchDisabled;

True if the current tree branch is marked as disabled (doesn't take input).

keyboardHandled
bool keyboardHandled;

Check if keyboard input was handled; updated after rendering has completed.

root
Node root;

Root node of the tree.

scissors
Rectangle scissors;

Current rectangle drawing is limited to.

Meta