summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-buttons-light-round.adb
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-05-13 18:37:11 +1000
committerJed Barber <jjbarber@y7mail.com>2017-05-13 18:37:11 +1000
commit3c1e9610ac0e503787678cea31d79e3126813a2c (patch)
treecb324baa985aebbfc99ebb884cbd4b4131d1f933 /src/fltk-widgets-buttons-light-round.adb
parente35f258838e3a5e5d3458e9d9210deaaace08e9d (diff)
Radio_Round_Button, Round_Button, Radio_Button, Repeat_Button, Toggle_Button widgets all now have Handle methods
Diffstat (limited to 'src/fltk-widgets-buttons-light-round.adb')
-rw-r--r--src/fltk-widgets-buttons-light-round.adb23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/fltk-widgets-buttons-light-round.adb b/src/fltk-widgets-buttons-light-round.adb
index 6e66b2c..c13bb43 100644
--- a/src/fltk-widgets-buttons-light-round.adb
+++ b/src/fltk-widgets-buttons-light-round.adb
@@ -12,10 +12,20 @@ package body FLTK.Widgets.Buttons.Light.Round is
(W, D : in System.Address);
pragma Import (C, round_button_set_draw_hook, "round_button_set_draw_hook");
+ procedure round_button_set_handle_hook
+ (W, H : in System.Address);
+ pragma Import (C, round_button_set_handle_hook, "round_button_set_handle_hook");
+
procedure fl_round_button_draw
(W : in System.Address);
pragma Import (C, fl_round_button_draw, "fl_round_button_draw");
+ function fl_round_button_handle
+ (W : in System.Address;
+ E : in Interfaces.C.int)
+ return Interfaces.C.int;
+ pragma Import (C, fl_round_button_handle, "fl_round_button_handle");
+
function new_fl_round_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.Round is
+ function Handle
+ (This : in out Round_Button;
+ Event : in Event_Kind)
+ return Event_Outcome is
+ begin
+ return Event_Outcome'Val
+ (fl_round_button_handle (This.Void_Ptr, Event_Kind'Pos (Event)));
+ end Handle;
+
+
+
+
procedure Finalize
(This : in out Round_Button) is
begin
@@ -87,6 +109,7 @@ package body FLTK.Widgets.Buttons.Light.Round is
(This.Void_Ptr,
Widget_Convert.To_Address (This'Unchecked_Access));
round_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address);
+ round_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address);
end return;
end Create;