TermColor.Widgets.Basic: pure progress and spinner rendering #
Widgets own state-to-text rendering. A caller owns timers, terminal width, and output.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Widgets.instBEqProgressConfig.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Percentage shown by a progress bar. Zero total means no work remains, so it is complete.
Equations
Instances For
Render a progress bar as styled text. The caller supplies the desired bar width explicitly.
Equations
- One or more equations did not get rendered due to their size.
Instances For
State displayed by an indeterminate progress bar. The frame moves back and forth.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Moving segment offset for an indeterminate progress bar.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Render a progress bar for work with no known total. The filled segment bounces at both ends.
The caller advances state.frame.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Default braille spinner frames. The caller advances the frame index.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Select a spinner frame, wrapping around the configured frame list.
Equations
- TermColor.Widgets.spinnerFrame config frame = match config.frames with | [] => TermColor.Text.empty | frames => frames.getD (frame % frames.length) TermColor.Text.empty
Instances For
Render one spinner frame and its optional label as styled text.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Widgets.instBEqShimmerConfig.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- TermColor.Widgets.instBEqShimmerState.beq { frame := a } { frame := b } = (a == b)
- TermColor.Widgets.instBEqShimmerState.beq x✝¹ x✝ = false
Instances For
Equations
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Render a display-width-aware shimmer while preserving non-color text styles.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Common status markers for command-line messages.
- success : StatusKind
- info : StatusKind
- warning : StatusKind
- error : StatusKind
Instances For
Equations
Equations
- TermColor.Widgets.instBEqStatusKind.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Render a styled status marker followed by a message.
Equations
- TermColor.Widgets.renderStatus kind message = TermColor.Widgets.statusMarker✝ kind ++ TermColor.Text.plain " " ++ message
Instances For
Render rows as fixed-width, display-aware columns. Cells wrap to their column width.
Equations
- TermColor.Widgets.renderTable widths rows gap alignments = TermColor.Layout.joinLines (List.map (fun (row : List TermColor.Text) => TermColor.Layout.columns widths gap row alignments) rows)
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Widgets.instReprKey.repr TermColor.Widgets.Key.end prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "TermColor.Widgets.Key.end")).group prec✝
- TermColor.Widgets.instReprKey.repr TermColor.Widgets.Key.up prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "TermColor.Widgets.Key.up")).group prec✝
- TermColor.Widgets.instReprKey.repr TermColor.Widgets.Key.tab prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "TermColor.Widgets.Key.tab")).group prec✝
Instances For
Keyboard bindings for a collapsible widget. Focus traversal remains an application concern.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Widgets.instBEqCollapsibleKeyConfig.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Widgets.instBEqCollapsibleState.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Widgets.instBEqCollapsibleConfig.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Widgets.instBEqCollapsibleRender.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- TermColor.Widgets.instInhabitedCollapsibleRender = { default := { text := TermColor.Text.empty, lineCount := 0, hitHeaderHeight := 0 } }
Toggle expansion and, when opening, move to the newest buffered body lines.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Expand a collapsible and show its newest buffered body lines.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Collapse a collapsible without changing its focus or scroll position.
Equations
- TermColor.Widgets.collapseCollapsible state = { focused := state.focused, scrollOffset := state.scrollOffset }
Instances For
Scroll an expanded body toward its first line.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Scroll an expanded body toward its last line.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Scroll an expanded body one viewport toward its first line.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Scroll an expanded body one viewport toward its last line.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Apply one configured key to a collapsible's pure display state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Render the wrapped, focusable header of a collapsible widget.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Render the currently visible, wrapped body lines of an expanded widget.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Render a collapsible with its visible line count and header hit height.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Widgets.instBEqTextInputConfig.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Apply one key to a text input. Input is limited by maxLength.
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Widgets.updateTextInput config TermColor.Widgets.Key.left state = { value := state.value, cursor := (TermColor.Widgets.clampCursor✝ state).pred }
- TermColor.Widgets.updateTextInput config TermColor.Widgets.Key.right state = { value := state.value, cursor := min state.value.toList.length (TermColor.Widgets.clampCursor✝ state + 1) }
- TermColor.Widgets.updateTextInput config TermColor.Widgets.Key.home state = { value := state.value }
- TermColor.Widgets.updateTextInput config (TermColor.Widgets.Key.ctrl 'a') state = { value := state.value }
- TermColor.Widgets.updateTextInput config TermColor.Widgets.Key.end state = { value := state.value, cursor := state.value.toList.length }
- TermColor.Widgets.updateTextInput config (TermColor.Widgets.Key.ctrl 'e') state = { value := state.value, cursor := state.value.toList.length }
- TermColor.Widgets.updateTextInput config (TermColor.Widgets.Key.ctrl 'u') state = { value := String.ofList (List.drop (TermColor.Widgets.clampCursor✝ state) state.value.toList) }
- TermColor.Widgets.updateTextInput config key state = { value := state.value, cursor := TermColor.Widgets.clampCursor✝ state }
Instances For
Render the fixed-width input body without a frame, for embedding in a caller-owned layout.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Render a single-line input with an optional visible cursor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- TermColor.Widgets.instBEqSliderState.beq { value := a } { value := b } = (a == b)
- TermColor.Widgets.instBEqSliderState.beq x✝¹ x✝ = false
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Widgets.instBEqSliderConfig.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Clamp a slider value, treating a reversed range as a single-value range.
Equations
- TermColor.Widgets.sliderValue config state = min (TermColor.Widgets.sliderMax✝ config) (max config.min state.value)
Instances For
Apply one key to an integer slider.
Equations
- TermColor.Widgets.updateSlider config TermColor.Widgets.Key.left state = { value := TermColor.Widgets.sliderValue config state - config.step }
- TermColor.Widgets.updateSlider config TermColor.Widgets.Key.down state = { value := TermColor.Widgets.sliderValue config state - config.step }
- TermColor.Widgets.updateSlider config TermColor.Widgets.Key.right state = { value := min (TermColor.Widgets.sliderMax✝ config) (TermColor.Widgets.sliderValue config state + config.step) }
- TermColor.Widgets.updateSlider config TermColor.Widgets.Key.up state = { value := min (TermColor.Widgets.sliderMax✝ config) (TermColor.Widgets.sliderValue config state + config.step) }
- TermColor.Widgets.updateSlider config key state = { value := TermColor.Widgets.sliderValue config state }
Instances For
Render an integer slider as a terminal bar and its current value.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- TermColor.Widgets.instBEqCheckboxState.beq { checked := a } { checked := b } = (a == b)
- TermColor.Widgets.instBEqCheckboxState.beq x✝¹ x✝ = false
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Widgets.instBEqCheckboxConfig.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Toggle a checkbox on activation.
Equations
- TermColor.Widgets.updateCheckbox (TermColor.Widgets.Key.char ' ') state = { checked := !state.checked }
- TermColor.Widgets.updateCheckbox TermColor.Widgets.Key.enter state = { checked := !state.checked }
- TermColor.Widgets.updateCheckbox key state = state
Instances For
Render a checkbox with its label.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Whether a key activates a button.