ProgressNode
Namespace: Hex1b
Assembly: Hex1b.dll
Render node for displaying progress bars. Created by reconciling a .
public sealed class ProgressNode : Hex1bNodeInheritance
Object → Hex1bNode → ProgressNode
Properties
IsIndeterminate
Gets or sets whether the progress bar is in indeterminate mode.
Returns: Boolean
public bool IsIndeterminate { get; set; }Maximum
Gets or sets the maximum value of the progress range.
Returns: Double
public double Maximum { get; set; }Minimum
Gets or sets the minimum value of the progress range.
Returns: Double
public double Minimum { get; set; }Value
Gets or sets the current progress value.
Returns: Double
public double Value { get; set; }Methods
MeasureCore(Constraints)
Measures the size required for the progress bar.
Parameters:
constraints(Constraints): The size constraints for layout.
Returns: Size
The measured size. The progress bar fills available width and has a height of 1.
protected override Size MeasureCore(Constraints constraints)Render(Hex1bRenderContext)
Renders the progress bar to the terminal.
Parameters:
context(Hex1bRenderContext): The render context providing terminal access and theming.
public override void Render(Hex1bRenderContext context)Remarks
ProgressNode handles measuring and rendering progress bars in both determinate and indeterminate modes.
For indeterminate mode, animation is time-based: the node tracks when it started and calculates the current position based on elapsed time. This ensures consistent animation speed regardless of how often the screen is redrawn.
This node is not focusable and does not handle input. It is a display-only widget.