From e3655d5d9f49e325bda4c9cf99d579bc89355a14 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Fri, 29 Nov 2024 18:45:33 +1300 Subject: Improved Ada API for Fl_Ask --- doc/fl_ask.html | 185 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 166 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/doc/fl_ask.html b/doc/fl_ask.html index 4a2578c..078c7c8 100644 --- a/doc/fl_ask.html +++ b/doc/fl_ask.html @@ -38,7 +38,17 @@   - Choice + Confirm_Result + + + +   + Choice_Result + + + +   + Extended_Choice_Result @@ -51,6 +61,104 @@ RGB_Int + +   + File_Chooser_Callback + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Attributes
+static void (*Fl::error)(const char *, ...) = ::error;
+
See FLTK.Errors
+static void (*Fl::fatal)(const char *, ...) = ::fatal;
+
See FLTK.Errors
+const char * fl_cancel = "Cancel";
+
+function Get_Cancel_String
+    return String;
+
+procedure Set_Cancel_String
+       (Value : in String);
+
+const char * fl_close = "Close";
+
+function Get_Close_String
+    return String;
+
+procedure Set_Close_String
+       (Value : in String);
+
+const char * fl_no = "No";
+
+function Get_No_String
+    return String;
+
+procedure Set_No_String
+       (Value : in String);
+
+const char * fl_ok = "OK";
+
+function Get_OK_String
+    return String;
+
+procedure Set_OK_String
+       (Value : in String);
+
+const char * fl_yes = "Yes";
+
+function Get_Yes_String
+    return String;
+
+procedure Set_Yes_String
+       (Value : in String);
+
+static void (*Fl::warning)(const char *, ...) = ::warning;
+
See FLTK.Errors
@@ -72,7 +180,7 @@ procedure Alert
 int fl_ask(const char *fmt,...);
 
-Present but disabled due to fl_ask being deprecated +Deprecated @@ -81,24 +189,54 @@ void fl_beep(int type);
 procedure Beep
-       (Kind : in Beep_Kind);
+       (Kind : in Beep_Kind := Default_Beep);
+
+ + + +
+int fl_choice(const char *fmt, const char *b0, const char *b1,
+    const char *b2, ...);
+
+
+function Choice
+       (Message, Button1 : in String)
+    return Choice_Result;
+
+function Choice
+       (Message, Button1, Button2 : in String)
+    return Choice_Result;
+
+function Choice
+       (Message, Button1, Button2, Button3 : in String)
+    return Choice_Result;
 
-int fl_choice(const char *fmt, const char *b0, const char *b1, const char *b2,...);
+int fl_choice_n(const char *fmt, const char *b0, const char *b1,
+    const char *b2, ...);
 
-function Three_Way_Choice
+function Extended_Choice
+       (Message, Button1 : in String)
+    return Extended_Choice_Result;
+
+function Extended_Choice
+       (Message, Button1, Button2 : in String)
+    return Extended_Choice_Result;
+
+function Extended_Choice
        (Message, Button1, Button2, Button3 : in String)
-    return Choice;
+    return Extended_Choice_Result;
 
-int fl_color_chooser(const char *name, double &r, double &g, double &b, int cmode);
+int fl_color_chooser(const char *name, double &r, double &g,
+    double &b, int cmode);
 
 function Color_Chooser
@@ -106,13 +244,14 @@ function Color_Chooser
         R, G, B : in out RGB_Float;
         Mode    : in     FLTK.Widgets.Groups.Color_Choosers.Color_Mode :=
             FLTK.Widgets.Groups.Color_Choosers.RGB)
-    return Boolean;
+    return Confirm_Result;
 
-int fl_color_chooser(const char *name, uchar &r, uchar &g, uchar &b, int cmode);
+int fl_color_chooser(const char *name, uchar &r, uchar &g,
+    uchar &b, int cmode);
 
 function Color_Chooser
@@ -120,13 +259,14 @@ function Color_Chooser
         R, G, B : in out RGB_Int;
         Mode    : in     FLTK.Widgets.Groups.Color_Choosers.Color_Mode :=
             FLTK.Widgets.Groups.Color_Choosers.RGB)
-    return Boolean;
+    return Confirm_Result;
 
-char * fl_dir_chooser(const char *message, const char *fname, int relative);
+char * fl_dir_chooser(const char *message, const char *fname,
+    int relative);
 
 function Dir_Chooser
@@ -138,7 +278,8 @@ function Dir_Chooser
 
   
 
-char * fl_file_chooser(const char *message, const char *pat, const char *fname, int relative);
+char * fl_file_chooser(const char *message, const char *pat,
+    const char *fname, int relative);
 
 function File_Chooser
@@ -152,19 +293,25 @@ function File_Chooser
 
 void fl_file_chooser_callback(void(*cb)(const char *));
 
-  +
+procedure Set_File_Chooser_Callback
+       (Func : in File_Chooser_Callback);
+
 void fl_file_chooser_ok_label(const char *l);
 
-  +
+procedure Set_File_Chooser_OK_String
+       (Value : in String);
+
-const char * fl_input(const char *fmt, const char *defstr,...);
+const char * fl_input(const char *fmt, const char *defstr, ...);
 
 function Text_Input
@@ -176,7 +323,7 @@ function Text_Input
 
   
 
-void fl_message(const char *fmt,...);
+void fl_message(const char *fmt, ...);
 
 procedure Message_Box
@@ -200,7 +347,7 @@ procedure Set_Message_Font
 void fl_message_hotspot(int enable);
 
-procedure Set_Hotspot
+procedure Set_Message_Hotspot
        (To : in Boolean);
 
@@ -210,7 +357,7 @@ procedure Set_Hotspot int fl_message_hotspot(void);
-function Get_Hotspot
+function Get_Message_Hotspot
     return Boolean;
 
@@ -247,7 +394,7 @@ procedure Set_Message_Title_Default
-const char * fl_password(const char *fmt, const char *defstr,...);
+const char * fl_password(const char *fmt, const char *defstr, ...);
 
 function Password
-- 
cgit