diff options
-rw-r--r-- | doc/fl_input_choice.html | 28 | ||||
-rw-r--r-- | progress.txt | 1 | ||||
-rw-r--r-- | src/fltk-widgets-groups-input_choices.adb | 26 | ||||
-rw-r--r-- | src/fltk-widgets-groups-input_choices.ads | 20 |
4 files changed, 72 insertions, 3 deletions
diff --git a/doc/fl_input_choice.html b/doc/fl_input_choice.html index 9afac9e..5c49a61 100644 --- a/doc/fl_input_choice.html +++ b/doc/fl_input_choice.html @@ -157,17 +157,41 @@ procedure Set_Down_Box </tr> <tr> +<td>Check index values against the size method of menubutton manually.</td> +<td><pre> +function Has_Item + (This : in Input_Choice; + Place : in FLTK.Widgets.Menus.Index) + return Boolean; +</pre></td> + </tr> + + <tr> +<td>Use the menu method to access the menu item array and index it directly.</td> +<td><pre> +function Item + (This : in Input_Choice; + Place : in FLTK.Widgets.Menus.Index) + return FLTK.Menu_Items.Menu_Item_Reference; +</pre></td> + </tr> + + <tr> <td><pre> const Fl_Menu_Item * menu(); </pre></td> -<td> </td> +<td>Use Item or Button_Menu.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 Input_Choice; + Donor : in FLTK.Widgets.Menus.Menu'Class); +</pre></td> </tr> <tr> diff --git a/progress.txt b/progress.txt index 26c861c..84a688d 100644 --- a/progress.txt +++ b/progress.txt @@ -219,7 +219,6 @@ FLTK.Text_Buffers Widgets with incomplete APIs: Widgets -Widgets.Groups.Input_Choices (menu) Widgets.Groups.Scrolls (attributes, resize, type, protected) Widgets.Groups.Text_Displays Widgets.Groups.Text_Displays.Text_Editors diff --git a/src/fltk-widgets-groups-input_choices.adb b/src/fltk-widgets-groups-input_choices.adb index 118b9ea..3c4f1c8 100644 --- a/src/fltk-widgets-groups-input_choices.adb +++ b/src/fltk-widgets-groups-input_choices.adb @@ -314,6 +314,32 @@ package body FLTK.Widgets.Groups.Input_Choices is -- API Subprograms -- ----------------------- + function Has_Item + (This : in Input_Choice; + Place : in FLTK.Widgets.Menus.Index) + return Boolean is + begin + return This.My_Menu_Button.Has_Item (Place); + end Has_Item; + + + function Item + (This : in Input_Choice; + Place : in FLTK.Widgets.Menus.Index) + return FLTK.Menu_Items.Menu_Item_Reference is + begin + return This.My_Menu_Button.Item (Place); + end Item; + + + procedure Use_Same_Items + (This : in out Input_Choice; + Donor : in FLTK.Widgets.Menus.Menu'Class) is + begin + This.My_Menu_Button.Use_Same_Items (Donor); + end Use_Same_Items; + + procedure Clear (This : in out Input_Choice) is begin diff --git a/src/fltk-widgets-groups-input_choices.ads b/src/fltk-widgets-groups-input_choices.ads index f97f69a..dca7ac4 100644 --- a/src/fltk-widgets-groups-input_choices.ads +++ b/src/fltk-widgets-groups-input_choices.ads @@ -6,6 +6,7 @@ with + FLTK.Menu_Items, FLTK.Widgets.Inputs.Text, FLTK.Widgets.Menus.Menu_Buttons; @@ -44,6 +45,20 @@ package FLTK.Widgets.Groups.Input_Choices is + function Has_Item + (This : in Input_Choice; + Place : in FLTK.Widgets.Menus.Index) + return Boolean; + + function Item + (This : in Input_Choice; + Place : in FLTK.Widgets.Menus.Index) + return FLTK.Menu_Items.Menu_Item_Reference; + + procedure Use_Same_Items + (This : in out Input_Choice; + Donor : in FLTK.Widgets.Menus.Menu'Class); + procedure Clear (This : in out Input_Choice); @@ -139,6 +154,11 @@ private pragma Inline (Text_Field); pragma Inline (Button_Menu); + pragma Inline (Has_Item); + pragma Inline (Item); + pragma Inline (Use_Same_Items); + pragma Inline (Clear); + pragma Inline (Has_Changed); pragma Inline (Clear_Changed); pragma Inline (Get_Down_Box); |