Description
Appearance
type Appearance is record
Text : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Selection : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Current_Line : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Gutter : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Placeholder : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Cursor : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Read_Only : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Disabled : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
end record;
Record fields
- Text
- Selection
- Current_Line
- Gutter
- Placeholder
- Cursor
- Read_Only
- Disabled
Blur
procedure Blur (Item : in out Model)
Parameters
- Item
Can_Redo
function Can_Redo (Item : Model) return Boolean
Parameters
- Item
Return value
Can_Undo
function Can_Undo (Item : Model) return Boolean
Parameters
- Item
Return value
Clear_Selection
procedure Clear_Selection (Item : in out Model)
Parameters
- Item
Create
function Create
(Max_Code_Points : Positive;
Max_Lines : Positive;
Max_Undo_Entries : Positive;
Max_History_Codepoints : Positive;
Width : Positive := 40;
Height : Positive := 8;
Placeholder : Wide_Wide_String := "") return Model
Placeholder is presentation metadata. It is not editable text and is therefore outside Max_Code_Points, Max_Lines, and history accounting; rendering clips it to the validated component geometry.
Parameters
- Max_Code_Points
- Max_Lines
- Max_Undo_Entries
- Max_History_Codepoints
- Width
- Height
- Placeholder
Return value
Cursor_Offset
function Cursor_Offset (Item : Model) return Natural
Parameters
- Item
Return value
Cursor_Position
function Cursor_Position (Item : Model) return Position
Parameters
- Item
Return value
Focus
procedure Focus (Item : in out Model)
Parameters
- Item
Focused
function Focused (Item : Model) return Boolean
Parameters
- Item
Return value
From_Theme
function From_Theme
(Theme : Flyology_TUI.Themes.Theme) return Appearance
Parameters
- Theme
Return value
Gutter_Columns
function Gutter_Columns (Item : Model) return Positive
Parameters
- Item
Return value
Handle
function Handle
(Item : in out Model;
Event : Flyology_TUI.Events.Terminal_Event)
return Flyology_TUI.Components.Interactions.Update_Result
Parameters
- Item
- Event
Return value
Handle
function Handle
(Item : in out Model;
Event : Flyology_TUI.Mouse.Local_Event)
return Flyology_TUI.Components.Interactions.Update_Result
Parameters
- Item
- Event
Return value
Has_Selection
function Has_Selection (Item : Model) return Boolean
Parameters
- Item
Return value
Height
function Height (Item : Model) return Positive
Parameters
- Item
Return value
Is_Enabled
function Is_Enabled (Item : Model) return Boolean
Parameters
- Item
Return value
Is_Read_Only
function Is_Read_Only (Item : Model) return Boolean
Parameters
- Item
Return value
Line_Count
function Line_Count (Item : Model) return Positive
Parameters
- Item
Return value
Line_End_Offset
function Line_End_Offset (Item : Model; Line : Positive) return Natural
Parameters
- Item
- Line
Return value
Line_Start_Offset
function Line_Start_Offset (Item : Model; Line : Positive) return Natural
Parameters
- Item
- Line
Return value
Model
type Model
(Max_Code_Points : Positive;
Max_Lines : Positive;
Max_Undo_Entries : Positive;
Max_History_Codepoints : Positive) is tagged limited private;
A model owns its bounded text and history storage. It is limited so construction is build-in-place and ownership cannot be copied.
Record fields
- Max_Code_Points
- Max_Lines
- Max_Undo_Entries
- Max_History_Codepoints
Position
type Position is record
Line : Positive := 1;
Code_Point : Natural := 0;
Cell_Column : Natural := 0;
end record;
Record fields
- Line
- Code_Point
- Cell_Column
Position_At_Offset
function Position_At_Offset (Item : Model; Offset : Natural)
return Position
Parameters
- Item
- Offset
Return value
Redo
procedure Redo (Item : in out Model)
Parameters
- Item
Render
function Render
(Item : Model; Look : Appearance)
return Flyology_TUI.Surfaces.Surface
Parameters
- Item
- Look
Return value
Render
function Render
(Item : Model; Theme : Flyology_TUI.Themes.Theme)
return Flyology_TUI.Surfaces.Surface
Parameters
- Item
- Theme
Return value
Select_All
procedure Select_All (Item : in out Model)
Parameters
- Item
Selection_Range
procedure Selection_Range
(Item : Model; First, Last : out Natural)
Parameters
- Item
- First
- Last
Set_Cursor_Offset
procedure Set_Cursor_Offset (Item : in out Model; Offset : Natural)
Parameters
- Item
- Offset
Set_Enabled
procedure Set_Enabled (Item : in out Model; Enabled : Boolean)
Parameters
- Item
- Enabled
Set_Placeholder
procedure Set_Placeholder
(Item : in out Model; Placeholder : Wide_Wide_String)
Replace presentation metadata without changing text or history.
Parameters
- Item
- Placeholder
Set_Read_Only
procedure Set_Read_Only (Item : in out Model; Read_Only : Boolean)
Parameters
- Item
- Read_Only
Set_Size
procedure Set_Size (Item : in out Model; Width, Height : Positive)
Parameters
- Item
- Width
- Height
Set_Tab_Width
procedure Set_Tab_Width (Item : in out Model; Width : Positive)
Parameters
- Item
- Width
Set_Viewport
procedure Set_Viewport
(Item : in out Model; First_Line : Positive; First_Cell : Natural := 0)
Parameters
- Item
- First_Line
- First_Cell
Set_Wrap
procedure Set_Wrap (Item : in out Model; Mode : Wrap_Mode)
Parameters
- Item
- Mode
Tab_Width
function Tab_Width (Item : Model) return Positive
Parameters
- Item
Return value
Try_Set_Text
procedure Try_Set_Text
(Item : in out Model;
Value : Wide_Wide_String;
Success : out Boolean)
Normalize CRLF and CR to LF. Failure leaves the complete model intact.
Parameters
- Item
- Value
- Success
Undo
procedure Undo (Item : in out Model)
Parameters
- Item
Update
procedure Update
(Item : in out Model;
Event : Flyology_TUI.Events.Terminal_Event)
Parameters
- Item
- Event
Update
procedure Update
(Item : in out Model;
Event : Flyology_TUI.Mouse.Local_Event)
Parameters
- Item
- Event
Value
function Value (Item : Model) return Wide_Wide_String
Parameters
- Item
Return value
Viewport_Cell
function Viewport_Cell (Item : Model) return Natural
Parameters
- Item
Return value
Viewport_Line
function Viewport_Line (Item : Model) return Positive
Parameters
- Item
Return value
Visible_Segment
procedure Visible_Segment
(Item : Model;
Row : Natural;
Line : out Positive;
Segment_First : out Natural;
Segment_Last : out Natural;
Exists : out Boolean)
Parameters
- Item
- Row
- Line
- Segment_First
- Segment_Last
- Exists
Width
function Width (Item : Model) return Positive
Parameters
- Item
Return value
Wrap_Mode
type Wrap_Mode is (No_Wrap, Soft_Wrap);
Enumeration literals
- No_Wrap
- Soft_Wrap
Wrapping
function Wrapping (Item : Model) return Wrap_Mode
Parameters
- Item