← All compilation units

Flyology_TUI.Components.Indicators

Description

Appearance

type Appearance is record
   Primary   : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
   Muted     : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
   Success   : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
   Warning   : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
   Error     : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
   Separator : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
end record;
Record fields
Primary
Muted
Success
Warning
Error
Separator

Badge

function Badge
  (Label      : Wide_Wide_String;
   Kind       : Tone := Neutral;
   Appearance : Indicators.Appearance := (others => <>))
   return Flyology_TUI.Surfaces.Surface
Parameters
Label
Kind
Appearance
Return value

Badge

function Badge
  (Label : Wide_Wide_String;
   Kind  : Tone := Neutral;
   Theme : Flyology_TUI.Themes.Theme)
   return Flyology_TUI.Surfaces.Surface
Parameters
Label
Kind
Theme
Return value

Divider

function Divider
  (Width      : Natural;
   Label      : Wide_Wide_String := "";
   Appearance : Indicators.Appearance := (others => <>))
   return Flyology_TUI.Surfaces.Surface

The label, when present, is centered as " label ". At tiny widths it is clipped from the right; the returned surface always has exactly Width cells.

Parameters
Width
Label
Appearance
Return value

Divider

function Divider
  (Width : Natural;
   Label : Wide_Wide_String := "";
   Theme : Flyology_TUI.Themes.Theme)
   return Flyology_TUI.Surfaces.Surface
Parameters
Width
Label
Theme
Return value

From_Theme

function From_Theme
  (Theme : Flyology_TUI.Themes.Theme) return Appearance
Parameters
Theme
Return value

Gauge

function Gauge
  (Value      : Ratio;
   Width      : Natural;
   Appearance : Indicators.Appearance := (others => <>))
   return Flyology_TUI.Surfaces.Surface
Parameters
Value
Width
Appearance
Return value

Gauge

function Gauge
  (Value : Ratio;
   Width : Natural;
   Theme : Flyology_TUI.Themes.Theme)
   return Flyology_TUI.Surfaces.Surface
Parameters
Value
Width
Theme
Return value

Key_Value

function Key_Value
  (Key, Value : Wide_Wide_String;
   Width      : Natural;
   Appearance : Indicators.Appearance := (others => <>))
   return Flyology_TUI.Surfaces.Surface

Value has shrink priority. If it fits, it remains right aligned while Key is clipped into the cells to its left. If Value alone is wider than Width, it is clipped from the right starting at column zero.

Parameters
Key
Value
Width
Appearance
Return value

Key_Value

function Key_Value
  (Key, Value : Wide_Wide_String;
   Width      : Natural;
   Theme      : Flyology_TUI.Themes.Theme)
   return Flyology_TUI.Surfaces.Surface
Parameters
Key
Value
Width
Theme
Return value

Make_Segment

function Make_Segment
  (Label    : Wide_Wide_String;
   Priority : Segment_Priority := Normal;
   Kind     : Tone := Neutral) return Status_Segment
Parameters
Label
Priority
Kind
Return value

Maximum_Segments

Maximum_Segments : constant Positive := 32;

Ratio

subtype Ratio is Long_Float range 0.0 .. 1.0;

Segment_Array

type Segment_Array is array (Positive range <>) of Status_Segment;

Segment_Priority

type Segment_Priority is (Low, Normal, High, Critical);
Enumeration literals
Low
Normal
High
Critical

Status_Line

function Status_Line
  (Segments   : Segment_Array;
   Width      : Natural;
   Appearance : Indicators.Appearance := (others => <>))
   return Flyology_TUI.Surfaces.Surface

Segments that do not fit are removed from lowest priority to highest; equal-priority ties remove the rightmost segment first. Remaining segments retain source order. One final oversized segment is clipped.

Parameters
Segments
Width
Appearance
Return value

Status_Line

function Status_Line
  (Segments : Segment_Array;
   Width    : Natural;
   Theme    : Flyology_TUI.Themes.Theme)
   return Flyology_TUI.Surfaces.Surface
Parameters
Segments
Width
Theme
Return value

Status_Segment

type Status_Segment is record
   Label    : Text.Unbounded_Wide_Wide_String;
   Priority : Segment_Priority := Normal;
   Kind     : Tone := Neutral;
end record;
Record fields
Label
Priority
Kind

Tone

type Tone is (Neutral, Success_Tone, Warning_Tone, Error_Tone);
Enumeration literals
Neutral
Success_Tone
Warning_Tone
Error_Tone