SliderNode
Namespace: Hex1b
Assembly: Hex1b.dll
Render node for the Slider widget. Manages state, handles input, and renders the slider.
public sealed class SliderNode : Hex1bNodeInheritance
Object → Hex1bNode → SliderNode
Properties
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; }LargeStepPercent
The large step as a percentage of the range (for PageUp/PageDown).
Returns: Double
public double LargeStepPercent { get; set; }Maximum
The maximum value of the range.
Returns: Double
public double Maximum { get; set; }Minimum
The minimum value of the range.
Returns: Double
public double Minimum { get; set; }Percentage
Gets the current value as a percentage (0.0 to 1.0) of the range.
Returns: Double
public double Percentage { get; }SourceWidget
The source widget for creating typed event args.
Returns: SliderWidget
public SliderWidget? SourceWidget { get; set; }Step
The step increment for keyboard navigation. Null means 1% of range.
Returns: Nullable<Double>
public double? Step { get; set; }Value
The current value of the slider.
Returns: Double
public double Value { 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)Remarks
SliderNode maintains the current value and handles keyboard/mouse input for adjusting the value. The value is preserved across reconciliation cycles.
The slider renders as a horizontal track with a handle (knob) that indicates the current position within the range.