Node

Represents a Fluid node.

Constructors

this
this()

Construct a new node.

Members

Aliases

ImplHoveredRect
alias ImplHoveredRect = implHoveredRect
Undocumented in source.
io
alias io = backend
Undocumented in source.

Classes

Extra
class Extra
Undocumented in source.

Enums

Align (from fluid.structs)
enum NodeAlign via public import fluid.structs : Align = NodeAlign;
Undocumented in source.
NodeAlign (from fluid.structs)
enum NodeAlign via public import fluid.structs : NodeAlign, Layout;
Undocumented in source.

Functions

_focusDirection
void _focusDirection(FluidInputAction action)

Switch focus towards a specified direction.

_focusPrevNext
void _focusPrevNext(FluidInputAction actionType)

Switch to the previous or next focused item

backend
inout(FluidBackend) backend()
Undocumented in source. Be warned that the author may not have intended to support it.
backend
FluidBackend backend(FluidBackend backend)
Undocumented in source. Be warned that the author may not have intended to support it.
disable
This disable()

Disable this node.

draw
void draw()

Draw this node as a root node.

draw
void draw(Rectangle space)

Draw this node at the specified location from within of another (parent) node.

drawImpl
void drawImpl(Rectangle paddingBox, Rectangle contentBox)

Draw this node.

enable
This enable()

Enable this node.

hide
This hide()

Hide the node.

hoveredImpl
bool hoveredImpl(Rectangle rect, Vector2 mousePosition)

Check if the node is hovered.

isDisabled
inout(bool) isDisabled()

Check if this node is disabled.

isDisabledInherited
bool isDisabledInherited()

Checks if the node is disabled, either by self, or by any of its ancestors. Updated when drawn.

opEquals
bool opEquals(Node otherNode)
Undocumented in source. Be warned that the author may not have intended to support it.
pickStyle
Style pickStyle()

Get the current style.

queueAction
void queueAction(TreeAction action)

Queue an action to perform within this node's branch.

reloadStyles
void reloadStyles()

Reload style from the current theme.

remove
void remove()

Remove this node from the tree before the next draw.

resize
void resize(LayoutTree* tree, Theme theme, Vector2 space)

Recalculate the minimum node size and update the minSize property.

resizeImpl
void resizeImpl(Vector2 space)

Ditto

resizePending
bool resizePending()

True if this node is pending a resize.

show
This show()

Show the node.

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
toggleShow
void toggleShow()

Toggle the node's visibility.

updateSize
void updateSize()

Recalculate the window size before next draw.

Mixin templates

implHoveredRect
deprecated mixintemplate implHoveredRect()
Undocumented in source.

Properties

isHidden
bool isHidden [@property getter]

Check if the node is hidden.

isHidden
bool isHidden [@property setter]

Set the visibility

isHovered
bool isHovered [@property getter]

Check if this node is hovered.

style
inout(Style) style [@property getter]

Current style, used for sizing. Does not include any changes made by when clauses or callbacks.

theme
inout(Theme) theme [@property getter]

Get the current theme.

theme
Theme theme [@property setter]

Set the theme.

Structs

Layout (from fluid.structs)
struct Layout via public import fluid.structs : NodeAlign, Layout;

Node parameter for setting the node layout.

Variables

ignoreMouse
bool ignoreMouse;

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.

layout
Layout layout;

Layout for this node.

minSize
auto minSize;

Minimum size of the node.

tags
TagList tags;

Tags assigned for this node.

toRemove
bool toRemove;

If true, this node will be removed from the tree on the next draw.

tree
LayoutTree* tree;

Tree data for the node. Note: requires at least one draw before this will work.

Meta