SplitButtonNode
Namespace: Hex1b
Assembly: Hex1b.dll
Render node for . Displays a primary action button with an optional dropdown for secondary actions.
public sealed class SplitButtonNode : Hex1bNodeInheritance
Object → Hex1bNode → SplitButtonNode
Properties
DropdownOpenedCallback
Callback invoked when the dropdown menu is opened.
Returns: Action
public Action? DropdownOpenedCallback { get; set; }IsDropdownOpen
Whether the dropdown menu is currently open.
Returns: Boolean
public bool IsDropdownOpen { 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; }PrimaryAction
The async action to execute when the primary button is clicked.
Returns: Func<InputBindingActionContext, Task>
public Func<InputBindingActionContext, Task>? PrimaryAction { get; set; }PrimaryLabel
The label for the primary action.
Returns: String
public string PrimaryLabel { get; set; }SecondaryActions
The secondary actions shown in the dropdown.
Returns: IReadOnlyList<SplitButtonAction>
public IReadOnlyList<SplitButtonAction> SecondaryActions { get; set; }SourceWidget
The source widget that was reconciled into this node.
Returns: SplitButtonWidget
public SplitButtonWidget? SourceWidget { get; set; }Methods
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)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)