InteractableNode
Namespace: Hex1b.Nodes
Assembly: Hex1b.dll
A node that makes its child tree focusable, clickable, and hoverable as a single unit. The node itself is the focus target — children are excluded from the focus ring. Renders no chrome of its own; layout and rendering pass through to the child.
public sealed class InteractableNode : Hex1bNodeInheritance
Object → Hex1bNode → InteractableNode
Properties
Child
The single child node.
Returns: Hex1bNode
public Hex1bNode? Child { get; set; }ClickAction
The async action to execute when the interactable is activated (Enter, Space, or mouse click).
Returns: Func<InputBindingActionContext, Task>
public Func<InputBindingActionContext, Task>? ClickAction { get; set; }FocusChangedAction
Callback invoked when focus state changes. Synchronous because it fires from a property setter.
Returns: Action<Boolean>
public Action<bool>? FocusChangedAction { get; set; }HitTestBounds
Hit test bounds cover the entire arranged area.
Returns: Rect
public override Rect HitTestBounds { get; }HoverChangedAction
Callback invoked when hover state changes. Synchronous because it fires from a property setter.
Returns: Action<Boolean>
public Action<bool>? HoverChangedAction { get; set; }IsFocusable
Returns true if this node can receive focus.
Returns: Boolean
public override bool IsFocusable { get; }IsFocused
Gets or sets whether this node is currently focused. Only meaningful for focusable nodes (where IsFocusable is true).
Returns: Boolean
public override bool IsFocused { get; set; }IsHovered
Gets or sets whether the mouse is currently hovering over this node. Set by Hex1bApp based on mouse position during each frame. Only set on focusable nodes (tracked via FocusRing hit testing).
Returns: Boolean
public override bool IsHovered { get; set; }SourceWidget
The source widget that was reconciled into this node.
Returns: InteractableWidget
public InteractableWidget? SourceWidget { get; set; }Methods
ArrangeCore(Rect)
Override this method to implement arranging logic for this node. The base implementation saves previous bounds, marks dirty on change, and sets bounds.
Parameters:
rect(Rect):
protected override void ArrangeCore(Rect rect)ConfigureDefaultBindings(InputBindingsBuilder)
Configures the default input bindings for this node type. Override in derived classes to add default key bindings. These bindings can be inspected and modified by the user's callback.
Parameters:
bindings(InputBindingsBuilder): The builder to add bindings to.
public override void ConfigureDefaultBindings(InputBindingsBuilder bindings)GetChildren()
Returns the child for tree traversal and input routing.
Returns: IReadOnlyList<Hex1bNode>
public override IReadOnlyList<Hex1bNode> GetChildren()MeasureCore(Constraints)
Override this method to implement measuring logic for this node.
Parameters:
constraints(Constraints):
Returns: Size
protected override Size MeasureCore(Constraints constraints)Render(Hex1bRenderContext)
Renders the node to the given context.
Parameters:
context(Hex1bRenderContext):
public override void Render(Hex1bRenderContext context)