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

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()

Pass focus to the field contained by this slot.

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.

Mixins

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

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.

Meta