Description
Advance_Preview
procedure Advance_Preview
(Item : in out Model; Line_Budget : Natural)
Parameters
- Item
- Line_Budget
Annotation_Appearance
type Annotation_Appearance is
array (Annotation_Kind) of Flyology_TUI.Styles.Style;
Annotation_Kind
type Annotation_Kind is
(Marker, Heading, Strong, Emphasis, Code, Link, Task_Marker, Quote, Rule);
Enumeration literals
- Marker
- Heading
- Strong
- Emphasis
- Code
- Link
- Task_Marker
- Quote
- Rule
Annotations_From_Theme
function Annotations_From_Theme
(Theme : Flyology_TUI.Themes.Theme) return Annotation_Appearance
Semantic source annotations are borrowed while rendering and never alter the editable Markdown text, cursor, selection, or preview model.
Parameters
- Theme
Return value
Appearance
type Appearance is record
Source : Flyology_TUI.Components.Text_Areas.Appearance;
Preview : Flyology_TUI.Components.Markdown_Viewers.Appearance;
end record;
Record fields
- Source
- Preview
Blur
procedure Blur (Item : in out Model)
Parameters
- Item
Create
function Create
(Max_Code_Points : Positive;
Max_Lines : Positive;
Max_Undo_Entries : Positive;
Max_History_Codepoints : Positive;
Max_Links : Positive;
Width : Positive := 80;
Height : Positive := 20;
Mode : Presentation_Mode := Split_Horizontally)
return Model
Parameters
- Max_Code_Points
- Max_Lines
- Max_Undo_Entries
- Max_History_Codepoints
- Max_Links
- Width
- Height
- Mode
Return value
Focus_Preview
procedure Focus_Preview (Item : in out Model)
Parameters
- Item
Focus_Source
procedure Focus_Source (Item : in out Model)
Parameters
- Item
From_Theme
function From_Theme
(Theme : Flyology_TUI.Themes.Theme) return Appearance
Parameters
- Theme
Return value
Handle_Preview
function Handle_Preview
(Item : in out Model;
Event : Flyology_TUI.Events.Terminal_Event)
return Flyology_TUI.Components.Markdown_Viewers.Action_Result
Parameters
- Item
- Event
Return value
Handle_Preview
function Handle_Preview
(Item : in out Model;
Event : Flyology_TUI.Mouse.Local_Event;
Layout : Flyology_TUI.Components.Markdown_Viewers.Presentation)
return Flyology_TUI.Components.Markdown_Viewers.Action_Result
Parameters
- Item
- Event
- Layout
Return value
Handle_Source
function Handle_Source
(Item : in out Model;
Event : Flyology_TUI.Events.Terminal_Event)
return Flyology_TUI.Components.Interactions.Update_Result
Parameters
- Item
- Event
Return value
Handle_Source
function Handle_Source
(Item : in out Model;
Event : Flyology_TUI.Mouse.Local_Event)
return Flyology_TUI.Components.Interactions.Update_Result
Parameters
- Item
- Event
Return value
Has_Preview
function Has_Preview (Item : Layout_Snapshot) return Boolean
Parameters
- Item
Return value
Has_Source
function Has_Source (Item : Layout_Snapshot) return Boolean
Parameters
- Item
Return value
Height
function Height (Item : Model) return Positive
Parameters
- Item
Return value
Layout
function Layout (Item : Model) return Layout_Snapshot
Parameters
- Item
Return value
Layout_Snapshot
type Layout_Snapshot is private;
Mode
function Mode (Item : Model) return Presentation_Mode
Parameters
- Item
Return value
Model
type Model
(Max_Code_Points : Positive;
Max_Lines : Positive;
Max_Undo_Entries : Positive;
Max_History_Codepoints : Positive;
Max_Links : Positive) is tagged limited private;
Source editing delegates to Text_Areas. Preview parsing and link state delegate to Markdown_Viewers. This model only synchronizes those two bounded, task-free cores and computes responsive presentation regions.
Record fields
- Max_Code_Points
- Max_Lines
- Max_Undo_Entries
- Max_History_Codepoints
- Max_Links
Present_Preview
function Present_Preview
(Item : Model;
Look : Appearance;
Line_Budget : Natural := Natural'Last)
return Flyology_TUI.Components.Markdown_Viewers.Presentation
Parameters
- Item
- Look
- Line_Budget
Return value
Present_Preview
function Present_Preview
(Item : Model;
Theme : Flyology_TUI.Themes.Theme;
Line_Budget : Natural := Natural'Last)
return Flyology_TUI.Components.Markdown_Viewers.Presentation
Parameters
- Item
- Theme
- Line_Budget
Return value
Presentation_Mode
type Presentation_Mode is
(Source_Only,
Preview_Only,
Split_Horizontally,
Split_Vertically);
Enumeration literals
- Source_Only
- Preview_Only
- Split_Horizontally
- Split_Vertically
Preview_First_Visible_Row
function Preview_First_Visible_Row (Item : Model) return Natural
Parameters
- Item
Return value
Preview_Focused_Link
function Preview_Focused_Link
(Item : Model) return Flyology_TUI.Components.Markdown_Viewers.Link_Id
Parameters
- Item
Return value
Preview_Parsing
function Preview_Parsing
(Item : Model)
return Flyology_TUI.Components.Markdown_Viewers.Parsing_State
Parameters
- Item
Return value
Preview_Region
function Preview_Region
(Item : Layout_Snapshot) return Flyology_TUI.Geometry.Rectangle
Parameters
- Item
Return value
Preview_Unsupported
function Preview_Unsupported
(Item : Model)
return Flyology_TUI.Components.Markdown_Viewers.Unsupported_Set
Parameters
- Item
Return value
Render_Source
function Render_Source
(Item : Model; Look : Appearance)
return Flyology_TUI.Surfaces.Surface
Parameters
- Item
- Look
Return value
Render_Source
function Render_Source
(Item : Model;
Look : Appearance;
Annotations : Annotation_Appearance)
return Flyology_TUI.Surfaces.Surface
Parameters
- Item
- Look
- Annotations
Return value
Render_Source
function Render_Source
(Item : Model; Theme : Flyology_TUI.Themes.Theme)
return Flyology_TUI.Surfaces.Surface
Parameters
- Item
- Theme
Return value
Set_Mode
procedure Set_Mode (Item : in out Model; Mode : Presentation_Mode)
Parameters
- Item
- Mode
Set_Size
procedure Set_Size (Item : in out Model; Width, Height : Positive)
Parameters
- Item
- Width
- Height
Set_Source_Percentage
procedure Set_Source_Percentage
(Item : in out Model; Percentage : Source_Percentage_Range)
Percentage of the available span assigned to source in split modes.
Parameters
- Item
- Percentage
Source
function Source (Item : Model) return Wide_Wide_String
Parameters
- Item
Return value
Source_Percentage
function Source_Percentage
(Item : Model) return Source_Percentage_Range
Parameters
- Item
Return value
Source_Percentage_Range
subtype Source_Percentage_Range is Positive range 10 .. 90;
Source_Region
function Source_Region
(Item : Layout_Snapshot) return Flyology_TUI.Geometry.Rectangle
Parameters
- Item
Return value
Try_Set_Source
procedure Try_Set_Source
(Item : in out Model;
Value : Wide_Wide_String;
Success : out Boolean)
Parameters
- Item
- Value
- Success
Width
function Width (Item : Model) return Positive
Parameters
- Item