diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-08 14:33:30 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-08 14:51:36 +1300 |
commit | 3a9028302447ad84363c580b2152f30417186667 (patch) | |
tree | 6f0e66ed7c0d831dfc744462335e76fdcb724d69 /src/fltk-widgets-inputs.ads | |
parent | 49f2a539cdc77b504ddef00162625531b659c767 (diff) |
Revised Input subhierarchy, separated bindings for Fl_Input and Fl_Input_ widgets
Diffstat (limited to 'src/fltk-widgets-inputs.ads')
-rw-r--r-- | src/fltk-widgets-inputs.ads | 97 |
1 files changed, 75 insertions, 22 deletions
diff --git a/src/fltk-widgets-inputs.ads b/src/fltk-widgets-inputs.ads index 76d6848..7fc436b 100644 --- a/src/fltk-widgets-inputs.ads +++ b/src/fltk-widgets-inputs.ads @@ -22,6 +22,8 @@ package FLTK.Widgets.Inputs is (Normal_Kind, Float_Kind, Integer_Kind, Multiline_Kind, Secret_Kind, Readonly_Kind, Wrap_Kind); + type Clipboard_Kind is (Selection_Buffer, Cut_Paste_Board); + @@ -38,34 +40,55 @@ package FLTK.Widgets.Inputs is procedure Copy - (This : in out Input); + (This : in out Input; + Destination : in Clipboard_Kind := Cut_Paste_Board); + + function Copy + (This : in out Input; + Destination : in Clipboard_Kind := Cut_Paste_Board) + return Boolean; procedure Cut (This : in out Input); + function Cut + (This : in out Input) + return Boolean; + procedure Cut (This : in out Input; Num_Bytes : in Integer); + function Cut + (This : in out Input; + Num_Bytes : in Integer) + return Boolean; + procedure Cut (This : in out Input; Start, Finish : in Integer); + function Cut + (This : in out Input; + Start, Finish : in Integer) + return Boolean; + procedure Copy_Cuts (This : in out Input); + function Copy_Cuts + (This : in out Input) + return Boolean; + procedure Undo (This : in out Input); + function Undo + (This : in out Input) + return Boolean; - function Has_Changed - (This : in Input) - return Boolean; - - procedure Clear_Changed - (This : in out Input); function Is_Readonly (This : in Input) @@ -114,6 +137,11 @@ package FLTK.Widgets.Inputs is (This : in out Input; To : in Natural); + function Set_Mark + (This : in out Input; + To : in Natural) + return Boolean; + function Get_Position (This : in Input) return Natural; @@ -122,6 +150,22 @@ package FLTK.Widgets.Inputs is (This : in out Input; To : in Natural); + function Set_Position + (This : in out Input; + To : in Natural) + return Boolean; + + procedure Set_Position_Mark + (This : in out Input; + Place : in Natural; + Mark : in Natural); + + function Set_Position_Mark + (This : in out Input; + Place : in Natural; + Mark : in Natural) + return Boolean; + @@ -134,11 +178,22 @@ package FLTK.Widgets.Inputs is (This : in out Input; Str : in String); + function Insert + (This : in out Input; + Str : in String) + return Boolean; + procedure Replace (This : in out Input; From, To : in Natural; New_Text : in String); + function Replace + (This : in out Input; + From, To : in Natural; + New_Text : in String) + return Boolean; + function Get_Value (This : in Input) return String; @@ -147,6 +202,11 @@ package FLTK.Widgets.Inputs is (This : in out Input; To : in String); + function Set_Value + (This : in out Input; + To : in String) + return Boolean; + @@ -204,16 +264,9 @@ package FLTK.Widgets.Inputs is (This : in out Input; W, H : in Integer); - - - - procedure Draw - (This : in out Input); - - function Handle - (This : in out Input; - Event : in Event_Kind) - return Event_Outcome; + procedure Resize + (This : in out Input; + X, Y, W, H : in Integer); @@ -230,9 +283,10 @@ package FLTK.Widgets.Inputs is private - type Input is new Widget with record - Was_Changed : Boolean := False; - end record; + type Input is new Widget with null record; + + overriding procedure Initialize + (This : in out Input); overriding procedure Finalize (This : in out Input); @@ -253,8 +307,6 @@ private pragma Inline (Copy_Cuts); pragma Inline (Undo); - pragma Inline (Has_Changed); - pragma Inline (Clear_Changed); pragma Inline (Is_Readonly); pragma Inline (Set_Readonly); pragma Inline (Is_Tab_Nav); @@ -314,3 +366,4 @@ private end FLTK.Widgets.Inputs; + |