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-valuators-dials-fill.adb | 42 +++++++++++++++++-------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'src/fltk-widgets-valuators-dials-fill.adb') diff --git a/src/fltk-widgets-valuators-dials-fill.adb b/src/fltk-widgets-valuators-dials-fill.adb index 97a915b..ae44c51 100644 --- a/src/fltk-widgets-valuators-dials-fill.adb +++ b/src/fltk-widgets-valuators-dials-fill.adb @@ -65,25 +65,29 @@ package body FLTK.Widgets.Valuators.Dials.Fill is - function Create - (X, Y, W, H : in Integer; - Text : in String) - return Fill_Dial is - begin - return This : Fill_Dial do - This.Void_Ptr := new_fl_fill_dial - (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)); - fill_dial_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); - fill_dial_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 Fill_Dial is + begin + return This : Fill_Dial do + This.Void_Ptr := new_fl_fill_dial + (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)); + fill_dial_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); + fill_dial_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + end return; + end Create; + + end Forge; -- cgit