Create a new node slot and optionally place a node within.
Remove the assigned node from the slot.
Change the node in the slot.
Swap contents of the two slots.
Node parameter for setting the node layout.
Tree data for the node. Note: requires at least one draw before this will work.
Layout for this node.
Tags assigned for this node.
Breadcrumbs assigned and applicable to this node. Loaded every resize and every draw.
If true, mouse focus will be disabled for this node, so mouse signals will "go through" to its parents, as if the node wasn't there. The node will still detect hover like normal.
Filter to apply to every result of inBounds, controlling how the node reacts to some events, such as mouse click or a finger touch.
True if the theme has been assigned explicitly by a direct assignment. If false, the node will instead inherit themes from the parent.
Minimum size of the node.
Check if the node is hidden.
Set the visibility
The theme defines how the node will appear to the user.
Set the theme.
Nodes automatically inherit theme from their parent, and the root node implicitly inherits the default theme. An explicitly-set theme will override any inherited themes recursively, stopping at nodes that also have themes set explicitly.
Clear the currently assigned theme
Current style, used for sizing. Does not include any changes made by when clauses or callbacks.
Show the node.
Hide the node.
Disable this node.
Enable this node.
Toggle the node's visibility.
Remove this node from the tree before the next draw.
toRemove is used to mark nodes for removal. A node marked as such should stop being drawn, and should be removed from the tree.
Get the minimum size of this node.
Check if this node is hovered.
Check if this node is disabled.
Checks if the node is disabled, either by self, or by any of its ancestors. Updated when drawn.
Apply all of the given node parameters on this node.
Queue an action to perform within this node's branch.
Perform a tree action the next time this node is drawn.
Start a branch action (or multiple) to run on children of this node.
True if this node is pending a resize.
Recalculate the window size before next draw.
Draw this node as a root node.
Draw a child node at the specified location inside of this node.
Draw this node at the specified location from within of another (parent) node.
Get the node's margin box for given available space. The margin box, nor the available space aren't typically given to a node, but this may be useful for its parent nodes.
Get the node's padding box (outer box) for set available space.
Prepare a child for use. This is automatically called by resizeChild and only meant for advanced usage.
Resize a child of this node.
Recalculate the minimum node size and update the minSize property.
Switch to the previous or next focused item
Switch focus towards a specified direction.
Connect to an I/O system
Require
Load a resource associated with the given I/O.
Enable I/O interfaces implemented by this node.
This is the implementation of resizing to be provided by children.
Draw this node.
Check if the node is hovered.
Test if the specified point is the node's bounds. This is used to map screen positions to nodes, such as when determining which nodes are hovered by mouse. If the node contains the point, then it is "opaque," and if not, it is "transparent".
The focus box defines the *focused* part of the node. This is relevant in nodes which may have a selectable subset, such as a dropdown box, which may be more important at present moment (selected). Scrolling actions like scrollIntoView will use the focus box to make sure the selected area is presented to the user.
Get the current style.
Reload style from the current theme.
import fluid; NodeSlot!Label slot1, slot2; // Slots can be empty, with no node inside auto root = vspace( label("Hello, "), slot1 = nodeSlot!Label(.layout!"fill"), label(" and "), slot2 = nodeSlot!Label(.layout!"fill"), ); // Slots can be assigned other nodes slot1 = label("John"); slot2 = button("Jane", delegate { // Slot contents can be swapped with a single call slot1.swapSlots(slot2); }); // Slots can be reassigned at any time slot1 = label("Joe"); // Their values can also be removed slot1.clear();
A "node slot" node, which displays the node given to it. Allows safely swapping nodes in the layout by reference, even during drawing. Useful for creating tabs and menus.
Because NodeSlot does not inherit from T, it uses the single-parameter overload of simpleConstructor.