diff options
Diffstat (limited to 'doc/fl_menu_.html')
-rw-r--r-- | doc/fl_menu_.html | 350 |
1 files changed, 289 insertions, 61 deletions
diff --git a/doc/fl_menu_.html b/doc/fl_menu_.html index 731c16e..e92d0ee 100644 --- a/doc/fl_menu_.html +++ b/doc/fl_menu_.html @@ -1,4 +1,3 @@ - <!DOCTYPE html> <html lang="en"> @@ -14,6 +13,9 @@ <h2>Fl_Menu_ Binding Map</h2> +<a href="index.html">Back to Index</a> + + <table class="package"> <tr><th colspan="2">Package name</th></tr> @@ -24,6 +26,11 @@ </table> +<p><b>Note:</b><br /><br /> +This Menu 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.</p> + <table class="type"> @@ -40,12 +47,12 @@ </tr> <tr> - <td> </td> + <td>int</td> <td>Index</td> </tr> <tr> - <td> </td> + <td>int</td> <td>Extended_Index</td> </tr> @@ -58,8 +65,62 @@ +<table class="type"> + <tr><th colspan="2">Errors</th></tr> + + <tr> +<td>NULL</td> +<td>No_Reference_Error</td> + </tr> + +</table> + + + <table class="function"> - <tr><th colspan="2">Functions and Procedures</th></tr> + <tr><th colspan="2">Protected Attributes</th></tr> + + <tr> +<td><pre> +uchar alloc; +</pre></td> +<td>Intentionally left unbound.</td> + </tr> + + <tr> +<td><pre> +uchar down_box_; +</pre></td> +<td>Intentionally left unbound.</td> + </tr> + + <tr> +<td><pre> +Fl_Color textcolor_; +</pre></td> +<td>Intentionally left unbound.</td> + </tr> + + <tr> +<td><pre> +Fl_Font textfont_; +</pre></td> +<td>Intentionally left unbound.</td> + </tr> + + <tr> +<td><pre> +Fl_Fontsize textsize_; +</pre></td> +<td>Intentionally left unbound.</td> + </tr> + +</table> + + + +<table class="function"> + <tr><th colspan="2">Constructors</th></tr> <tr> <td><pre> @@ -68,14 +129,50 @@ Fl_Menu_(int, int, int, int, const char *=0); <td><pre> function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") + return Menu; +</pre></td> + </tr> + + <tr> +<td>Rely on the automatic use of begin when a group is created, or use begin/end +explicitly, or add each widget to its intended parent group manually.</td> +<td><pre> +function Create + (Parent : in out FLTK.Widgets.Groups.Group'Class; + X, Y, W, H : in Integer; + Text : in String := "") return Menu; </pre></td> </tr> +</table> + + + +<table class="function"> + <tr><th colspan="2">Functions and Procedures</th></tr> + <tr> <td><pre> -int add(const char *, int shortcut, Fl_Callback *, void *=0, int=0); +int add(const char *); +</pre></td> +<td><pre> +procedure Add + (This : in out Menu; + Text : in String); + +function Add + (This : in out Menu; + Text : in String) + return Index; +</pre></td> + </tr> + + <tr> +<td><pre> +int add(const char *, int shortcut, Fl_Callback *, + void *=0, int=0); </pre></td> <td><pre> procedure Add @@ -84,21 +181,38 @@ procedure Add Action : in Widget_Callback := null; Shortcut : in Key_Combo := No_Key; Flags : in Menu_Flag := Flag_Normal); + +function 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) + return Index; </pre></td> </tr> <tr> <td><pre> -int add(const char *a, const char *b, Fl_Callback *c, void *d=0, int e=0); +int add(const char *a, const char *b, Fl_Callback *c, + void *d=0, int e=0); </pre></td> -<td> </td> - </tr> - - <tr> <td><pre> -int add(const char *); +procedure Add + (This : in out Menu; + Text : in String; + Action : in Widget_Callback := null; + Shortcut : in String; + Flags : in Menu_Flag := Flag_Normal); + +function Add + (This : in out Menu; + Text : in String; + Action : in Widget_Callback := null; + Shortcut : in String; + Flags : in Menu_Flag := Flag_Normal) + return Index; </pre></td> -<td> </td> </tr> <tr> @@ -115,14 +229,22 @@ procedure Clear <td><pre> int clear_submenu(int index); </pre></td> -<td> </td> +<td><pre> +procedure Clear_Submenu + (This : in out Menu; + Place : in Index); +</pre></td> </tr> <tr> <td><pre> void copy(const Fl_Menu_Item *m, void *user_data=0); </pre></td> -<td> </td> +<td><pre> +procedure Set_Items + (This : in out Menu; + Items : in FLTK.Menu_Items.Menu_Item_Array); +</pre></td> </tr> <tr> @@ -151,26 +273,18 @@ procedure Set_Down_Box <td><pre> Fl_Color down_color() const; </pre></td> -<td> </td> +<td>See selection_color / Get_Selection_Color from Fl_Widget.</td> </tr> <tr> <td><pre> void down_color(unsigned c); </pre></td> -<td> </td> +<td>See selection_color / Set_Selection_Color from Fl_Widget.</td> </tr> <tr> -<td> </td> -<td><pre> -procedure Draw - (This : in out Menu) is null; -</pre></td> - </tr> - - <tr> -<td>See draw method in Fl_Menu_Item</td> +<td>See draw method in Fl_Menu_Item.</td> <td><pre> procedure Draw_Item (This : in out Menu; @@ -241,27 +355,33 @@ function Find_Item </tr> <tr> +<td>See find_shortcut in Fl_Menu_Item.</td> <td><pre> -void global(); -</pre></td> -<td><pre> -procedure Make_Global - (This : in out Menu); +function Find_Shortcut + (This : in Menu; + Require_Alt : in Boolean := False) + return access FLTK.Menu_Items.Menu_Item'Class; + +function Find_Shortcut + (This : in Menu; + Place : out Extended_Index; + Require_Alt : in Boolean := False) + return access FLTK.Menu_Items.Menu_Item'Class; </pre></td> </tr> <tr> -<td> </td> <td><pre> -function Handle - (This : in out Menu; - Event : in Event_Kind) - return Event_Outcome; +void global(); +</pre></td> +<td><pre> +procedure Make_Global + (This : in out Menu); </pre></td> </tr> <tr> -<td> </td> +<td>Check index values against the size method manually.</td> <td><pre> function Has_Item (This : in Menu; @@ -281,7 +401,8 @@ function Has_Item <tr> <td><pre> -int insert(int index, const char *, int shortcut, Fl_Callback *, void *=0, int=0); +int insert(int index, const char *, int shortcut, + Fl_Callback *, void *=0, int=0); </pre></td> <td><pre> procedure Insert @@ -291,18 +412,45 @@ procedure Insert Action : in Widget_Callback := null; Shortcut : in Key_Combo := No_Key; Flags : in Menu_Flag := Flag_Normal); + +function 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) + return Index; </pre></td> </tr> <tr> <td><pre> -int insert(int index, const char *a, const char *b, Fl_Callback *c, void *d=0, int e=0); +int insert(int index, const char *a, const char *b, + Fl_Callback *c, void *d=0, int e=0); +</pre></td> +<td><pre> +procedure Insert + (This : in out Menu; + Place : in Index; + Text : in String; + Action : in Widget_Callback := null; + Shortcut : in String; + Flags : in Menu_Flag := Flag_Normal); + +function Insert + (This : in out Menu; + Place : in Index; + Text : in String; + Action : in Widget_Callback := null; + Shortcut : in String; + Flags : in Menu_Flag := Flag_Normal) + return Index; </pre></td> -<td> </td> </tr> <tr> -<td> </td> +<td>Use the menu method to access the menu item array and index it directly.</td> <td><pre> function Item (This : in Menu; @@ -323,9 +471,19 @@ function Item <tr> <td><pre> -int item_pathname(char *name, int namelen, const Fl_Menu_Item *finditem=0) const; +int item_pathname(char *name, int namelen, + const Fl_Menu_Item *finditem=0) const; +</pre></td> +<td><pre> +function Item_Pathname + (This : in Menu) + return String; + +function Item_Pathname + (This : in Menu; + Item : in FLTK.Menu_Items.Menu_Item) + return String; </pre></td> -<td> </td> </tr> <tr> @@ -338,7 +496,7 @@ function Iterate </tr> <tr> -<td>See measure method in Fl_Menu_Item</td> +<td>See measure method in Fl_Menu_Item.</td> <td><pre> procedure Measure_Item (This : in Menu; @@ -351,28 +509,42 @@ procedure Measure_Item <td><pre> const Fl_Menu_Item * menu() const; </pre></td> -<td>Use iterators instead</td> +<td>Use Item or Iterate as necessary to access specific items or walk the array.</td> </tr> <tr> <td><pre> void menu(const Fl_Menu_Item *m); </pre></td> -<td> </td> +<td><pre> +procedure Use_Same_Items + (This : in out Menu; + Donor : in Menu'Class); +</pre></td> </tr> <tr> <td><pre> -void mode(int i, int fl); +int mode(int i) const; +</pre></td> +<td><pre> +function Get_Flags + (This : in Menu + Place : in Index) + return Menu_Flag; </pre></td> -<td>See Set_Flags procedure in FLTK.Menu_Items</td> </tr> <tr> <td><pre> -int mode(int i) const; +void mode(int i, int fl); +</pre></td> +<td><pre> +procedure Set_Flags + (This : in out Menu; + Place : in Index; + Flags : in Menu_Flag); </pre></td> -<td>See Get_Flags function in FLTK.Menu_Items</td> </tr> <tr> @@ -390,29 +562,33 @@ function Chosen <td><pre> const Fl_Menu_Item * picked(const Fl_Menu_Item *); </pre></td> -<td> </td> +<td><pre> +procedure Picked + (This : in out Menu; + Item : in out FLTK.Menu_Items.Menu_Item); +</pre></td> </tr> <tr> -<td>See popup method in Fl_Menu_Item</td> +<td>See popup method in Fl_Menu_Item.</td> <td><pre> 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; + return Extended_Index; </pre></td> </tr> <tr> -<td>See pulldown method in Fl_Menu_Item</td> +<td>See pulldown method in Fl_Menu_Item.</td> <td><pre> function Pulldown (This : in Menu; X, Y, W, H : in Integer; Initial : in Extended_Index := No_Index) - return FLTK.Menu_Items.Menu_Item_Reference; + return Extended_Index; </pre></td> </tr> @@ -431,21 +607,35 @@ procedure Remove <td><pre> void replace(int, const char *); </pre></td> -<td>See Set_Label procedure in FLTK.Menu_Items</td> +<td><pre> +procedure Set_Label + (This : in out Menu; + Place : in Index; + Text : in String); +</pre></td> </tr> <tr> <td><pre> void setonly(Fl_Menu_Item *item); </pre></td> -<td>See Set_Only procedure in FLTK.Menu_Items</td> +<td><pre> +procedure Set_Only + (This : in out Menu; + Item : in out Menu_Item); +</pre></td> </tr> <tr> <td><pre> void shortcut(int i, int s); </pre></td> -<td>See Set_Shortcut procedure in FLTK.Menu_Items</td> +<td><pre> +procedure Set_Shortcut + (This : in out Menu; + Place : in Index; + Press : in Key_Combo); +</pre></td> </tr> <tr> @@ -463,14 +653,22 @@ function Number_Of_Items <td><pre> void size(int W, int H); </pre></td> -<td> </td> +<td><pre> +procedure Resize + (This : in out Menu; + W, H : in Integer); +</pre></td> </tr> <tr> <td><pre> const Fl_Menu_Item * test_shortcut(); </pre></td> -<td> </td> +<td><pre> +function Test_Shortcut + (This : in out Menu) + return access FLTK.Menu_Items.Menu_Item'Class; +</pre></td> </tr> <tr> @@ -488,7 +686,12 @@ function Chosen_Label <td><pre> const char * text(int i) const; </pre></td> -<td>See Get_Label function in FLTK.Menu_Items</td> +<td><pre> +function Get_Label + (This : in Menu; + Place : in Index) + return String; +</pre></td> </tr> <tr> @@ -576,6 +779,11 @@ int value(const Fl_Menu_Item *); procedure Set_Chosen (This : in out Menu; Item : in FLTK.Menu_Items.Menu_Item); + +function Set_Chosen + (This : in out Menu; + Item : in FLTK.Menu_Items.Menu_Item) + return Boolean; </pre></td> </tr> @@ -587,7 +795,27 @@ int value(int i); procedure Set_Chosen (This : in out Menu; Place : in Index); + +function Set_Chosen + (This : in out Menu; + Place : in Index) + return Boolean; +</pre></td> + </tr> + +</table> + + + +<table class="function"> + <tr><th colspan="2">Protection Functions and Procedures</th></tr> + + <tr> +<td><pre> +int item_pathname_(char *name, int namelen, + const Fl_Menu_Item *finditem, const Fl_Menu_Item *menu=0) const; </pre></td> +<td>Intentionally left unbound.</td> </tr> </table> |