Skip to content

ProgressNode

Namespace: Hex1b

Assembly: Hex1b.dll

Render node for displaying progress bars. Created by reconciling a .

csharp
public sealed class ProgressNode : Hex1bNode

Inheritance

ObjectHex1bNodeProgressNode

Properties

IsIndeterminate

Gets or sets whether the progress bar is in indeterminate mode.

Returns: Boolean

csharp
public bool IsIndeterminate { get; set; }

Maximum

Gets or sets the maximum value of the progress range.

Returns: Double

csharp
public double Maximum { get; set; }

Minimum

Gets or sets the minimum value of the progress range.

Returns: Double

csharp
public double Minimum { get; set; }

Value

Gets or sets the current progress value.

Returns: Double

csharp
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.

csharp
protected override Size MeasureCore(Constraints constraints)

Render(Hex1bRenderContext)

Renders the progress bar to the terminal.

Parameters:

csharp
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.

Released under the MIT License.