summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-buttons-light-check.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fltk-widgets-buttons-light-check.adb')
-rw-r--r--src/fltk-widgets-buttons-light-check.adb23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/fltk-widgets-buttons-light-check.adb b/src/fltk-widgets-buttons-light-check.adb
index 4a1bcdb..8db7533 100644
--- a/src/fltk-widgets-buttons-light-check.adb
+++ b/src/fltk-widgets-buttons-light-check.adb
@@ -12,10 +12,20 @@ package body FLTK.Widgets.Buttons.Light.Check is
(W, D : in System.Address);
pragma Import (C, check_button_set_draw_hook, "check_button_set_draw_hook");
+ procedure check_button_set_handle_hook
+ (W, H : in System.Address);
+ pragma Import (C, check_button_set_handle_hook, "check_button_set_handle_hook");
+
procedure fl_check_button_draw
(W : in System.Address);
pragma Import (C, fl_check_button_draw, "fl_check_button_draw");
+ function fl_check_button_handle
+ (W : in System.Address;
+ E : in Interfaces.C.int)
+ return Interfaces.C.int;
+ pragma Import (C, fl_check_button_handle, "fl_check_button_handle");
+
function new_fl_check_button
(X, Y, W, H : in Interfaces.C.int;
Text : in Interfaces.C.char_array)
@@ -56,6 +66,18 @@ package body FLTK.Widgets.Buttons.Light.Check is
+ function Handle
+ (This : in out Check_Button;
+ Event : in Event_Kind)
+ return Event_Outcome is
+ begin
+ return Event_Outcome'Val
+ (fl_check_button_handle (This.Void_Ptr, Event_Kind'Pos (Event)));
+ end Handle;
+
+
+
+
procedure Finalize
(This : in out Check_Button) is
begin
@@ -87,6 +109,7 @@ package body FLTK.Widgets.Buttons.Light.Check is
(This.Void_Ptr,
Widget_Convert.To_Address (This'Unchecked_Access));
check_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address);
+ check_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address);
end return;
end Create;