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.adb49
1 files changed, 9 insertions, 40 deletions
diff --git a/src/fltk-widgets-buttons-light-check.adb b/src/fltk-widgets-buttons-light-check.adb
index d1596e0..e565461 100644
--- a/src/fltk-widgets-buttons-light-check.adb
+++ b/src/fltk-widgets-buttons-light-check.adb
@@ -16,19 +16,6 @@ package body FLTK.Widgets.Buttons.Light.Check is
-- Functions From C --
------------------------
- procedure check_button_set_draw_hook
- (W, D : in Storage.Integer_Address);
- pragma Import (C, check_button_set_draw_hook, "check_button_set_draw_hook");
- pragma Inline (check_button_set_draw_hook);
-
- procedure check_button_set_handle_hook
- (W, H : in Storage.Integer_Address);
- pragma Import (C, check_button_set_handle_hook, "check_button_set_handle_hook");
- pragma Inline (check_button_set_handle_hook);
-
-
-
-
function new_fl_check_button
(X, Y, W, H : in Interfaces.C.int;
Text : in Interfaces.C.char_array)
@@ -136,6 +123,14 @@ package body FLTK.Widgets.Buttons.Light.Check is
end Extra_Init;
+ procedure Initialize
+ (This : in out Check_Button) is
+ begin
+ This.Draw_Ptr := fl_check_button_draw'Address;
+ This.Handle_Ptr := fl_check_button_handle'Address;
+ end Initialize;
+
+
package body Forge is
function Create
@@ -151,38 +146,12 @@ package body FLTK.Widgets.Buttons.Light.Check is
Interfaces.C.int (H),
Interfaces.C.To_C (Text));
Extra_Init (This, X, Y, W, H, Text);
- check_button_set_draw_hook
- (This.Void_Ptr, Storage.To_Integer (Draw_Hook'Address));
- check_button_set_handle_hook
- (This.Void_Ptr, Storage.To_Integer (Handle_Hook'Address));
end return;
end Create;
end Forge;
-
-
- -----------------------
- -- API Subprograms --
- -----------------------
-
- procedure Draw
- (This : in out Check_Button) is
- begin
- fl_check_button_draw (This.Void_Ptr);
- end Draw;
-
-
- 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;
-
-
end FLTK.Widgets.Buttons.Light.Check;
+