FieldSlot

A field slot is a node meant to hold an input node along with associated nodes, like labels. It's functionally equivalent to the `<label>` element in HTML.

Fields expand the interactable (clickable) area of input nodes by other nodes that are placed inside the slot. For example, in the code snippet below, if the user clicks on the "username" label, the text input underneath will gain focus.

fieldSlot!vframe(
    label("Username"),
    textInput(),
)

Constructors

this
this(Args args)
Undocumented in source.

Members

Functions

blocksInput
bool blocksInput()
Undocumented in source. Be warned that the author may not have intended to support it.
drawImpl
void drawImpl(Rectangle outer, Rectangle inner)
Undocumented in source. Be warned that the author may not have intended to support it.
focus
void focus()
focusAnd
FocusRecurseAction focusAnd()

Pass focus to the field contained by this slot.

focusImpl
bool focusImpl()
Undocumented in source. Be warned that the author may not have intended to support it.
hoverImpl
bool hoverImpl(HoverPointer )
Undocumented in source. Be warned that the author may not have intended to support it.
isFocused
bool isFocused()
Undocumented in source. Be warned that the author may not have intended to support it.
isHovered
bool isHovered()
Undocumented in source. Be warned that the author may not have intended to support it.
mouseImpl
void mouseImpl()
Undocumented in source. Be warned that the author may not have intended to support it.
press
void press()

Pass focus to the field contained by this slot and press it.

Mixins

__anonymous
mixin makeHoverable
Undocumented in source.
__anonymous
mixin FluidHoverable.enableInputActions
Undocumented in source.
__anonymous
mixin Hoverable.enableInputActions
Undocumented in source.

Mixed In Members

From mixin FluidHoverable.enableInputActions

inputActionImpl
bool inputActionImpl(InputActionID id, bool active)
Undocumented in source. Be warned that the author may not have intended to support it.
runInputActionImpl
bool runInputActionImpl(InputActionID action, bool isActive)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From FluidHoverable

mouseImpl
void mouseImpl()

Handle mouse input on the node.

isDisabled
inout(bool) isDisabled()

Check if the node is disabled. mixin makeHoverable to implement.

isHovered
bool isHovered()

Check if the node is hovered.

asNode
inout(Node) asNode()

Get the underlying node.

inputActionImpl
bool inputActionImpl(InputActionID id, bool active)

Handle input actions. This function is called by runInputAction and can be overriden to preprocess input actions in some cases.

runInputActionImpl
bool runInputActionImpl(InputActionID action, bool active)

Run input actions.

runInputAction
bool runInputAction(InputActionID action, bool active)
Undocumented in source. Be warned that the author may not have intended to support it.
runInputAction
bool runInputAction(bool active)
Undocumented in source. Be warned that the author may not have intended to support it.
runMouseInputActions
bool runMouseInputActions()

Run mouse input actions for the node.

makeHoverable
mixintemplate makeHoverable()
Undocumented in source.
enableInputActions
mixintemplate enableInputActions()
Undocumented in source.

From Hoverable

hoverImpl
bool hoverImpl(HoverPointer pointer)

Handle input. Called each frame when focused.

isHovered
bool isHovered()

From Focusable

focusImpl
bool focusImpl()

Handle input. Called each frame when focused.

focus
void focus()

Set focus to this node.

isFocused
bool isFocused()

Meta