summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-menus-menu_buttons.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fltk-widgets-menus-menu_buttons.adb')
-rw-r--r--src/fltk-widgets-menus-menu_buttons.adb58
1 files changed, 57 insertions, 1 deletions
diff --git a/src/fltk-widgets-menus-menu_buttons.adb b/src/fltk-widgets-menus-menu_buttons.adb
index 9a15d8b..95ebb8b 100644
--- a/src/fltk-widgets-menus-menu_buttons.adb
+++ b/src/fltk-widgets-menus-menu_buttons.adb
@@ -6,12 +6,16 @@
with
- Interfaces.C;
+ Interfaces.C.Strings;
package body FLTK.Widgets.Menus.Menu_Buttons is
+ ------------------------
+ -- Functions From C --
+ ------------------------
+
procedure menu_button_set_draw_hook
(W, D : in Storage.Integer_Address);
pragma Import (C, menu_button_set_draw_hook, "menu_button_set_draw_hook");
@@ -76,6 +80,26 @@ package body FLTK.Widgets.Menus.Menu_Buttons is
+ -------------------
+ -- Destructors --
+ -------------------
+
+ -- More magic
+ procedure menu_button_extra_final_hook
+ (Ada_Obj : in Storage.Integer_Address);
+ pragma Export (C, menu_button_extra_final_hook, "menu_button_extra_final_hook");
+
+ procedure menu_button_extra_final_hook
+ (Ada_Obj : in Storage.Integer_Address)
+ is
+ My_Menu_Button : Menu_Button;
+ for My_Menu_Button'Address use Storage.To_Address (Ada_Obj);
+ pragma Import (Ada, My_Menu_Button);
+ begin
+ Extra_Final (My_Menu_Button);
+ end menu_button_extra_final_hook;
+
+
procedure Extra_Final
(This : in out Menu_Button) is
begin
@@ -96,6 +120,34 @@ package body FLTK.Widgets.Menus.Menu_Buttons is
+ --------------------
+ -- Constructors --
+ --------------------
+
+ -- Long distance telephone call receival
+ procedure menu_button_extra_init_hook
+ (Ada_Obj : in Storage.Integer_Address;
+ X, Y, W, H : in Interfaces.C.int;
+ C_Str : in Interfaces.C.Strings.chars_ptr);
+ pragma Export (C, menu_button_extra_init_hook, "menu_button_extra_init_hook");
+
+ procedure menu_button_extra_init_hook
+ (Ada_Obj : in Storage.Integer_Address;
+ X, Y, W, H : in Interfaces.C.int;
+ C_Str : in Interfaces.C.Strings.chars_ptr)
+ is
+ My_Menu_Button : Menu_Button;
+ for My_Menu_Button'Address use Storage.To_Address (Ada_Obj);
+ pragma Import (Ada, My_Menu_Button);
+ begin
+ Extra_Init
+ (My_Menu_Button,
+ Integer (X), Integer (Y),
+ Integer (W), Integer (H),
+ Interfaces.C.Strings.Value (C_Str));
+ end menu_button_extra_init_hook;
+
+
procedure Extra_Init
(This : in out Menu_Button;
X, Y, W, H : in Integer;
@@ -132,6 +184,10 @@ package body FLTK.Widgets.Menus.Menu_Buttons is
+ -----------------------
+ -- API Subprograms --
+ -----------------------
+
procedure Set_Popup_Kind
(This : in out Menu_Button;
Pop : in Popup_Buttons) is