From 3a9028302447ad84363c580b2152f30417186667 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Wed, 8 Jan 2025 14:33:30 +1300 Subject: Revised Input subhierarchy, separated bindings for Fl_Input and Fl_Input_ widgets --- doc/fl_file_input.html | 44 +++- doc/fl_float_input.html | 29 +-- doc/fl_input.html | 481 ++--------------------------------- doc/fl_input_.html | 590 +++++++++++++++++++++++++++++++++++++++++++ doc/fl_int_input.html | 29 +-- doc/fl_multiline_input.html | 22 +- doc/fl_multiline_output.html | 22 +- doc/fl_output.html | 22 +- doc/fl_secret_input.html | 17 +- doc/fl_widget.html | 11 +- doc/index.html | 19 +- 11 files changed, 690 insertions(+), 596 deletions(-) create mode 100644 doc/fl_input_.html (limited to 'doc') diff --git a/doc/fl_file_input.html b/doc/fl_file_input.html index 499d80d..b319f2e 100644 --- a/doc/fl_file_input.html +++ b/doc/fl_file_input.html @@ -21,7 +21,7 @@ Fl_File_Input - FLTK.Widgets.Inputs.File + FLTK.Widgets.Inputs.Text.File @@ -46,7 +46,7 @@ - + +
Functions and Procedures
Constructors
@@ -60,6 +60,13 @@ function Create
 
+ + + + + + - - - - - @@ -144,7 +142,7 @@ const char * value(); @@ -152,6 +150,24 @@ function Get_Value
Functions and Procedures
 Fl_Boxtype down_box() const;
@@ -84,16 +91,6 @@ procedure Set_Down_Box
 
   
-virtual void draw();
-
-procedure Draw
-       (This : in out File_Input);
-
 Fl_Color errorcolor() const;
 
@@ -129,11 +126,12 @@ function Handle
   
 int value(const char *str);
+
 int value(const char *str, int len);
 
 procedure Set_Value
-       (This : in out Input;
+       (This : in out File_Input;
         To   : in     String);
 
 function Get_Value
-       (This : in Input)
+       (This : in File_Input)
     return String;
 
+ + + + + + + + + +
Protected Functions and Procedures
+virtual void draw();
+
+procedure Draw
+       (This : in out File_Input);
+
+ + + diff --git a/doc/fl_float_input.html b/doc/fl_float_input.html index 7e706ae..b43f0b2 100644 --- a/doc/fl_float_input.html +++ b/doc/fl_float_input.html @@ -21,7 +21,7 @@ Fl_Float_Input - FLTK.Widgets.Inputs.Floating_Point + FLTK.Widgets.Inputs.Text.Floating_Point @@ -46,7 +46,7 @@ - + - - - - +
Functions and Procedures
Constructors
@@ -60,16 +60,15 @@ function Create
 
 
-procedure Draw
-       (This : in out Float_Input);
-
+ + + + + - + - - - - -
Functions and Procedures
 Use value() and manually convert from char * to float.
 function Get_Value
        (This : in Float_Input)
@@ -77,16 +76,6 @@ function Get_Value
 
 
-function Handle
-       (This  : in out Float_Input;
-        Event : in     Event_Kind)
-    return Event_Outcome;
-
diff --git a/doc/fl_input.html b/doc/fl_input.html index 09c6eb1..cd0e6ca 100644 --- a/doc/fl_input.html +++ b/doc/fl_input.html @@ -20,8 +20,8 @@ Package name - Fl_Input_
Fl_Input - FLTK.Widgets.Inputs + Fl_Input + FLTK.Widgets.Inputs.Text @@ -32,18 +32,13 @@ Types - Fl_Input_
Fl_Input - Input + Fl_Input + Text_Input   - Input_Reference - - - -   - Input_Kind + Text_Input_Reference @@ -51,121 +46,26 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
Functions and Procedures
Constructors
-Fl_Input_(int, int, int, int, const char*=0);
-Fl_Input(int, int, int, int, const char*=0);
+Fl_Input(int, int, int, int, const char *=0);
 
 function Create
        (X, Y, W, H : in Integer;
-        Text       : in String)
-    return Input;
-
 
-function Has_Changed
-       (This : in Input)
-    return Boolean;
-
 
-procedure Clear_Changed
-       (This : in out Input);
-
-int copy(int clipboard);
-
-procedure Copy
-       (This : in out Input);
-
-int copy_cuts();
-
-procedure Copy_Cuts
-       (This : in out Input);
-
-Fl_Color cursor_color() const;
-
-function Get_Cursor_Color
-       (This : in Input)
-    return Color;
-
-void cursor_color(Fl_Color n);
-
-procedure Set_Cursor_Color
-       (This : in out Input;
-        To   : in     Color);
+        Text       : in String := "")
+    return Text_Input;
 
