diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2024-11-25 16:17:52 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2024-11-25 16:17:52 +1300 |
commit | edbb0173d98b170ef75eda0149a132b9836e239d (patch) | |
tree | 359e2dcc600cf106c74baced1a961f827d50624e /src/fltk-asks.ads | |
parent | b2f485d9dfe25c2006fe2a1ace9a7ed1a9a9162f (diff) |
Package renames for avoiding name clashes and abbreviations
Diffstat (limited to 'src/fltk-asks.ads')
-rw-r--r-- | src/fltk-asks.ads | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/src/fltk-asks.ads b/src/fltk-asks.ads new file mode 100644 index 0000000..cfe0522 --- /dev/null +++ b/src/fltk-asks.ads @@ -0,0 +1,137 @@ + + +-- Programmed by Jedidiah Barber +-- Released into the public domain + + +with + + FLTK.Widgets.Boxes, + FLTK.Widgets.Groups.Color_Choosers; + + +package FLTK.Asks is + + + type Beep_Kind is + (Default_Beep, Message_Beep, Error_Beep, + Question_Beep, Password_Beep, Notification_Beep); + + type Choice is (First, Second, Third); + + type RGB_Float is new Long_Float range 0.0 .. 1.0; + + type RGB_Int is mod 256; + + + + + procedure Alert + (Message : String); + + -- function Ask + -- (Message : in String) + -- return Boolean; + + procedure Beep + (Kind : in Beep_Kind); + + function Three_Way_Choice + (Message, Button1, Button2, Button3 : in String) + return Choice; + + function Text_Input + (Message : in String; + Default : in String := "") + return String; + + procedure Message_Box + (Message : in String); + + function Password + (Message : in String; + Default : in String := "") + return String; + + + + + function Color_Chooser + (Title : in String; + R, G, B : in out RGB_Float; + Mode : in FLTK.Widgets.Groups.Color_Choosers.Color_Mode := + FLTK.Widgets.Groups.Color_Choosers.RGB) + return Boolean; + + function Color_Chooser + (Title : in String; + R, G, B : in out RGB_Int; + Mode : in FLTK.Widgets.Groups.Color_Choosers.Color_Mode := + FLTK.Widgets.Groups.Color_Choosers.RGB) + return Boolean; + + function Dir_Chooser + (Message, Default : in String; + Relative : in Boolean := False) + return String; + + function File_Chooser + (Message, Filter_Pattern, Default : in String; + Relative : in Boolean := False) + return String; + + + + + function Get_Hotspot + return Boolean; + + procedure Set_Hotspot + (To : in Boolean); + + procedure Set_Message_Font + (Font : in Font_Kind; + Size : in Font_Size); + + function Get_Message_Icon + return FLTK.Widgets.Boxes.Box_Reference; + + procedure Set_Message_Title + (To : in String); + + procedure Set_Message_Title_Default + (To : in String); + + +private + + + Icon_Box : aliased FLTK.Widgets.Boxes.Box; + + + + + pragma Inline (Alert); + -- pragma Inline (Ask); + pragma Inline (Beep); + pragma Inline (Three_Way_Choice); + pragma Inline (Text_Input); + pragma Inline (Message_Box); + pragma Inline (Password); + + + pragma Inline (Color_Chooser); + pragma Inline (Dir_Chooser); + pragma Inline (File_Chooser); + + + pragma Inline (Get_Hotspot); + pragma Inline (Set_Hotspot); + pragma Inline (Set_Message_Font); + pragma Inline (Get_Message_Icon); + pragma Inline (Set_Message_Title); + pragma Inline (Set_Message_Title_Default); + + +end FLTK.Asks; + |