summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-buttons.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fltk-widgets-buttons.adb')
-rw-r--r--src/fltk-widgets-buttons.adb58
1 files changed, 57 insertions, 1 deletions
diff --git a/src/fltk-widgets-buttons.adb b/src/fltk-widgets-buttons.adb
index 64f351a..e0b5120 100644
--- a/src/fltk-widgets-buttons.adb
+++ b/src/fltk-widgets-buttons.adb
@@ -6,12 +6,16 @@
with
- Interfaces.C;
+ Interfaces.C.Strings;
package body FLTK.Widgets.Buttons is
+ ------------------------
+ -- Functions From C --
+ ------------------------
+
procedure button_set_draw_hook
(W, D : in Storage.Integer_Address);
pragma Import (C, button_set_draw_hook, "button_set_draw_hook");
@@ -102,6 +106,26 @@ package body FLTK.Widgets.Buttons is
+ -------------------
+ -- Destructors --
+ -------------------
+
+ -- Clipper route successfully navigated
+ procedure button_extra_final_hook
+ (Ada_Obj : in Storage.Integer_Address);
+ pragma Export (C, button_extra_final_hook, "button_extra_final_hook");
+
+ procedure button_extra_final_hook
+ (Ada_Obj : in Storage.Integer_Address)
+ is
+ My_Button : Button;
+ for My_Button'Address use Storage.To_Address (Ada_Obj);
+ pragma Import (Ada, My_Button);
+ begin
+ Extra_Final (My_Button);
+ end button_extra_final_hook;
+
+
procedure Extra_Final
(This : in out Button) is
begin
@@ -122,6 +146,34 @@ package body FLTK.Widgets.Buttons is
+ --------------------
+ -- Constructors --
+ --------------------
+
+ -- Mobius strip traversal complete
+ procedure 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, button_extra_init_hook, "button_extra_init_hook");
+
+ procedure 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_Button : Button;
+ for My_Button'Address use Storage.To_Address (Ada_Obj);
+ pragma Import (Ada, My_Button);
+ begin
+ Extra_Init
+ (My_Button,
+ Integer (X), Integer (Y),
+ Integer (W), Integer (H),
+ Interfaces.C.Strings.Value (C_Str));
+ end button_extra_init_hook;
+
+
procedure Extra_Init
(This : in out Button;
X, Y, W, H : in Integer;
@@ -156,6 +208,10 @@ package body FLTK.Widgets.Buttons is
+ -----------------------
+ -- API Subprograms --
+ -----------------------
+
function Get_State
(This : in Button)
return State is