From 1cd018b440f80601f60908c2e5675413f5c77e25 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 15 May 2018 14:52:00 +1000 Subject: Finished and polished FLTK.Widgets.Menus, fixed some off-by-one errors in Groups --- doc/fl_group.html | 5 + doc/fl_menu_.html | 590 ++++++++++++++++++++++++++++++++++++++++++++++++++ doc/fl_menu_item.html | 38 +++- 3 files changed, 623 insertions(+), 10 deletions(-) create mode 100644 doc/fl_menu_.html (limited to 'doc') diff --git a/doc/fl_group.html b/doc/fl_group.html index 4ebea54..123e05b 100644 --- a/doc/fl_group.html +++ b/doc/fl_group.html @@ -44,6 +44,11 @@ Index + +   + Extended_Index + +   Cursor diff --git a/doc/fl_menu_.html b/doc/fl_menu_.html new file mode 100644 index 0000000..2c3ae6c --- /dev/null +++ b/doc/fl_menu_.html @@ -0,0 +1,590 @@ + + + + + + + Fl_Menu_ Binding Map + + + + + + +

Fl_Menu_ Binding Map

+ + + + + + + + + + +
Package name
Fl_Menu_FLTK.Widgets.Menus
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Types
Fl_Menu_Menu
 Menu_Reference
 Index
 Extended_Index
 Cursor
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Functions and Procedures
+Fl_Menu_(int, int, int, int, const char *=0);
+
+function Create
+       (X, Y, W, H : in Integer;
+        Text       : in String)
+    return Menu;
+
+int add(const char *, int shortcut, Fl_Callback *, void *=0, int=0);
+
+procedure Add
+       (This     : in out Menu;
+        Text     : in     String;
+        Action   : in     Widget_Callback := null;
+        Shortcut : in     Key_Combo := No_Key;
+        Flags    : in     Menu_Flag := Flag_Normal);
+
+int add(const char *a, const char *b, Fl_Callback *c, void *d=0, int e=0);
+
 
+int add(const char *);
+
 
+void clear();
+
+procedure Clear
+       (This : in out Menu);
+
+int clear_submenu(int index);
+
 
+void copy(const Fl_Menu_Item *m, void *user_data=0);
+
 
+Fl_Boxtype down_box() const;
+
+function Get_Down_Box
+       (This : in Menu)
+    return Box_Kind;
+
+void down_box(Fl_Boxtyep b);
+
+procedure Set_Down_Box
+       (This : in out Menu;
+        To   : in     Box_Kind);
+
+Fl_Color down_color() const;
+
 
+void down_color(unsigned c);
+
 
 
+procedure Draw
+       (This : in out Menu) is null;
+
See draw method in Fl_Menu_Item
+procedure Draw_Item
+       (This       : in out Menu;
+        Item       : in     Index;
+        X, Y, W, H : in     Integer;
+        Selected   : in     Boolean := False);
+
+int find_index(const char *name) const;
+
+function Find_Index
+       (This : in Menu;
+        Name : in String)
+    return Extended_Index;
+
+int find_index(const Fl_Menu_Item *item) const;
+
+function Find_Index
+       (This : in Menu;
+        Item : in FLTK.Menu_Items.Menu_Item)
+    return Extended_Index;
+
+int find_index(Fl_Callback *cb) const;
+
+function Find_Index
+       (This   : in Menu;
+        Action : in Widget_Callback)
+    return Extended_Index;
+
+const Fl_Menu_Item * find_item(const char *name);
+
+function Find_Item
+       (This : in Menu;
+        Name : in String)
+    return FLTK.Menu_Items.Menu_Item_Reference;
+
+const Fl_Menu_Item * find_item(Fl_Callback *);
+
+function Find_Item
+       (This   : in Menu;
+        Action : in Widget_Callback)
+    return FLTK.Menu_Items.Menu_Item_Reference;
+
+void global();
+
+procedure Make_Global
+       (This : in out Menu);
+
 
+function Handle
+       (This  : in out Menu;
+        Event : in     Event_Kind)
+    return Event_Outcome;
+
 
+function Has_Item
+       (This  : in Menu;
+        Place : in Index)
+    return Boolean;
+
 
+function Has_Item
+       (Place : in Cursor)
+    return Boolean;
+
+int insert(int index, const char *, int shortcut, Fl_Callback *, void *=0, int=0);
+
+procedure Insert
+       (This     : in out Menu;
+        Place    : in     Index;
+        Text     : in     String;
+        Action   : in     Widget_Callback := null;
+        Shortcut : in     Key_Combo := No_Key;
+        Flags    : in     Menu_Flag := Flag_Normal);
+
+int insert(int index, const char *a, const char *b, Fl_Callback *c, void *d=0, int e=0);
+
 
 
+function Item
+       (This  : in Menu;
+        Place : in Index)
+    return FLTK.Menu_Items.Menu_Item_Reference;
+
 
+function Item
+       (This  : in Menu;
+        Place : in Cursor)
+    return FLTK.Menu_Items.Menu_Item_Reference;
+
+int item_pathname(char *name, int namelen, const Fl_Menu_Item *finditem=0) const;
+
 
 
+function Iterate
+       (This : in Menu)
+    return Menu_Iterators.Reversible_Iterator'Class;
+
See measure method in Fl_Menu_Item
+procedure Measure_Item
+       (This : in     Menu;
+        Item : in     Index;
+        W, H :    out Integer);
+
+const Fl_Menu_Item * menu() const;
+
Use iterators instead
+void menu(const Fl_Menu_Item *m);
+
 
