diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2021-11-08 10:59:25 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2021-11-08 10:59:25 +1300 |
commit | 13d20cec64ca792780f7240ed9985fe99a92d40a (patch) | |
tree | c29082047832ec29befb637883c4831eb9382f58 /src | |
parent | 41610565180a0d474039122eec8da61d3943b5b8 (diff) |
Fixed widget constructor label copy bug
Diffstat (limited to 'src')
126 files changed, 215 insertions, 142 deletions
diff --git a/src/fltk-widgets-boxes.adb b/src/fltk-widgets-boxes.adb index b6f7fc6..a5c3087 100644 --- a/src/fltk-widgets-boxes.adb +++ b/src/fltk-widgets-boxes.adb @@ -77,7 +77,7 @@ package body FLTK.Widgets.Boxes is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Box is begin return This : Box do @@ -92,6 +92,7 @@ package body FLTK.Widgets.Boxes is Widget_Convert.To_Address (This'Unchecked_Access)); box_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); box_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-boxes.ads b/src/fltk-widgets-boxes.ads index db64e0c..9005e41 100644 --- a/src/fltk-widgets-boxes.ads +++ b/src/fltk-widgets-boxes.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Boxes is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Box; end Forge; diff --git a/src/fltk-widgets-buttons-enter.adb b/src/fltk-widgets-buttons-enter.adb index 2edd991..1753811 100644 --- a/src/fltk-widgets-buttons-enter.adb +++ b/src/fltk-widgets-buttons-enter.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Buttons.Enter is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Enter_Button is begin return This : Enter_Button do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Buttons.Enter is Widget_Convert.To_Address (This'Unchecked_Access)); return_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); return_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-buttons-enter.ads b/src/fltk-widgets-buttons-enter.ads index 8492cca..11251dd 100644 --- a/src/fltk-widgets-buttons-enter.ads +++ b/src/fltk-widgets-buttons-enter.ads @@ -18,7 +18,7 @@ package FLTK.Widgets.Buttons.Enter is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Enter_Button; end Forge; diff --git a/src/fltk-widgets-buttons-light-check.adb b/src/fltk-widgets-buttons-light-check.adb index 415a91b..027f9f7 100644 --- a/src/fltk-widgets-buttons-light-check.adb +++ b/src/fltk-widgets-buttons-light-check.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Buttons.Light.Check is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Check_Button is begin return This : Check_Button do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Buttons.Light.Check is 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); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-buttons-light-check.ads b/src/fltk-widgets-buttons-light-check.ads index 87ef863..abf5d9f 100644 --- a/src/fltk-widgets-buttons-light-check.ads +++ b/src/fltk-widgets-buttons-light-check.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Buttons.Light.Check is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Check_Button; end Forge; diff --git a/src/fltk-widgets-buttons-light-radio.adb b/src/fltk-widgets-buttons-light-radio.adb index 8f0db60..339e1f2 100644 --- a/src/fltk-widgets-buttons-light-radio.adb +++ b/src/fltk-widgets-buttons-light-radio.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Buttons.Light.Radio is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Radio_Light_Button is begin return This : Radio_Light_Button do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Buttons.Light.Radio is Widget_Convert.To_Address (This'Unchecked_Access)); radio_light_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); radio_light_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-buttons-light-radio.ads b/src/fltk-widgets-buttons-light-radio.ads index 385de81..b1fe574 100644 --- a/src/fltk-widgets-buttons-light-radio.ads +++ b/src/fltk-widgets-buttons-light-radio.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Buttons.Light.Radio is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Radio_Light_Button; end Forge; diff --git a/src/fltk-widgets-buttons-light-round-radio.adb b/src/fltk-widgets-buttons-light-round-radio.adb index b97b714..c1a9271 100644 --- a/src/fltk-widgets-buttons-light-round-radio.adb +++ b/src/fltk-widgets-buttons-light-round-radio.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Buttons.Light.Round.Radio is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Radio_Round_Button is begin return This : Radio_Round_Button do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Buttons.Light.Round.Radio is Widget_Convert.To_Address (This'Unchecked_Access)); radio_round_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); radio_round_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-buttons-light-round-radio.ads b/src/fltk-widgets-buttons-light-round-radio.ads index a4715a8..9424450 100644 --- a/src/fltk-widgets-buttons-light-round-radio.ads +++ b/src/fltk-widgets-buttons-light-round-radio.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Buttons.Light.Round.Radio is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Radio_Round_Button; end Forge; diff --git a/src/fltk-widgets-buttons-light-round.adb b/src/fltk-widgets-buttons-light-round.adb index dd3fa29..bceb70e 100644 --- a/src/fltk-widgets-buttons-light-round.adb +++ b/src/fltk-widgets-buttons-light-round.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Buttons.Light.Round is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Round_Button is begin return This : Round_Button do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Buttons.Light.Round is 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); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-buttons-light-round.ads b/src/fltk-widgets-buttons-light-round.ads index 52d5e78..22428c6 100644 --- a/src/fltk-widgets-buttons-light-round.ads +++ b/src/fltk-widgets-buttons-light-round.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Buttons.Light.Round is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Round_Button; end Forge; diff --git a/src/fltk-widgets-buttons-light.adb b/src/fltk-widgets-buttons-light.adb index dc258b2..6290054 100644 --- a/src/fltk-widgets-buttons-light.adb +++ b/src/fltk-widgets-buttons-light.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Buttons.Light is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Light_Button is begin return This : Light_Button do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Buttons.Light is Widget_Convert.To_Address (This'Unchecked_Access)); light_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); light_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-buttons-light.ads b/src/fltk-widgets-buttons-light.ads index e270ba9..8e8f725 100644 --- a/src/fltk-widgets-buttons-light.ads +++ b/src/fltk-widgets-buttons-light.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Buttons.Light is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Light_Button; end Forge; diff --git a/src/fltk-widgets-buttons-radio.adb b/src/fltk-widgets-buttons-radio.adb index d6ae492..8d8e164 100644 --- a/src/fltk-widgets-buttons-radio.adb +++ b/src/fltk-widgets-buttons-radio.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Buttons.Radio is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Radio_Button is begin return This : Radio_Button do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Buttons.Radio is Widget_Convert.To_Address (This'Unchecked_Access)); radio_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); radio_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-buttons-radio.ads b/src/fltk-widgets-buttons-radio.ads index 2125af9..4a2cdf5 100644 --- a/src/fltk-widgets-buttons-radio.ads +++ b/src/fltk-widgets-buttons-radio.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Buttons.Radio is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Radio_Button; end Forge; diff --git a/src/fltk-widgets-buttons-repeat.adb b/src/fltk-widgets-buttons-repeat.adb index eaebeb4..9b3af65 100644 --- a/src/fltk-widgets-buttons-repeat.adb +++ b/src/fltk-widgets-buttons-repeat.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Buttons.Repeat is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Repeat_Button is begin return This : Repeat_Button do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Buttons.Repeat is Widget_Convert.To_Address (This'Unchecked_Access)); repeat_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); repeat_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-buttons-repeat.ads b/src/fltk-widgets-buttons-repeat.ads index 0273741..22f1088 100644 --- a/src/fltk-widgets-buttons-repeat.ads +++ b/src/fltk-widgets-buttons-repeat.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Buttons.Repeat is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Repeat_Button; end Forge; diff --git a/src/fltk-widgets-buttons-toggle.adb b/src/fltk-widgets-buttons-toggle.adb index bf945e5..21df56b 100644 --- a/src/fltk-widgets-buttons-toggle.adb +++ b/src/fltk-widgets-buttons-toggle.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Buttons.Toggle is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Toggle_Button is begin return This : Toggle_Button do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Buttons.Toggle is Widget_Convert.To_Address (This'Unchecked_Access)); toggle_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); toggle_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-buttons-toggle.ads b/src/fltk-widgets-buttons-toggle.ads index 90c898e..7e185ca 100644 --- a/src/fltk-widgets-buttons-toggle.ads +++ b/src/fltk-widgets-buttons-toggle.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Buttons.Toggle is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Toggle_Button; end Forge; diff --git a/src/fltk-widgets-buttons.adb b/src/fltk-widgets-buttons.adb index 2f5cbf4..fb2735f 100644 --- a/src/fltk-widgets-buttons.adb +++ b/src/fltk-widgets-buttons.adb @@ -122,7 +122,7 @@ package body FLTK.Widgets.Buttons is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Button is begin return This : Button do @@ -137,6 +137,7 @@ package body FLTK.Widgets.Buttons is Widget_Convert.To_Address (This'Unchecked_Access)); button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-buttons.ads b/src/fltk-widgets-buttons.ads index 8e59e9c..7772e63 100644 --- a/src/fltk-widgets-buttons.ads +++ b/src/fltk-widgets-buttons.ads @@ -17,7 +17,7 @@ package FLTK.Widgets.Buttons is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Button; end Forge; diff --git a/src/fltk-widgets-charts.adb b/src/fltk-widgets-charts.adb index 078a64d..63bd604 100644 --- a/src/fltk-widgets-charts.adb +++ b/src/fltk-widgets-charts.adb @@ -203,7 +203,7 @@ package body FLTK.Widgets.Charts is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Chart is begin return This : Chart do @@ -218,6 +218,7 @@ package body FLTK.Widgets.Charts is Widget_Convert.To_Address (This'Unchecked_Access)); chart_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); chart_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-charts.ads b/src/fltk-widgets-charts.ads index b180bc9..1369c4f 100644 --- a/src/fltk-widgets-charts.ads +++ b/src/fltk-widgets-charts.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Charts is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Chart; end Forge; diff --git a/src/fltk-widgets-clocks-updated-round.adb b/src/fltk-widgets-clocks-updated-round.adb index f519fe0..eb0404a 100644 --- a/src/fltk-widgets-clocks-updated-round.adb +++ b/src/fltk-widgets-clocks-updated-round.adb @@ -81,7 +81,7 @@ package body FLTK.Widgets.Clocks.Updated.Round is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Round_Clock is begin return This : Round_Clock do @@ -96,6 +96,7 @@ package body FLTK.Widgets.Clocks.Updated.Round is Widget_Convert.To_Address (This'Unchecked_Access)); round_clock_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); round_clock_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-clocks-updated-round.ads b/src/fltk-widgets-clocks-updated-round.ads index 4b6681c..a868e9f 100644 --- a/src/fltk-widgets-clocks-updated-round.ads +++ b/src/fltk-widgets-clocks-updated-round.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Clocks.Updated.Round is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Round_Clock; end Forge; diff --git a/src/fltk-widgets-clocks-updated.adb b/src/fltk-widgets-clocks-updated.adb index f2f450b..0d77222 100644 --- a/src/fltk-widgets-clocks-updated.adb +++ b/src/fltk-widgets-clocks-updated.adb @@ -89,7 +89,7 @@ package body FLTK.Widgets.Clocks.Updated is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Updated_Clock is begin return This : Updated_Clock do @@ -104,6 +104,7 @@ package body FLTK.Widgets.Clocks.Updated is Widget_Convert.To_Address (This'Unchecked_Access)); clock_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); clock_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; @@ -111,7 +112,7 @@ package body FLTK.Widgets.Clocks.Updated is function Create (Kind : in Box_Kind; X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Updated_Clock is begin return This : Updated_Clock do @@ -127,6 +128,7 @@ package body FLTK.Widgets.Clocks.Updated is Widget_Convert.To_Address (This'Unchecked_Access)); clock_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); clock_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-clocks-updated.ads b/src/fltk-widgets-clocks-updated.ads index 9830d13..bbacbe4 100644 --- a/src/fltk-widgets-clocks-updated.ads +++ b/src/fltk-widgets-clocks-updated.ads @@ -15,13 +15,13 @@ package FLTK.Widgets.Clocks.Updated is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Updated_Clock; function Create (Kind : in Box_Kind; X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Updated_Clock; end Forge; diff --git a/src/fltk-widgets-clocks.adb b/src/fltk-widgets-clocks.adb index 4eeee3c..cf83757 100644 --- a/src/fltk-widgets-clocks.adb +++ b/src/fltk-widgets-clocks.adb @@ -123,7 +123,7 @@ package body FLTK.Widgets.Clocks is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Clock is begin return This : Clock do @@ -138,6 +138,7 @@ package body FLTK.Widgets.Clocks is Widget_Convert.To_Address (This'Unchecked_Access)); clock_output_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); clock_output_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-clocks.ads b/src/fltk-widgets-clocks.ads index d1cd192..d54e76b 100644 --- a/src/fltk-widgets-clocks.ads +++ b/src/fltk-widgets-clocks.ads @@ -21,7 +21,7 @@ package FLTK.Widgets.Clocks is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Clock; end Forge; diff --git a/src/fltk-widgets-groups-color_choosers.adb b/src/fltk-widgets-groups-color_choosers.adb index 9d8221b..9c3dda2 100644 --- a/src/fltk-widgets-groups-color_choosers.adb +++ b/src/fltk-widgets-groups-color_choosers.adb @@ -163,7 +163,7 @@ package body FLTK.Widgets.Groups.Color_Choosers is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Color_Chooser is begin return This : Color_Chooser do @@ -179,6 +179,7 @@ package body FLTK.Widgets.Groups.Color_Choosers is Widget_Convert.To_Address (This'Unchecked_Access)); color_chooser_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); color_chooser_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-color_choosers.ads b/src/fltk-widgets-groups-color_choosers.ads index fa26c2d..abc5974 100644 --- a/src/fltk-widgets-groups-color_choosers.ads +++ b/src/fltk-widgets-groups-color_choosers.ads @@ -17,7 +17,7 @@ package FLTK.Widgets.Groups.Color_Choosers is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Color_Chooser; end Forge; diff --git a/src/fltk-widgets-groups-input_choices.adb b/src/fltk-widgets-groups-input_choices.adb index 223e33d..2a7db68 100644 --- a/src/fltk-widgets-groups-input_choices.adb +++ b/src/fltk-widgets-groups-input_choices.adb @@ -197,7 +197,7 @@ package body FLTK.Widgets.Groups.Input_Choices is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Input_Choice is begin return This : Input_Choice do @@ -213,6 +213,7 @@ package body FLTK.Widgets.Groups.Input_Choices is Widget_Convert.To_Address (This'Unchecked_Access)); input_choice_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); input_choice_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); This.My_Input := new INP.Input; Wrapper (This.My_Input.all).Void_Ptr := diff --git a/src/fltk-widgets-groups-input_choices.ads b/src/fltk-widgets-groups-input_choices.ads index b57585d..bd38898 100644 --- a/src/fltk-widgets-groups-input_choices.ads +++ b/src/fltk-widgets-groups-input_choices.ads @@ -21,7 +21,7 @@ package FLTK.Widgets.Groups.Input_Choices is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Input_Choice; end Forge; diff --git a/src/fltk-widgets-groups-packed.adb b/src/fltk-widgets-groups-packed.adb index 077d3c1..69b6e7c 100644 --- a/src/fltk-widgets-groups-packed.adb +++ b/src/fltk-widgets-groups-packed.adb @@ -91,7 +91,7 @@ package body FLTK.Widgets.Groups.Packed is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Packed_Group is begin return This : Packed_Group do @@ -107,6 +107,7 @@ package body FLTK.Widgets.Groups.Packed is Widget_Convert.To_Address (This'Unchecked_Access)); pack_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); pack_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-packed.ads b/src/fltk-widgets-groups-packed.ads index d711190..65d5e42 100644 --- a/src/fltk-widgets-groups-packed.ads +++ b/src/fltk-widgets-groups-packed.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Groups.Packed is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Packed_Group; end Forge; diff --git a/src/fltk-widgets-groups-scrolls.adb b/src/fltk-widgets-groups-scrolls.adb index 6ceb0cb..50a2728 100644 --- a/src/fltk-widgets-groups-scrolls.adb +++ b/src/fltk-widgets-groups-scrolls.adb @@ -126,7 +126,7 @@ package body FLTK.Widgets.Groups.Scrolls is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Scroll is begin return This : Scroll do @@ -142,6 +142,7 @@ package body FLTK.Widgets.Groups.Scrolls is Widget_Convert.To_Address (This'Unchecked_Access)); scroll_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); scroll_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-scrolls.ads b/src/fltk-widgets-groups-scrolls.ads index 25b2aa0..fcd435a 100644 --- a/src/fltk-widgets-groups-scrolls.ads +++ b/src/fltk-widgets-groups-scrolls.ads @@ -24,7 +24,7 @@ package FLTK.Widgets.Groups.Scrolls is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Scroll; end Forge; diff --git a/src/fltk-widgets-groups-spinners.adb b/src/fltk-widgets-groups-spinners.adb index 476bb32..fa12bb3 100644 --- a/src/fltk-widgets-groups-spinners.adb +++ b/src/fltk-widgets-groups-spinners.adb @@ -209,7 +209,7 @@ package body FLTK.Widgets.Groups.Spinners is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Spinner is begin return This : Spinner do @@ -225,6 +225,7 @@ package body FLTK.Widgets.Groups.Spinners is Widget_Convert.To_Address (This'Unchecked_Access)); spinner_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); spinner_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-spinners.ads b/src/fltk-widgets-groups-spinners.ads index b85a3a4..103a824 100644 --- a/src/fltk-widgets-groups-spinners.ads +++ b/src/fltk-widgets-groups-spinners.ads @@ -17,7 +17,7 @@ package FLTK.Widgets.Groups.Spinners is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Spinner; end Forge; diff --git a/src/fltk-widgets-groups-tabbed.adb b/src/fltk-widgets-groups-tabbed.adb index 1f62cee..76e1b0d 100644 --- a/src/fltk-widgets-groups-tabbed.adb +++ b/src/fltk-widgets-groups-tabbed.adb @@ -118,7 +118,7 @@ package body FLTK.Widgets.Groups.Tabbed is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Tabbed_Group is begin return This : Tabbed_Group do @@ -134,6 +134,7 @@ package body FLTK.Widgets.Groups.Tabbed is Widget_Convert.To_Address (This'Unchecked_Access)); tabs_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); tabs_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-tabbed.ads b/src/fltk-widgets-groups-tabbed.ads index 825b36d..7c73283 100644 --- a/src/fltk-widgets-groups-tabbed.ads +++ b/src/fltk-widgets-groups-tabbed.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Groups.Tabbed is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Tabbed_Group; end Forge; diff --git a/src/fltk-widgets-groups-text_displays-text_editors.adb b/src/fltk-widgets-groups-text_displays-text_editors.adb index 9d0f51b..7c692c7 100644 --- a/src/fltk-widgets-groups-text_displays-text_editors.adb +++ b/src/fltk-widgets-groups-text_displays-text_editors.adb @@ -434,7 +434,7 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Text_Editor is use type Interfaces.C.int; @@ -452,6 +452,7 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is Widget_Convert.To_Address (This'Unchecked_Access)); text_editor_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); text_editor_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); -- change things over so key bindings are all handled from the Ada side This.Bindings := Binding_Vectors.Empty_Vector; diff --git a/src/fltk-widgets-groups-text_displays-text_editors.ads b/src/fltk-widgets-groups-text_displays-text_editors.ads index 2430e0b..3d1bdbe 100644 --- a/src/fltk-widgets-groups-text_displays-text_editors.ads +++ b/src/fltk-widgets-groups-text_displays-text_editors.ads @@ -39,7 +39,7 @@ package FLTK.Widgets.Groups.Text_Displays.Text_Editors is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Text_Editor; end Forge; diff --git a/src/fltk-widgets-groups-text_displays.adb b/src/fltk-widgets-groups-text_displays.adb index a28cdbb..cd76007 100644 --- a/src/fltk-widgets-groups-text_displays.adb +++ b/src/fltk-widgets-groups-text_displays.adb @@ -484,7 +484,7 @@ package body FLTK.Widgets.Groups.Text_Displays is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Text_Display is begin return This : Text_Display do @@ -500,6 +500,7 @@ package body FLTK.Widgets.Groups.Text_Displays is Widget_Convert.To_Address (This'Unchecked_Access)); text_display_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); text_display_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-text_displays.ads b/src/fltk-widgets-groups-text_displays.ads index 332af44..609561e 100644 --- a/src/fltk-widgets-groups-text_displays.ads +++ b/src/fltk-widgets-groups-text_displays.ads @@ -31,7 +31,7 @@ package FLTK.Widgets.Groups.Text_Displays is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Text_Display; end Forge; diff --git a/src/fltk-widgets-groups-tiled.adb b/src/fltk-widgets-groups-tiled.adb index aa617ec..1652afe 100644 --- a/src/fltk-widgets-groups-tiled.adb +++ b/src/fltk-widgets-groups-tiled.adb @@ -85,7 +85,7 @@ package body FLTK.Widgets.Groups.Tiled is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Tiled_Group is begin return This : Tiled_Group do @@ -101,6 +101,7 @@ package body FLTK.Widgets.Groups.Tiled is Widget_Convert.To_Address (This'Unchecked_Access)); tile_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); tile_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-tiled.ads b/src/fltk-widgets-groups-tiled.ads index ed24a15..92ba031 100644 --- a/src/fltk-widgets-groups-tiled.ads +++ b/src/fltk-widgets-groups-tiled.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Groups.Tiled is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Tiled_Group; end Forge; diff --git a/src/fltk-widgets-groups-windows-double.adb b/src/fltk-widgets-groups-windows-double.adb index 515e149..cc920d9 100644 --- a/src/fltk-widgets-groups-windows-double.adb +++ b/src/fltk-widgets-groups-windows-double.adb @@ -101,7 +101,7 @@ package body FLTK.Widgets.Groups.Windows.Double is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Double_Window is begin return This : Double_Window do @@ -117,13 +117,14 @@ package body FLTK.Widgets.Groups.Windows.Double is Widget_Convert.To_Address (This'Unchecked_Access)); double_window_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); double_window_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; function Create (W, H : in Integer; - Text : in String) + Text : in String := "") return Double_Window is begin return This : Double_Window do @@ -137,6 +138,7 @@ package body FLTK.Widgets.Groups.Windows.Double is Widget_Convert.To_Address (This'Unchecked_Access)); double_window_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); double_window_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-windows-double.ads b/src/fltk-widgets-groups-windows-double.ads index 697b72b..0284e59 100644 --- a/src/fltk-widgets-groups-windows-double.ads +++ b/src/fltk-widgets-groups-windows-double.ads @@ -14,12 +14,12 @@ package FLTK.Widgets.Groups.Windows.Double is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Double_Window; function Create (W, H : in Integer; - Text : in String) + Text : in String := "") return Double_Window; end Forge; diff --git a/src/fltk-widgets-groups-windows-single-menu.adb b/src/fltk-widgets-groups-windows-single-menu.adb index 7a3d0c2..d26b33f 100644 --- a/src/fltk-widgets-groups-windows-single-menu.adb +++ b/src/fltk-widgets-groups-windows-single-menu.adb @@ -121,7 +121,7 @@ package body FLTK.Widgets.Groups.Windows.Single.Menu is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Menu_Window is begin return This : Menu_Window do @@ -137,13 +137,14 @@ package body FLTK.Widgets.Groups.Windows.Single.Menu is Widget_Convert.To_Address (This'Unchecked_Access)); menu_window_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); menu_window_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; function Create (W, H : in Integer; - Text : in String) + Text : in String := "") return Menu_Window is begin return This : Menu_Window do @@ -157,6 +158,7 @@ package body FLTK.Widgets.Groups.Windows.Single.Menu is Widget_Convert.To_Address (This'Unchecked_Access)); menu_window_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); menu_window_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-windows-single-menu.ads b/src/fltk-widgets-groups-windows-single-menu.ads index 2b5d272..7596298 100644 --- a/src/fltk-widgets-groups-windows-single-menu.ads +++ b/src/fltk-widgets-groups-windows-single-menu.ads @@ -15,12 +15,12 @@ package FLTK.Widgets.Groups.Windows.Single.Menu is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Menu_Window; function Create (W, H : in Integer; - Text : in String) + Text : in String := "") return Menu_Window; end Forge; diff --git a/src/fltk-widgets-groups-windows-single.adb b/src/fltk-widgets-groups-windows-single.adb index 6ef2cc7..2bc5608 100644 --- a/src/fltk-widgets-groups-windows-single.adb +++ b/src/fltk-widgets-groups-windows-single.adb @@ -96,7 +96,7 @@ package body FLTK.Widgets.Groups.Windows.Single is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Single_Window is begin return This : Single_Window do @@ -112,13 +112,14 @@ package body FLTK.Widgets.Groups.Windows.Single is Widget_Convert.To_Address (This'Unchecked_Access)); single_window_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); single_window_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; function Create (W, H : in Integer; - Text : in String) + Text : in String := "") return Single_Window is begin return This : Single_Window do @@ -132,6 +133,7 @@ package body FLTK.Widgets.Groups.Windows.Single is Widget_Convert.To_Address (This'Unchecked_Access)); single_window_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); single_window_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-windows-single.ads b/src/fltk-widgets-groups-windows-single.ads index 7817325..6a36727 100644 --- a/src/fltk-widgets-groups-windows-single.ads +++ b/src/fltk-widgets-groups-windows-single.ads @@ -15,12 +15,12 @@ package FLTK.Widgets.Groups.Windows.Single is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Single_Window; function Create (W, H : in Integer; - Text : in String) + Text : in String := "") return Single_Window; end Forge; diff --git a/src/fltk-widgets-groups-windows.adb b/src/fltk-widgets-groups-windows.adb index 590c915..08becbc 100644 --- a/src/fltk-widgets-groups-windows.adb +++ b/src/fltk-widgets-groups-windows.adb @@ -318,7 +318,7 @@ package body FLTK.Widgets.Groups.Windows is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Window is begin return This : Window do @@ -334,13 +334,14 @@ package body FLTK.Widgets.Groups.Windows is Widget_Convert.To_Address (This'Unchecked_Access)); window_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); window_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; function Create (W, H : in Integer; - Text : in String) + Text : in String := "") return Window is begin return This : Window do @@ -354,6 +355,7 @@ package body FLTK.Widgets.Groups.Windows is Widget_Convert.To_Address (This'Unchecked_Access)); window_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); window_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-windows.ads b/src/fltk-widgets-groups-windows.ads index 1199ec7..5eac154 100644 --- a/src/fltk-widgets-groups-windows.ads +++ b/src/fltk-widgets-groups-windows.ads @@ -35,12 +35,12 @@ package FLTK.Widgets.Groups.Windows is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Window; function Create (W, H : in Integer; - Text : in String) + Text : in String := "") return Window; end Forge; diff --git a/src/fltk-widgets-groups-wizards.adb b/src/fltk-widgets-groups-wizards.adb index b3e7f9c..f7ab3ed 100644 --- a/src/fltk-widgets-groups-wizards.adb +++ b/src/fltk-widgets-groups-wizards.adb @@ -103,7 +103,7 @@ package body FLTK.Widgets.Groups.Wizards is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Wizard is begin return This : Wizard do @@ -119,6 +119,7 @@ package body FLTK.Widgets.Groups.Wizards is Widget_Convert.To_Address (This'Unchecked_Access)); wizard_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); wizard_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups-wizards.ads b/src/fltk-widgets-groups-wizards.ads index f7130e3..63c68e5 100644 --- a/src/fltk-widgets-groups-wizards.ads +++ b/src/fltk-widgets-groups-wizards.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Groups.Wizards is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Wizard; end Forge; diff --git a/src/fltk-widgets-groups.adb b/src/fltk-widgets-groups.adb index 1994b29..08c61ab 100644 --- a/src/fltk-widgets-groups.adb +++ b/src/fltk-widgets-groups.adb @@ -176,7 +176,7 @@ package body FLTK.Widgets.Groups is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Group is begin return This : Group do @@ -192,6 +192,7 @@ package body FLTK.Widgets.Groups is Widget_Convert.To_Address (This'Unchecked_Access)); group_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); group_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-groups.ads b/src/fltk-widgets-groups.ads index ec0ab2a..1c2c30a 100644 --- a/src/fltk-widgets-groups.ads +++ b/src/fltk-widgets-groups.ads @@ -35,7 +35,7 @@ package FLTK.Widgets.Groups is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Group; end Forge; diff --git a/src/fltk-widgets-inputs-file.adb b/src/fltk-widgets-inputs-file.adb index 92836c8..f69cb9b 100644 --- a/src/fltk-widgets-inputs-file.adb +++ b/src/fltk-widgets-inputs-file.adb @@ -119,7 +119,7 @@ package body FLTK.Widgets.Inputs.File is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return File_Input is begin return This : File_Input do @@ -134,6 +134,7 @@ package body FLTK.Widgets.Inputs.File is Widget_Convert.To_Address (This'Unchecked_Access)); file_input_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); file_input_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-inputs-file.ads b/src/fltk-widgets-inputs-file.ads index 3d1142a..b3175c8 100644 --- a/src/fltk-widgets-inputs-file.ads +++ b/src/fltk-widgets-inputs-file.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Inputs.File is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return File_Input; end Forge; diff --git a/src/fltk-widgets-inputs-float.adb b/src/fltk-widgets-inputs-float.adb index 1ddb2f2..f62fd00 100644 --- a/src/fltk-widgets-inputs-float.adb +++ b/src/fltk-widgets-inputs-float.adb @@ -76,7 +76,7 @@ package body FLTK.Widgets.Inputs.Float is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Float_Input is begin return This : Float_Input do @@ -91,6 +91,7 @@ package body FLTK.Widgets.Inputs.Float is Widget_Convert.To_Address (This'Unchecked_Access)); float_input_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); float_input_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-inputs-float.ads b/src/fltk-widgets-inputs-float.ads index 39a58b3..f848ae0 100644 --- a/src/fltk-widgets-inputs-float.ads +++ b/src/fltk-widgets-inputs-float.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Inputs.Float is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Float_Input; end Forge; diff --git a/src/fltk-widgets-inputs-integer.adb b/src/fltk-widgets-inputs-integer.adb index 1e04d5a..d214a56 100644 --- a/src/fltk-widgets-inputs-integer.adb +++ b/src/fltk-widgets-inputs-integer.adb @@ -76,7 +76,7 @@ package body FLTK.Widgets.Inputs.Integer is function Create (X, Y, W, H : in Standard.Integer; - Text : in String) + Text : in String := "") return Integer_Input is begin return This : Integer_Input do @@ -91,6 +91,7 @@ package body FLTK.Widgets.Inputs.Integer is Widget_Convert.To_Address (This'Unchecked_Access)); int_input_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); int_input_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-inputs-integer.ads b/src/fltk-widgets-inputs-integer.ads index f5e74f6..821710a 100644 --- a/src/fltk-widgets-inputs-integer.ads +++ b/src/fltk-widgets-inputs-integer.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Inputs.Integer is function Create (X, Y, W, H : in Standard.Integer; - Text : in String) + Text : in String := "") return Integer_Input; end Forge; diff --git a/src/fltk-widgets-inputs-multiline.adb b/src/fltk-widgets-inputs-multiline.adb index f65cbc4..a319ab4 100644 --- a/src/fltk-widgets-inputs-multiline.adb +++ b/src/fltk-widgets-inputs-multiline.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Inputs.Multiline is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Multiline_Input is begin return This : Multiline_Input do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Inputs.Multiline is Widget_Convert.To_Address (This'Unchecked_Access)); multiline_input_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); multiline_input_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-inputs-multiline.ads b/src/fltk-widgets-inputs-multiline.ads index 7559759..7ebf76d 100644 --- a/src/fltk-widgets-inputs-multiline.ads +++ b/src/fltk-widgets-inputs-multiline.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Inputs.Multiline is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Multiline_Input; end Forge; diff --git a/src/fltk-widgets-inputs-outputs-multiline.adb b/src/fltk-widgets-inputs-outputs-multiline.adb index 2d5b9cf..7f95fcc 100644 --- a/src/fltk-widgets-inputs-outputs-multiline.adb +++ b/src/fltk-widgets-inputs-outputs-multiline.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Inputs.Outputs.Multiline is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Multiline_Output is begin return This : Multiline_Output do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Inputs.Outputs.Multiline is Widget_Convert.To_Address (This'Unchecked_Access)); multiline_output_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); multiline_output_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-inputs-outputs-multiline.ads b/src/fltk-widgets-inputs-outputs-multiline.ads index 05c13bf..8f1a2be 100644 --- a/src/fltk-widgets-inputs-outputs-multiline.ads +++ b/src/fltk-widgets-inputs-outputs-multiline.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Inputs.Outputs.Multiline is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Multiline_Output; end Forge; diff --git a/src/fltk-widgets-inputs-outputs.adb b/src/fltk-widgets-inputs-outputs.adb index 275c9be..e70db5c 100644 --- a/src/fltk-widgets-inputs-outputs.adb +++ b/src/fltk-widgets-inputs-outputs.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Inputs.Outputs is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Output is begin return This : Output do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Inputs.Outputs is Widget_Convert.To_Address (This'Unchecked_Access)); output_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); output_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-inputs-outputs.ads b/src/fltk-widgets-inputs-outputs.ads index 063b7bd..f5135e8 100644 --- a/src/fltk-widgets-inputs-outputs.ads +++ b/src/fltk-widgets-inputs-outputs.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Inputs.Outputs is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Output; end Forge; diff --git a/src/fltk-widgets-inputs-secret.adb b/src/fltk-widgets-inputs-secret.adb index 8fabd50..d5a68b4 100644 --- a/src/fltk-widgets-inputs-secret.adb +++ b/src/fltk-widgets-inputs-secret.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Inputs.Secret is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Secret_Input is begin return This : Secret_Input do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Inputs.Secret is Widget_Convert.To_Address (This'Unchecked_Access)); secret_input_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); secret_input_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-inputs-secret.ads b/src/fltk-widgets-inputs-secret.ads index 796b28f..362bdc8 100644 --- a/src/fltk-widgets-inputs-secret.ads +++ b/src/fltk-widgets-inputs-secret.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Inputs.Secret is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Secret_Input; end Forge; diff --git a/src/fltk-widgets-inputs.adb b/src/fltk-widgets-inputs.adb index 994937a..30334b8 100644 --- a/src/fltk-widgets-inputs.adb +++ b/src/fltk-widgets-inputs.adb @@ -327,7 +327,7 @@ package body FLTK.Widgets.Inputs is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Input is begin return This : Input do @@ -342,6 +342,7 @@ package body FLTK.Widgets.Inputs is Widget_Convert.To_Address (This'Unchecked_Access)); input_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); input_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-inputs.ads b/src/fltk-widgets-inputs.ads index 692baa4..46767cd 100644 --- a/src/fltk-widgets-inputs.ads +++ b/src/fltk-widgets-inputs.ads @@ -25,7 +25,7 @@ package FLTK.Widgets.Inputs is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Input; end Forge; diff --git a/src/fltk-widgets-menus-choices.adb b/src/fltk-widgets-menus-choices.adb index 5696bd2..836f80f 100644 --- a/src/fltk-widgets-menus-choices.adb +++ b/src/fltk-widgets-menus-choices.adb @@ -100,7 +100,7 @@ package body FLTK.Widgets.Menus.Choices is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Choice is begin return This : Choice do @@ -115,6 +115,7 @@ package body FLTK.Widgets.Menus.Choices is Widget_Convert.To_Address (This'Unchecked_Access)); choice_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); choice_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-menus-choices.ads b/src/fltk-widgets-menus-choices.ads index 7f99852..37ce4fc 100644 --- a/src/fltk-widgets-menus-choices.ads +++ b/src/fltk-widgets-menus-choices.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Menus.Choices is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Choice; end Forge; diff --git a/src/fltk-widgets-menus-menu_bars.adb b/src/fltk-widgets-menus-menu_bars.adb index fa8a96c..428d439 100644 --- a/src/fltk-widgets-menus-menu_bars.adb +++ b/src/fltk-widgets-menus-menu_bars.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Menus.Menu_Bars is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Menu_Bar is begin return This : Menu_Bar do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Menus.Menu_Bars is Widget_Convert.To_Address (This'Unchecked_Access)); menu_bar_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); menu_bar_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-menus-menu_bars.ads b/src/fltk-widgets-menus-menu_bars.ads index e36c632..b4487e3 100644 --- a/src/fltk-widgets-menus-menu_bars.ads +++ b/src/fltk-widgets-menus-menu_bars.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Menus.Menu_Bars is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Menu_Bar; end Forge; diff --git a/src/fltk-widgets-menus-menu_buttons.adb b/src/fltk-widgets-menus-menu_buttons.adb index 1207b68..babf75f 100644 --- a/src/fltk-widgets-menus-menu_buttons.adb +++ b/src/fltk-widgets-menus-menu_buttons.adb @@ -92,7 +92,7 @@ package body FLTK.Widgets.Menus.Menu_Buttons is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Menu_Button is begin return This : Menu_Button do @@ -107,6 +107,7 @@ package body FLTK.Widgets.Menus.Menu_Buttons is Widget_Convert.To_Address (This'Unchecked_Access)); menu_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); menu_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-menus-menu_buttons.ads b/src/fltk-widgets-menus-menu_buttons.ads index dd8fa71..31e4347 100644 --- a/src/fltk-widgets-menus-menu_buttons.ads +++ b/src/fltk-widgets-menus-menu_buttons.ads @@ -23,7 +23,7 @@ package FLTK.Widgets.Menus.Menu_Buttons is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Menu_Button; end Forge; diff --git a/src/fltk-widgets-menus.adb b/src/fltk-widgets-menus.adb index 0b652cf..a4e3c01 100644 --- a/src/fltk-widgets-menus.adb +++ b/src/fltk-widgets-menus.adb @@ -301,7 +301,7 @@ package body FLTK.Widgets.Menus is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Menu is begin return This : Menu do @@ -317,6 +317,7 @@ package body FLTK.Widgets.Menus is menu_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); menu_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); This.My_Items := Item_Vectors.Empty_Vector; + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-menus.ads b/src/fltk-widgets-menus.ads index f756109..41eda3a 100644 --- a/src/fltk-widgets-menus.ads +++ b/src/fltk-widgets-menus.ads @@ -36,7 +36,7 @@ package FLTK.Widgets.Menus is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Menu; end Forge; diff --git a/src/fltk-widgets-progress_bars.adb b/src/fltk-widgets-progress_bars.adb index f8b5291..387ff36 100644 --- a/src/fltk-widgets-progress_bars.adb +++ b/src/fltk-widgets-progress_bars.adb @@ -114,7 +114,7 @@ package body FLTK.Widgets.Progress_Bars is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Progress_Bar is begin return This : Progress_Bar do @@ -129,6 +129,7 @@ package body FLTK.Widgets.Progress_Bars is Widget_Convert.To_Address (This'Unchecked_Access)); progress_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); progress_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-progress_bars.ads b/src/fltk-widgets-progress_bars.ads index 11dc2f8..6aaf6e9 100644 --- a/src/fltk-widgets-progress_bars.ads +++ b/src/fltk-widgets-progress_bars.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Progress_Bars is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Progress_Bar; end Forge; diff --git a/src/fltk-widgets-valuators-adjusters.adb b/src/fltk-widgets-valuators-adjusters.adb index f91ffff..078a840 100644 --- a/src/fltk-widgets-valuators-adjusters.adb +++ b/src/fltk-widgets-valuators-adjusters.adb @@ -91,7 +91,7 @@ package body FLTK.Widgets.Valuators.Adjusters is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Adjuster is begin return This : Adjuster do @@ -106,6 +106,7 @@ package body FLTK.Widgets.Valuators.Adjusters is Widget_Convert.To_Address (This'Unchecked_Access)); adjuster_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); adjuster_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-adjusters.ads b/src/fltk-widgets-valuators-adjusters.ads index cba292c..bb17571 100644 --- a/src/fltk-widgets-valuators-adjusters.ads +++ b/src/fltk-widgets-valuators-adjusters.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Adjusters is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Adjuster; end Forge; diff --git a/src/fltk-widgets-valuators-counters-simple.adb b/src/fltk-widgets-valuators-counters-simple.adb index 6b96062..b0c3741 100644 --- a/src/fltk-widgets-valuators-counters-simple.adb +++ b/src/fltk-widgets-valuators-counters-simple.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Valuators.Counters.Simple is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Simple_Counter is begin return This : Simple_Counter do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Valuators.Counters.Simple is Widget_Convert.To_Address (This'Unchecked_Access)); simple_counter_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); simple_counter_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-counters-simple.ads b/src/fltk-widgets-valuators-counters-simple.ads index 5b8a4eb..ca82a99 100644 --- a/src/fltk-widgets-valuators-counters-simple.ads +++ b/src/fltk-widgets-valuators-counters-simple.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Counters.Simple is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Simple_Counter; end Forge; diff --git a/src/fltk-widgets-valuators-counters.adb b/src/fltk-widgets-valuators-counters.adb index a5bc3fe..6cda6d1 100644 --- a/src/fltk-widgets-valuators-counters.adb +++ b/src/fltk-widgets-valuators-counters.adb @@ -135,7 +135,7 @@ package body FLTK.Widgets.Valuators.Counters is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Counter is begin return This : Counter do @@ -150,6 +150,7 @@ package body FLTK.Widgets.Valuators.Counters is Widget_Convert.To_Address (This'Unchecked_Access)); counter_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); counter_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-counters.ads b/src/fltk-widgets-valuators-counters.ads index 2e16169..0bd52b5 100644 --- a/src/fltk-widgets-valuators-counters.ads +++ b/src/fltk-widgets-valuators-counters.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Counters is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Counter; end Forge; diff --git a/src/fltk-widgets-valuators-dials-fill.adb b/src/fltk-widgets-valuators-dials-fill.adb index 36172cd..40460f4 100644 --- a/src/fltk-widgets-valuators-dials-fill.adb +++ b/src/fltk-widgets-valuators-dials-fill.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Valuators.Dials.Fill is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Fill_Dial is begin return This : Fill_Dial do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Valuators.Dials.Fill is 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); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-dials-fill.ads b/src/fltk-widgets-valuators-dials-fill.ads index 00c0fe1..a54f1a7 100644 --- a/src/fltk-widgets-valuators-dials-fill.ads +++ b/src/fltk-widgets-valuators-dials-fill.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Dials.Fill is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Fill_Dial; end Forge; diff --git a/src/fltk-widgets-valuators-dials-line.adb b/src/fltk-widgets-valuators-dials-line.adb index 9868495..15565c3 100644 --- a/src/fltk-widgets-valuators-dials-line.adb +++ b/src/fltk-widgets-valuators-dials-line.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Valuators.Dials.Line is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Line_Dial is begin return This : Line_Dial do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Valuators.Dials.Line is Widget_Convert.To_Address (This'Unchecked_Access)); line_dial_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); line_dial_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-dials-line.ads b/src/fltk-widgets-valuators-dials-line.ads index 4bc0453..7752f68 100644 --- a/src/fltk-widgets-valuators-dials-line.ads +++ b/src/fltk-widgets-valuators-dials-line.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Dials.Line is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Line_Dial; end Forge; diff --git a/src/fltk-widgets-valuators-dials.adb b/src/fltk-widgets-valuators-dials.adb index 1f30034..31ce0ed 100644 --- a/src/fltk-widgets-valuators-dials.adb +++ b/src/fltk-widgets-valuators-dials.adb @@ -123,7 +123,7 @@ package body FLTK.Widgets.Valuators.Dials is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Dial is begin return This : Dial do @@ -138,6 +138,7 @@ package body FLTK.Widgets.Valuators.Dials is Widget_Convert.To_Address (This'Unchecked_Access)); dial_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); dial_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-dials.ads b/src/fltk-widgets-valuators-dials.ads index 67b5aa7..418ce31 100644 --- a/src/fltk-widgets-valuators-dials.ads +++ b/src/fltk-widgets-valuators-dials.ads @@ -17,7 +17,7 @@ package FLTK.Widgets.Valuators.Dials is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Dial; end Forge; diff --git a/src/fltk-widgets-valuators-rollers.adb b/src/fltk-widgets-valuators-rollers.adb index 4cce295..2a50f1b 100644 --- a/src/fltk-widgets-valuators-rollers.adb +++ b/src/fltk-widgets-valuators-rollers.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Valuators.Rollers is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Roller is begin return This : Roller do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Valuators.Rollers is Widget_Convert.To_Address (This'Unchecked_Access)); roller_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); roller_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-rollers.ads b/src/fltk-widgets-valuators-rollers.ads index e5d9a97..41bb864 100644 --- a/src/fltk-widgets-valuators-rollers.ads +++ b/src/fltk-widgets-valuators-rollers.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Rollers is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Roller; end Forge; diff --git a/src/fltk-widgets-valuators-sliders-fill.adb b/src/fltk-widgets-valuators-sliders-fill.adb index dfb87dd..83f1ffb 100644 --- a/src/fltk-widgets-valuators-sliders-fill.adb +++ b/src/fltk-widgets-valuators-sliders-fill.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Valuators.Sliders.Fill is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Fill_Slider is begin return This : Fill_Slider do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Valuators.Sliders.Fill is Widget_Convert.To_Address (This'Unchecked_Access)); fill_slider_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); fill_slider_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-sliders-fill.ads b/src/fltk-widgets-valuators-sliders-fill.ads index 115e8da..3a91bec 100644 --- a/src/fltk-widgets-valuators-sliders-fill.ads +++ b/src/fltk-widgets-valuators-sliders-fill.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Sliders.Fill is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Fill_Slider; end Forge; diff --git a/src/fltk-widgets-valuators-sliders-hor_fill.adb b/src/fltk-widgets-valuators-sliders-hor_fill.adb index 7111dd0..3cb4f20 100644 --- a/src/fltk-widgets-valuators-sliders-hor_fill.adb +++ b/src/fltk-widgets-valuators-sliders-hor_fill.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Fill is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Hor_Fill_Slider is begin return This : Hor_Fill_Slider do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Fill is Widget_Convert.To_Address (This'Unchecked_Access)); hor_fill_slider_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); hor_fill_slider_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-sliders-hor_fill.ads b/src/fltk-widgets-valuators-sliders-hor_fill.ads index 06e7ad4..b54c388 100644 --- a/src/fltk-widgets-valuators-sliders-hor_fill.ads +++ b/src/fltk-widgets-valuators-sliders-hor_fill.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Sliders.Hor_Fill is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Hor_Fill_Slider; end Forge; diff --git a/src/fltk-widgets-valuators-sliders-hor_nice.adb b/src/fltk-widgets-valuators-sliders-hor_nice.adb index 0bf91d5..4f3db15 100644 --- a/src/fltk-widgets-valuators-sliders-hor_nice.adb +++ b/src/fltk-widgets-valuators-sliders-hor_nice.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Nice is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Hor_Nice_Slider is begin return This : Hor_Nice_Slider do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Nice is Widget_Convert.To_Address (This'Unchecked_Access)); hor_nice_slider_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); hor_nice_slider_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-sliders-hor_nice.ads b/src/fltk-widgets-valuators-sliders-hor_nice.ads index 8a4b593..e8bae70 100644 --- a/src/fltk-widgets-valuators-sliders-hor_nice.ads +++ b/src/fltk-widgets-valuators-sliders-hor_nice.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Sliders.Hor_Nice is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Hor_Nice_Slider; end Forge; diff --git a/src/fltk-widgets-valuators-sliders-horizontal.adb b/src/fltk-widgets-valuators-sliders-horizontal.adb index 2ee7598..4675e23 100644 --- a/src/fltk-widgets-valuators-sliders-horizontal.adb +++ b/src/fltk-widgets-valuators-sliders-horizontal.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Valuators.Sliders.Horizontal is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Horizontal_Slider is begin return This : Horizontal_Slider do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Valuators.Sliders.Horizontal is Widget_Convert.To_Address (This'Unchecked_Access)); horizontal_slider_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); horizontal_slider_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-sliders-horizontal.ads b/src/fltk-widgets-valuators-sliders-horizontal.ads index 8f1b96a..130a9fd 100644 --- a/src/fltk-widgets-valuators-sliders-horizontal.ads +++ b/src/fltk-widgets-valuators-sliders-horizontal.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Sliders.Horizontal is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Horizontal_Slider; end Forge; diff --git a/src/fltk-widgets-valuators-sliders-nice.adb b/src/fltk-widgets-valuators-sliders-nice.adb index 2143b8e..3820c5f 100644 --- a/src/fltk-widgets-valuators-sliders-nice.adb +++ b/src/fltk-widgets-valuators-sliders-nice.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Valuators.Sliders.Nice is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Nice_Slider is begin return This : Nice_Slider do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Valuators.Sliders.Nice is Widget_Convert.To_Address (This'Unchecked_Access)); nice_slider_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); nice_slider_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-sliders-nice.ads b/src/fltk-widgets-valuators-sliders-nice.ads index 55a5f04..32dcec1 100644 --- a/src/fltk-widgets-valuators-sliders-nice.ads +++ b/src/fltk-widgets-valuators-sliders-nice.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Sliders.Nice is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Nice_Slider; end Forge; diff --git a/src/fltk-widgets-valuators-sliders-scrollbars.adb b/src/fltk-widgets-valuators-sliders-scrollbars.adb index 40f9777..e40ec1f 100644 --- a/src/fltk-widgets-valuators-sliders-scrollbars.adb +++ b/src/fltk-widgets-valuators-sliders-scrollbars.adb @@ -108,7 +108,7 @@ package body FLTK.Widgets.Valuators.Sliders.Scrollbars is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Scrollbar is begin return This : Scrollbar do @@ -123,6 +123,7 @@ package body FLTK.Widgets.Valuators.Sliders.Scrollbars is Widget_Convert.To_Address (This'Unchecked_Access)); scrollbar_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); scrollbar_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-sliders-scrollbars.ads b/src/fltk-widgets-valuators-sliders-scrollbars.ads index c69aa4b..6a921bb 100644 --- a/src/fltk-widgets-valuators-sliders-scrollbars.ads +++ b/src/fltk-widgets-valuators-sliders-scrollbars.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Sliders.Scrollbars is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Scrollbar; end Forge; diff --git a/src/fltk-widgets-valuators-sliders-value-horizontal.adb b/src/fltk-widgets-valuators-sliders-value-horizontal.adb index fb40674..d3c0c06 100644 --- a/src/fltk-widgets-valuators-sliders-value-horizontal.adb +++ b/src/fltk-widgets-valuators-sliders-value-horizontal.adb @@ -75,7 +75,7 @@ package body FLTK.Widgets.Valuators.Sliders.Value.Horizontal is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Hor_Value_Slider is begin return This : Hor_Value_Slider do @@ -90,6 +90,7 @@ package body FLTK.Widgets.Valuators.Sliders.Value.Horizontal is Widget_Convert.To_Address (This'Unchecked_Access)); hor_value_slider_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); hor_value_slider_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-sliders-value-horizontal.ads b/src/fltk-widgets-valuators-sliders-value-horizontal.ads index 2bdb8ea..d92465e 100644 --- a/src/fltk-widgets-valuators-sliders-value-horizontal.ads +++ b/src/fltk-widgets-valuators-sliders-value-horizontal.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Sliders.Value.Horizontal is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Hor_Value_Slider; end Forge; diff --git a/src/fltk-widgets-valuators-sliders-value.adb b/src/fltk-widgets-valuators-sliders-value.adb index fa8756f..48cd603 100644 --- a/src/fltk-widgets-valuators-sliders-value.adb +++ b/src/fltk-widgets-valuators-sliders-value.adb @@ -114,7 +114,7 @@ package body FLTK.Widgets.Valuators.Sliders.Value is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Value_Slider is begin return This : Value_Slider do @@ -129,6 +129,7 @@ package body FLTK.Widgets.Valuators.Sliders.Value is Widget_Convert.To_Address (This'Unchecked_Access)); value_slider_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); value_slider_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-sliders-value.ads b/src/fltk-widgets-valuators-sliders-value.ads index fbbf717..02edc47 100644 --- a/src/fltk-widgets-valuators-sliders-value.ads +++ b/src/fltk-widgets-valuators-sliders-value.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Sliders.Value is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Value_Slider; end Forge; diff --git a/src/fltk-widgets-valuators-sliders.adb b/src/fltk-widgets-valuators-sliders.adb index 01baf1c..5511695 100644 --- a/src/fltk-widgets-valuators-sliders.adb +++ b/src/fltk-widgets-valuators-sliders.adb @@ -130,7 +130,7 @@ package body FLTK.Widgets.Valuators.Sliders is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Slider is begin return This : Slider do @@ -145,6 +145,7 @@ package body FLTK.Widgets.Valuators.Sliders is Widget_Convert.To_Address (This'Unchecked_Access)); slider_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); slider_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-sliders.ads b/src/fltk-widgets-valuators-sliders.ads index 77ad933..e53dbd2 100644 --- a/src/fltk-widgets-valuators-sliders.ads +++ b/src/fltk-widgets-valuators-sliders.ads @@ -20,7 +20,7 @@ package FLTK.Widgets.Valuators.Sliders is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Slider; end Forge; diff --git a/src/fltk-widgets-valuators-value_inputs.adb b/src/fltk-widgets-valuators-value_inputs.adb index 010906d..fbba892 100644 --- a/src/fltk-widgets-valuators-value_inputs.adb +++ b/src/fltk-widgets-valuators-value_inputs.adb @@ -177,7 +177,7 @@ package body FLTK.Widgets.Valuators.Value_Inputs is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Value_Input is begin return This : Value_Input do @@ -192,6 +192,7 @@ package body FLTK.Widgets.Valuators.Value_Inputs is Widget_Convert.To_Address (This'Unchecked_Access)); value_input_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); value_input_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); This.My_Input := new INP.Input; Wrapper (This.My_Input.all).Void_Ptr := diff --git a/src/fltk-widgets-valuators-value_inputs.ads b/src/fltk-widgets-valuators-value_inputs.ads index b56874c..fbf0fdf 100644 --- a/src/fltk-widgets-valuators-value_inputs.ads +++ b/src/fltk-widgets-valuators-value_inputs.ads @@ -20,7 +20,7 @@ package FLTK.Widgets.Valuators.Value_Inputs is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Value_Input; end Forge; diff --git a/src/fltk-widgets-valuators-value_outputs.adb b/src/fltk-widgets-valuators-value_outputs.adb index 0330bc5..0c99ace 100644 --- a/src/fltk-widgets-valuators-value_outputs.adb +++ b/src/fltk-widgets-valuators-value_outputs.adb @@ -130,7 +130,7 @@ package body FLTK.Widgets.Valuators.Value_Outputs is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Value_Output is begin return This : Value_Output do @@ -145,6 +145,7 @@ package body FLTK.Widgets.Valuators.Value_Outputs is Widget_Convert.To_Address (This'Unchecked_Access)); value_output_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); value_output_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators-value_outputs.ads b/src/fltk-widgets-valuators-value_outputs.ads index c935aa6..5cc5fc4 100644 --- a/src/fltk-widgets-valuators-value_outputs.ads +++ b/src/fltk-widgets-valuators-value_outputs.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators.Value_Outputs is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Value_Output; end Forge; diff --git a/src/fltk-widgets-valuators.adb b/src/fltk-widgets-valuators.adb index 5f12949..f7515d2 100644 --- a/src/fltk-widgets-valuators.adb +++ b/src/fltk-widgets-valuators.adb @@ -164,7 +164,7 @@ package body FLTK.Widgets.Valuators is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Valuator is begin return This : Valuator do @@ -179,6 +179,7 @@ package body FLTK.Widgets.Valuators is Widget_Convert.To_Address (This'Unchecked_Access)); valuator_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); valuator_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets-valuators.ads b/src/fltk-widgets-valuators.ads index fc9423c..1f16b0c 100644 --- a/src/fltk-widgets-valuators.ads +++ b/src/fltk-widgets-valuators.ads @@ -15,7 +15,7 @@ package FLTK.Widgets.Valuators is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Valuator; end Forge; diff --git a/src/fltk-widgets.adb b/src/fltk-widgets.adb index 73d3e17..f08639b 100644 --- a/src/fltk-widgets.adb +++ b/src/fltk-widgets.adb @@ -296,12 +296,6 @@ package body FLTK.Widgets is pragma Import (C, fl_widget_get_label, "fl_widget_get_label"); pragma Inline (fl_widget_get_label); - procedure fl_widget_set_label - (W : in System.Address; - T : in Interfaces.C.char_array); - pragma Import (C, fl_widget_set_label, "fl_widget_set_label"); - pragma Inline (fl_widget_set_label); - function fl_widget_get_labelcolor (W : in System.Address) return Interfaces.C.unsigned; @@ -522,7 +516,7 @@ package body FLTK.Widgets is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Widget is begin return This : Widget do @@ -537,6 +531,7 @@ package body FLTK.Widgets is Widget_Convert.To_Address (This'Unchecked_Access)); widget_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); widget_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; diff --git a/src/fltk-widgets.ads b/src/fltk-widgets.ads index 4c649c0..5ac6f49 100644 --- a/src/fltk-widgets.ads +++ b/src/fltk-widgets.ads @@ -41,7 +41,7 @@ package FLTK.Widgets is function Create (X, Y, W, H : in Integer; - Text : in String) + Text : in String := "") return Widget; end Forge; @@ -402,10 +402,21 @@ private (W : in System.Address) return System.Address; pragma Import (C, fl_widget_get_user_data, "fl_widget_get_user_data"); + pragma Inline (fl_widget_get_user_data); procedure fl_widget_set_user_data (W, D : in System.Address); pragma Import (C, fl_widget_set_user_data, "fl_widget_set_user_data"); + pragma Inline (fl_widget_set_user_data); + + + + + procedure fl_widget_set_label + (W : in System.Address; + T : in Interfaces.C.char_array); + pragma Import (C, fl_widget_set_label, "fl_widget_set_label"); + pragma Inline (fl_widget_set_label); |