Description
Appearance
type Appearance is record
Frame : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Focused_Frame : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Title : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Focused_Title : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Close : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Content : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
Disabled : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
end record;
Record fields
- Frame
- Focused_Frame
- Title
- Focused_Title
- Close
- Content
- Disabled
Blur
procedure Blur (Item : in out Model)
Parameters
- Item
Bounds
function Bounds (Item : Model) return Flyology_TUI.Geometry.Rectangle
Parameters
- Item
Return value
Client_Origin
function Client_Origin
(Item : Model) return Flyology_TUI.Geometry.Point
Parameters
- Item
Return value
Client_Region
function Client_Region
(Item : Model) return Flyology_TUI.Geometry.Rectangle
Parameters
- Item
Return value
Constrain_To
procedure Constrain_To
(Item : in out Model;
Workspace : Flyology_TUI.Geometry.Rectangle)
Clamp the complete window to Workspace without synthesizing input. This is the application resize hook. It cancels movement, resize, or close activation, but preserves an already-acquired capture until the matching left-button release can report Release_Capture. An empty workspace uses the same origin-preserving policy as Handle.
Parameters
- Item
- Workspace
Create
function Create
(X, Y : Integer;
Width, Height : Positive;
Minimum_Width : Positive := 4;
Minimum_Height : Positive := 3;
Closable : Boolean := True;
Movable : Boolean := True;
Resizable : Boolean := True) return Model
Parameters
- X
- Y
- Width
- Height
- Minimum_Width
- Minimum_Height
- Closable
- Movable
- Resizable
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
Handle
function Handle
(Item : in out Model;
Event : Flyology_TUI.Events.Terminal_Event;
Workspace : Flyology_TUI.Geometry.Rectangle)
return Flyology_TUI.Components.Interactions.Update_Result
Alt-arrow moves, Control-arrow resizes, and Shift accelerates either.
Parameters
- Item
- Event
- Workspace
Return value
Handle
function Handle
(Item : in out Model;
Event : Flyology_TUI.Mouse.Local_Event;
Workspace : Flyology_TUI.Geometry.Rectangle)
return Flyology_TUI.Components.Interactions.Update_Result
Mouse coordinates are relative to Workspace, not to the moving window. Captured drag and release events may therefore remain signed and outside the old bounds. A nonempty workspace clamps the complete window into it; when smaller than a configured minimum it temporarily becomes the effective minimum. An empty workspace preserves size and moves the origin to the workspace origin. Corners, side and bottom borders resize; the second top cell is the north-resize handle. The rest of the header moves the window except for its close control.
Parameters
- Item
- Event
- Workspace
Return value
Handle
function Handle
(Item : in out Model;
Event : Flyology_TUI.Mouse.Local_Event;
Workspace : Flyology_TUI.Geometry.Rectangle;
Skin : Flyology_TUI.Skins.Skin)
return Flyology_TUI.Components.Interactions.Update_Result
Parameters
- Item
- Event
- Workspace
- Skin
Return value
Handle
function Handle
(Item : in out Model;
Event : Flyology_TUI.Mouse.Local_Event;
Workspace : Flyology_TUI.Geometry.Rectangle;
Chrome : Flyology_TUI.Skins.Window_Chrome)
return Flyology_TUI.Components.Interactions.Update_Result
Parameters
- Item
- Event
- Workspace
- Chrome
Return value
Is_Enabled
function Is_Enabled (Item : Model) return Boolean
Parameters
- Item
Return value
Model
type Model is tagged private;
Render
function Render
(Item : Model;
Title : Wide_Wide_String;
Content : Flyology_TUI.Surfaces.Surface;
Workspace : Flyology_TUI.Geometry.Rectangle;
Appearance : Windows.Appearance)
return Flyology_TUI.Surfaces.Surface
Render a workspace-sized surface. Title and Content stay caller-owned. Signed clipping makes negative and partially offscreen bounds safe.
Parameters
- Item
- Title
- Content
- Workspace
- Appearance
Return value
Render
function Render
(Item : Model;
Title : Wide_Wide_String;
Content : Flyology_TUI.Surfaces.Surface;
Workspace : Flyology_TUI.Geometry.Rectangle;
Appearance : Windows.Appearance;
Chrome : Flyology_TUI.Skins.Window_Chrome)
return Flyology_TUI.Surfaces.Surface
Parameters
- Item
- Title
- Content
- Workspace
- Appearance
- Chrome
Return value
Render
function Render
(Item : Model;
Title : Wide_Wide_String;
Content : Flyology_TUI.Surfaces.Surface;
Workspace : Flyology_TUI.Geometry.Rectangle;
Skin : Flyology_TUI.Skins.Skin)
return Flyology_TUI.Surfaces.Surface
Parameters
- Item
- Title
- Content
- Workspace
- Skin
Return value
Render
function Render
(Item : Model;
Title : Wide_Wide_String;
Content : Flyology_TUI.Surfaces.Surface;
Workspace : Flyology_TUI.Geometry.Rectangle;
Theme : Flyology_TUI.Themes.Theme)
return Flyology_TUI.Surfaces.Surface
Parameters
- Item
- Title
- Content
- Workspace
- Theme
Return value
Set_Enabled
procedure Set_Enabled (Item : in out Model; Enabled : Boolean)
Disabling cancels movement, resize, or close activation. If the window already acquired mouse capture, the next left release still reports Release_Capture.
Parameters
- Item
- Enabled
Update
procedure Update
(Item : in out Model;
Event : Flyology_TUI.Events.Terminal_Event;
Workspace : Flyology_TUI.Geometry.Rectangle)
Parameters
- Item
- Event
- Workspace
Update
procedure Update
(Item : in out Model;
Event : Flyology_TUI.Mouse.Local_Event;
Workspace : Flyology_TUI.Geometry.Rectangle)
Parameters
- Item
- Event
- Workspace