+void mode(int i, int fl);
+
See Set_Flags procedure in FLTK.Menu_Items
+int mode(int i) const;
+
See Get_Flags function in FLTK.Menu_Items
+const Fl_Menu_Item * mvalue() const;
+
+function Chosen
+       (This : in Menu)
+    return FLTK.Menu_Items.Menu_Item_Reference;
+
+const Fl_Menu_Item * picked(const Fl_Menu_Item *);
+
 
See popup method in Fl_Menu_Item
+function Popup
+       (This    : in Menu;
+        X, Y    : in Integer;
+        Title   : in String := "";
+        Initial : in Extended_Index := No_Index)
+    return FLTK.Menu_Items.Menu_Item_Reference;
+
See pulldown method in Fl_Menu_Item
+function Pulldown
+       (This       : in Menu;
+        X, Y, W, H : in Integer;
+        Initial    : in Extended_Index := No_Index)
+    return FLTK.Menu_Items.Menu_Item_Reference;
+
+void remove(int);
+
+procedure Remove
+       (This  : in out Menu;
+        Place : in     Index);
+
+void replace(int, const char *);
+
See Set_Label procedure in FLTK.Menu_Items
+void setonly(Fl_Menu_Item *item);
+
See Set_Only procedure in FLTK.Menu_Items
+void shortcut(int i, int s);
+
See Set_Shortcut procedure in FLTK.Menu_Items
+int size() const;
+
+function Number_Of_Items
+       (This : in Menu)
+    return Natural;
+
+void size(int W, int H);
+
 
+const Fl_Menu_Item * test_shortcut();
+
 
+const char * text() const;
+
+function Chosen_Label
+       (This : in Menu)
+    return String;
+
+const char * text(int i) const;
+
See Get_Label function in FLTK.Menu_Items
+Fl_Color textcolor() const;
+
+function Get_Text_Color
+       (This : in Menu)
+    return Color;
+
+void textcolor(Fl_Color c);
+
+procedure Set_Text_Color
+       (This : in out Menu;
+        To   : in     Color);
+
+Fl_Font textfont() const;
+
+function Get_Text_Font
+       (This : in Menu)
+    return Font_Kind;
+
+void textfont(Fl_Font c);
+
+procedure Set_Text_Font
+       (This : in out Menu;
+        To   : in     Font_Kind);
+
+Fl_Fontsize textsize() const;
+
+function Get_Text_Size
+       (This : in Menu)
+    return Font_Size;
+
+void textsize(Fl_Fontsize c);
+
+procedure Set_Text_Size
+       (This : in out Menu;
+        To   : in     Font_Size);
+
+int value() const;
+
+function Chosen_Index
+       (This : in Menu)
+    return Extended_Index;
+
+int value(const Fl_Menu_Item *);
+
 
+int value(int i);
+
 
+ + + + + diff --git a/doc/fl_menu_item.html b/doc/fl_menu_item.html index d259fb5..cca7528 100644 --- a/doc/fl_menu_item.html +++ b/doc/fl_menu_item.html @@ -94,14 +94,14 @@ function Is_Active_And_Visible
 int add(const char *, int shortcut, Fl_Callback *, void *=0, int=0);
 
-See Fl_Menu +See Add procedure in FLTK.Widgets.Menus
 int add(const char *a, const char *b, Fl_Callback *c, void *d=0, int e=0);
 
-See Fl_Menu +  @@ -206,7 +206,7 @@ procedure Do_Callback
 void draw(int x, int y, int w, int h, const Fl_Menu_ *, int t=0) const;
 
-See Fl_Menu +See Draw_Item procedure in FLTK.Widgets.Menus @@ -221,7 +221,25 @@ const Fl_Menu_Item * find_shortcut(int *ip=0, const bool require_alt=false) cons const Fl_Menu_Item * first() const; Fl_Menu_Item * first(); -See Fl_Menu +Use FLTK.Widgets.Menus iterators instead + + + +See Fl_Menu_ int mode(int i) const; +
+function Get_Flags
+       (Item : in Menu_Item)
+    return Menu_Flag;
+
+ + + +See Fl_Menu_ void mode(int i, int fl); +
+procedure Set_Flags
+       (Item : in out Menu_Item;
+        To   : in     Menu_Flag);
+
@@ -246,7 +264,7 @@ void image(Fl_Image &a);
 int insert(int, const char *, int, Fl_Callback *, void *=0, int=0);
 
-See Fl_Menu +See Insert procedure in FLTK.Widgets.Menus @@ -370,7 +388,7 @@ procedure Set_Label_Type
 int measure(int *h, const Fl_Menu_ *) const;
 
-See Fl_Menu +See Measure_Item procedure in FLTK.Widgets.Menus @@ -378,7 +396,7 @@ int measure(int *h, const Fl_Menu_ *) const; const Fl_Menu_Item * next(int=1) const; Fl_Menu_Item * next(int i=1); -See Fl_Menu +Use FLTK.Widgets.Menus iterators instead @@ -387,7 +405,7 @@ const Fl_Menu_Item * popup (int X, int Y, const char *title=0, const Fl_Menu_Item *picked=0, const Fl_Menu_*=0) const; -See Fl_Menu +See Popup function in FLTK.Widgets.Menus @@ -397,7 +415,7 @@ const Fl_Menu_Item * pulldown const Fl_Menu_Item *picked=0, const Fl_Menu_*=0, const Fl_Menu_Item *title=0, int menubar=0) const; -See Fl_Menu +See Pulldown function in FLTK.Widgets.Menus @@ -464,7 +482,7 @@ procedure Show
 int size() const;
 
-See Fl_Menu +See Number_Of_Items function in FLTK.Widgets.Menus -- cgit