InputOverrideWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
A container widget that overrides input bindings for all descendant widgets of specified types. Overrides cascade through the widget tree — any widget of a matching type within the subtree will have the override applied after its default bindings and any per-instance .
public sealed record InputOverrideWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<InputOverrideWidget>Inheritance
Object → Hex1bWidget → InputOverrideWidget
Implements
Constructors
InputOverrideWidget(Hex1bWidget)
A container widget that overrides input bindings for all descendant widgets of specified types. Overrides cascade through the widget tree — any widget of a matching type within the subtree will have the override applied after its default bindings and any per-instance .
Parameters:
Content(Hex1bWidget):
public InputOverrideWidget(Hex1bWidget Content)Properties
Content
Returns: Hex1bWidget
public Hex1bWidget Content { get; init; }Methods
Override<TWidget>(Action<InputBindingsBuilder>)
Adds or replaces a binding override for all descendant widgets of type TWidget. The configure callback runs after the widget's default bindings and any per-instance WithInputBindings configurator.
Parameters:
configure(Action<InputBindingsBuilder>): A callback that receives the and can add, remove, or remap bindings using , , and theTriggersmethods.
Returns: InputOverrideWidget
A new with the override added.
public InputOverrideWidget Override<TWidget>(Action<InputBindingsBuilder> configure) where TWidget : Hex1bWidgetExamples
ctx.InputOverride(
ctx.VStack([list1, list2, textbox1])
)
.Override(b =>
{
b.Remove(ListWidget.MoveUp);
b.Key(Hex1bKey.K).Triggers(ListWidget.MoveUp);
})
.Override(b =>
{
b.Remove(TextBoxWidget.MoveUp);
b.Key(Hex1bKey.K).Ctrl().Triggers(TextBoxWidget.MoveUp);
});