From 3f59b75f1bb14d0daa7d979617fd7318aaf89c7c Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 13 Mar 2018 17:38:01 +1100 Subject: Made all constructors non-inheritable --- src/fltk-widgets-buttons-light-check.adb | 42 +++++++++++++++++--------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'src/fltk-widgets-buttons-light-check.adb') diff --git a/src/fltk-widgets-buttons-light-check.adb b/src/fltk-widgets-buttons-light-check.adb index b367cd3..df54720 100644 --- a/src/fltk-widgets-buttons-light-check.adb +++ b/src/fltk-widgets-buttons-light-check.adb @@ -65,25 +65,29 @@ package body FLTK.Widgets.Buttons.Light.Check is - function Create - (X, Y, W, H : in Integer; - Text : in String) - return Check_Button is - begin - return This : Check_Button do - This.Void_Ptr := new_fl_check_button - (Interfaces.C.int (X), - Interfaces.C.int (Y), - Interfaces.C.int (W), - Interfaces.C.int (H), - Interfaces.C.To_C (Text)); - fl_widget_set_user_data - (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; + package body Forge is + + function Create + (X, Y, W, H : in Integer; + Text : in String) + return Check_Button is + begin + return This : Check_Button do + This.Void_Ptr := new_fl_check_button + (Interfaces.C.int (X), + Interfaces.C.int (Y), + Interfaces.C.int (W), + Interfaces.C.int (H), + Interfaces.C.To_C (Text)); + fl_widget_set_user_data + (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; + + end Forge; -- cgit