-int cut();
-
-procedure Cut
-       (This : in out Input);
-
- -
-int cut(int n);
-
-
-procedure Cut
-       (This      : in out Input;
-        Num_Bytes : in     Integer);
-
- - -
-int cut(int a, int b);
-
-
-procedure Cut
-       (This          : in out Input;
-        Start, Finish : in     Integer);
-
- - -
-void draw();
-
-
-procedure Draw
-       (This : in out Input);
-
- + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
Functions and Procedures
@@ -173,369 +73,26 @@ int handle(int);
 
 function Handle
-       (This  : in out Input;
+       (This  : in out Text_Input;
         Event : in     Event_Kind)
     return Event_Outcome;
 
-Fl_Char index(int i) const;
-
-function Index
-       (This  : in Input;
-        Place : in Integer)
-    return Character;
-
-int input_type() const;
-
-function Get_Input_Type
-       (This : in Input)
-    return Input_Kind;
-
-void input_type(int t);
-
-procedure Set_Input_Type
-       (This : in out Input;
-        To   : in     Input_Kind);
-
-int insert(const char *t, int l=0);
-
-procedure Insert
-       (This : in out Input;
-        Str  : in     String);
-
-int mark() const;
-
-function Get_Mark
-       (This : in Input)
-    return Natural;
-
-int mark(int m);
-
-procedure Set_Mark
-       (This : in out Input;
-        To   : in     Natural);
-
-int maximum_size() const;
-
-function Get_Maximum_Size
-       (This : in Input)
-    return Natural;
-
-void maximum_size(int m);
-
-procedure Set_Maximum_Size
-       (This : in out Input;
-        To   : in     Natural);
-
-int position() const;
-
-function Get_Position
-       (This : in Input)
-    return Natural;
-
-int position(int p, int m);
-
 
-int position(int p);
-
-procedure Set_Position
-       (This : in out Input;
-        To   : in     Natural);
-
-int readonly() const;
-
-function Is_Readonly
-       (This : in Input)
-    return Boolean;
-
-void readonly(int b);
-
-procedure Set_Readonly
-       (This : in out Input;
-        To   : in     Boolean);
-
-int replace(int b, int e, const char *text, int ilen=0);
-
-procedure Replace
-       (This     : in out Input;
-        From, To : in     Natural;
-        New_Text : in     String);
-
-void resize(int, int, int, int);
-
 
-int shortcut() const;
-
-function Get_Shortcut_Key
-       (This : in Input)
-    return Shortcut_Key;
-
-void shortcut(int s);
-
-procedure Set_Shortcut_Key
-       (This : in out Input;
-        To   : in     Shortcut_Key);
-
-int size() const;
-
-function Size
-       (This : in Input)
-    return Natural;
-
-void size(int W, int H);
-
-procedure Resize
-       (This : in out Input;
-        W, H : in     Integer);
-
-int static_value(const char *);
-
 
-int static_value(const char *, int);
-
 
-void tab_nav(int val);
-
-procedure Set_Tab_Nav
-       (This : in out Input;
-        To   : in     Boolean);
-
-int tab_nav() const;
-
-function Is_Tab_Nav
-       (This : in Input)
-    return Boolean;
-
-Fl_Color textcolor() const;
-
-function Get_Text_Color
-       (This : in Input)
-    return Color;
-
-void textcolor(Fl_Color n);
-
-procedure Set_Text_Color
-       (This : in out Input;
-        To   : in     Color);
-
-Fl_Font textfont() const;
-
-function Get_Text_Font
-       (This : in Input)
-    return Font_Kind;
-
-void textfont(Fl_Font s);
-
-procedure Set_Text_Font
-       (This : in out Input;
-        To   : in     Font_Kind);
-
-Fl_Fontsize textsize() const;
-
-function Get_Text_Size
-       (This : in Input)
-    return Font_Size;
-
-void textsize(Fl_Fontsize s);
-
-procedure Set_Text_Size
-       (This : in out Input;
-        To   : in     Font_Size);
-
-int undo();
-
-procedure Undo
-       (This : in out Input);
-
- -
-int value(const char *);
-int value(const char *, int);
-
-
-procedure Set_Value
-       (This : in out Input;
-        To   : in     String);
-
- - -
-const char * value() const;
-
-
-function Get_Value
-       (This : in Input)
-    return String;
-
- - -
-int wrap() const;
-
-
-function Is_Wrap
-       (This : in Input)
-    return Boolean;
-
- + + diff --git a/doc/fl_input_.html b/doc/fl_input_.html new file mode 100644 index 0000000..582f0c6 --- /dev/null +++ b/doc/fl_input_.html @@ -0,0 +1,590 @@ + + + + + + Fl_Input_ Binding Map + + + + + + +

Fl_Input_ Binding Map

+ + +Back to Index + + +
Protected Functions and Procedures
-void wrap(int b);
+void draw();
 
-procedure Set_Wrap
-       (This : in out Input;
-        To   : in     Boolean);
+procedure Draw
+       (This : in out Text_Input);
 
+ + + + + + + +
Package name
Fl_Input_FLTK.Widgets.Inputs
+ +

Note:

+This Input type should really be abstract but cannot be for technical binding reasons. +If you try to use it directly you will get issues with the draw and handle methods. +Either extend it and override those subprograms or use types already extended from it.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Types
Fl_Input_Input
 Input_Reference
intInput_Kind
intClipboard_Kind
+ + + + + + + + + + + +
Constructors
+Fl_Input_(int, int, int, int, const char*=0);
+
+function Create
+       (X, Y, W, H : in Integer;
+        Text       : in String)
+    return Input;
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+int copy(int clipboard);
+
+procedure Copy
+       (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;
+
+int copy_cuts();
+
+procedure Copy_Cuts
+       (This : in out Input);
+
+function Copy_Cuts
+       (This : in out Input)
+    return Boolean;
+
+Fl_Color cursor_color() const;
+
+function Get_Cursor_Color
+       (This : in Input)
+    return Color;
+
+void cursor_color(Fl_Color n);
+
+procedure Set_Cursor_Color
+       (This : in out Input;
+        To   : in     Color);
+
+int cut();
+
+procedure Cut
+       (This : in out Input);
+
+function Cut
+       (This : in out Input)
+    return Boolean;
+
+int cut(int n);
+
+procedure Cut
+       (This      : in out Input;
+        Num_Bytes : in     Integer);
+
+function Cut
+       (This      : in out Input;
+        Num_Bytes : in     Integer)
+    return Boolean;
+
+int cut(int a, int b);
+
+procedure Cut
+       (This          : in out Input;
+        Start, Finish : in     Integer);
+
+function Cut
+       (This          : in out Input;
+        Start, Finish : in     Integer)
+    return Boolean;
+
+Fl_Char index(int i) const;
+
+function Index
+       (This  : in Input;
+        Place : in Integer)
+    return Character;
+
+int input_type() const;
+
+function Get_Input_Type
+       (This : in Input)
+    return Input_Kind;
+
+void input_type(int t);
+
+procedure Set_Input_Type
+       (This : in out Input;
+        To   : in     Input_Kind);
+
+int insert(const char *t, int l=0);
+
+procedure Insert
+       (This : in out Input;
+        Str  : in     String);
+
+function Insert
+       (This : in out Input;
+        Str  : in     String)
+    return Boolean;
+
+int mark() const;
+
+function Get_Mark
+       (This : in Input)
+    return Natural;
+
+int mark(int m);
+
+procedure Set_Mark
+       (This : in out Input;
+        To   : in     Natural);
+
+function Set_Mark
+       (This : in out Input;
+        To   : in     Natural)
+    return Boolean;
+
+int maximum_size() const;
+
+function Get_Maximum_Size
+       (This : in Input)
+    return Natural;
+
+void maximum_size(int m);
+
+procedure Set_Maximum_Size
+       (This : in out Input;
+        To   : in     Natural);
+
+int position() const;
+
+function Get_Position
+       (This : in Input)
+    return Natural;
+
+int position(int p, int m);
+
+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;
+
+int position(int p);
+
+procedure Set_Position
+       (This : in out Input;
+        To   : in     Natural);
+
+function Set_Position
+       (This : in out Input;
+        To   : in     Natural)
+    return Boolean;
+
+int readonly() const;
+
+function Is_Readonly
+       (This : in Input)
+    return Boolean;
+
+void readonly(int b);
+
+procedure Set_Readonly
+       (This : in out Input;
+        To   : in     Boolean);
+
+int replace(int b, int e, const char *text, int ilen=0);
+
+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;
+
+void resize(int, int, int, int);
+
+procedure Resize
+       (This       : in out Input;
+        X, Y, W, H : in     Integer);
+
+int shortcut() const;
+
+function Get_Shortcut_Key
+       (This : in Input)
+    return Shortcut_Key;
+
+void shortcut(int s);
+
+procedure Set_Shortcut_Key
+       (This : in out Input;
+        To   : in     Shortcut_Key);
+
+int size() const;
+
+function Size
+       (This : in Input)
+    return Natural;
+
+void size(int W, int H);
+
+procedure Resize
+       (This : in out Input;
+        W, H : in     Integer);
+
+int static_value(const char *);
+
+int static_value(const char *, int);
+
Due to the marshalling between String and char * there is no point +to binding these methods. Use value / Set_Value instead.
+void tab_nav(int val);
+
+procedure Set_Tab_Nav
+       (This : in out Input;
+        To   : in     Boolean);
+
+int tab_nav() const;
+
+function Is_Tab_Nav
+       (This : in Input)
+    return Boolean;
+
+Fl_Color textcolor() const;
+
+function Get_Text_Color
+       (This : in Input)
+    return Color;
+
+void textcolor(Fl_Color n);
+
+procedure Set_Text_Color
+       (This : in out Input;
+        To   : in     Color);
+
+Fl_Font textfont() const;
+
+function Get_Text_Font
+       (This : in Input)
+    return Font_Kind;
+
+void textfont(Fl_Font s);
+
+procedure Set_Text_Font
+       (This : in out Input;
+        To   : in     Font_Kind);
+
+Fl_Fontsize textsize() const;
+
+function Get_Text_Size
+       (This : in Input)
+    return Font_Size;
+
+void textsize(Fl_Fontsize s);
+
+procedure Set_Text_Size
+       (This : in out Input;
+        To   : in     Font_Size);
+
+int undo();
+
+procedure Undo
+       (This : in out Input);
+
+function Undo
+       (This : in out Input)
+    return Boolean;
+
+int value(const char *);
+
+int value(const char *, int);
+
+procedure Set_Value
+       (This : in out Input;
+        To   : in     String);
+
+function Set_Value
+       (This : in out Input;
+        To   : in     String)
+    return Boolean;
+
+const char * value() const;
+
+function Get_Value
+       (This : in Input)
+    return String;
+
+int wrap() const;
+
+function Is_Wrap
+       (This : in Input)
+    return Boolean;
+
+void wrap(int b);
+
+procedure Set_Wrap
+       (This : in out Input;
+        To   : in     Boolean);
+
+ + + + + diff --git a/doc/fl_int_input.html b/doc/fl_int_input.html index d340e77..fa9b9c9 100644 --- a/doc/fl_int_input.html +++ b/doc/fl_int_input.html @@ -21,7 +21,7 @@ Fl_Int_Input - FLTK.Widgets.Inputs.Whole_Number + FLTK.Widgets.Inputs.Text.Whole_Number @@ -46,7 +46,7 @@ - + - - - - +
Functions and Procedures
Constructors
@@ -60,16 +60,15 @@ function Create
 
 
-procedure Draw
-       (This : in out Integer_Input);
-
+ + + + + - + - - - - -
Functions and Procedures
 Use value() and manually convert from char * to int.
 function Get_Value
        (This : in Integer_Input)
@@ -77,16 +76,6 @@ function Get_Value
 
 
-function Handle
-       (This  : in out Integer_Input;
-        Event : in     Event_Kind)
-    return Event_Outcome;
-
diff --git a/doc/fl_multiline_input.html b/doc/fl_multiline_input.html index d4acb1b..25067e6 100644 --- a/doc/fl_multiline_input.html +++ b/doc/fl_multiline_input.html @@ -21,7 +21,7 @@ Fl_Multiline_Input - FLTK.Widgets.Inputs.Multiline + FLTK.Widgets.Inputs.Text.Multiline @@ -46,7 +46,7 @@ - + - - - - - - - - - -
Functions and Procedures
Constructors
@@ -60,24 +60,6 @@ function Create
 
 
-procedure Draw
-       (This : in out Multiline_Input);
-
 
-function Handle
-       (This  : in out Multiline_Input;
-        Event : in     Event_Kind)
-    return Event_Outcome;
-
diff --git a/doc/fl_multiline_output.html b/doc/fl_multiline_output.html index bce9814..e4fa771 100644 --- a/doc/fl_multiline_output.html +++ b/doc/fl_multiline_output.html @@ -21,7 +21,7 @@ Fl_Multiline_Output - FLTK.Widgets.Inputs.Outputs.Multiline + FLTK.Widgets.Inputs.Text.Outputs.Multiline @@ -46,7 +46,7 @@ - + - - - - - - - - - -
Functions and Procedures
Constructors
@@ -60,24 +60,6 @@ function Create
 
 
-procedure Draw
-       (This : in out Multiline_Output);
-
 
-function Handle
-       (This  : in out Multiline_Output;
-        Event : in     Event_Kind)
-    return Event_Outcome;
-
diff --git a/doc/fl_output.html b/doc/fl_output.html index c8de10c..2af1279 100644 --- a/doc/fl_output.html +++ b/doc/fl_output.html @@ -21,7 +21,7 @@ Fl_Output - FLTK.Widgets.Inputs.Outputs + FLTK.Widgets.Inputs.Text.Outputs @@ -46,7 +46,7 @@ - + - - - - - - - - - -
Functions and Procedures
Constructors
@@ -60,24 +60,6 @@ function Create
 
 
-procedure Draw
-       (This : in out Output);
-
 
-function Handle
-       (This  : in out Output;
-        Event : in     Event_Kind)
-    return Event_Outcome;
-
diff --git a/doc/fl_secret_input.html b/doc/fl_secret_input.html index 31d3f41..79e8eaf 100644 --- a/doc/fl_secret_input.html +++ b/doc/fl_secret_input.html @@ -21,7 +21,7 @@ Fl_Secret_Input - FLTK.Widgets.Inputs.Secret + FLTK.Widgets.Inputs.Text.Secret @@ -46,7 +46,7 @@ - + - - - - +
Functions and Procedures
Constructors
@@ -60,13 +60,12 @@ function Create
 
 
-procedure Draw
-       (This : in out Secret_Input);
-
+ + + + +
Functions and Procedures
diff --git a/doc/fl_widget.html b/doc/fl_widget.html
index ea362e6..a5e0e7c 100644
--- a/doc/fl_widget.html
+++ b/doc/fl_widget.html
@@ -56,7 +56,7 @@
 
 
 
-  
+  
 
+
Functions and Procedures
Constructors
@@ -70,6 +70,13 @@ function Create
 
+ + + + + + diff --git a/doc/index.html b/doc/index.html index bb02df6..d181682 100644 --- a/doc/index.html +++ b/doc/index.html @@ -65,7 +65,7 @@
  • Fl_Image
  • Fl_Image_Surface
  • Fl_Input
  • -
  • Fl_Input_
  • +
  • Fl_Input_
  • Fl_Input_Choice
  • Fl_Int_Input
  • Fl_JPEG_Image
  • @@ -220,14 +220,15 @@
  • FLTK.Widgets.Groups.Windows.Single
  • FLTK.Widgets.Groups.Windows.Single.Menu
  • FLTK.Widgets.Groups.Wizards
  • -
  • FLTK.Widgets.Inputs
  • -
  • FLTK.Widgets.Inputs.File
  • -
  • FLTK.Widgets.Inputs.Floating_Point
  • -
  • FLTK.Widgets.Inputs.Multiline
  • -
  • FLTK.Widgets.Inputs.Outputs
  • -
  • FLTK.Widgets.Inputs.Outputs.Multiline
  • -
  • FLTK.Widgets.Inputs.Secret
  • -
  • FLTK.Widgets.Inputs.Whole_Number
  • +
  • FLTK.Widgets.Inputs
  • +
  • FLTK.Widgets.Inputs.Text
  • +
  • FLTK.Widgets.Inputs.Text.File
  • +
  • FLTK.Widgets.Inputs.Text.Floating_Point
  • +
  • FLTK.Widgets.Inputs.Text.Multiline
  • +
  • FLTK.Widgets.Inputs.Text.Outputs
  • +
  • FLTK.Widgets.Inputs.Text.Outputs.Multiline
  • +
  • FLTK.Widgets.Inputs.Text.Secret
  • +
  • FLTK.Widgets.Inputs.Text.Whole_Number
  • FLTK.Widgets.Menus
  • FLTK.Widgets.Menus.Choices
  • FLTK.Widgets.Menus.Menu_Bars
  • -- cgit
    Functions and Procedures
     void _clear_fullscreen();
    @@ -487,7 +494,7 @@ virtual void draw()=0;
     
     procedure Draw
    -       (This : in out Widget) is null;
    +       (This : in out Widget);