From 468cdc37c83cd51eb1b0656bc7faeaf2099e0918 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 13 Mar 2018 17:46:33 +1100 Subject: Updated to work with non-inherited constructors in FLTK binding --- src/windows-about.adb | 65 +++++++++++++++++---------------------------------- 1 file changed, 22 insertions(+), 43 deletions(-) (limited to 'src/windows-about.adb') diff --git a/src/windows-about.adb b/src/windows-about.adb index a02a66a..13b8337 100644 --- a/src/windows-about.adb +++ b/src/windows-about.adb @@ -13,41 +13,41 @@ package body Windows.About is function Create return About_Window is - My_Width : Integer := 350; - My_Height : Integer := 250; + My_Width : constant Integer := 350; + My_Height : constant Integer := 250; - Logo_Line : Integer := 30; - Logo_Width : Integer := 50; - Logo_Height : Integer := 50; + Logo_Line : constant Integer := 30; + Logo_Width : constant Integer := 50; + Logo_Height : constant Integer := 50; - Button_Width : Integer := 140; - Button_Height : Integer := 40; + Button_Width : constant Integer := 140; + Button_Height : constant Integer := 40; - Heading_Line : Integer := 90; - Blurb_Line : Integer := 132; - Author_Line : Integer := 157; - Button_Line : Integer := 190; + Heading_Line : constant Integer := 90; + Blurb_Line : constant Integer := 132; + Author_Line : constant Integer := 157; + Button_Line : constant Integer := 190; - Heading_Size : Integer := 22; - Text_Size : Integer := 12; + Heading_Size : constant Integer := 22; + Text_Size : constant Integer := 12; - Heading_Text : String := "Adapad 0.8"; - Blurb_Text : String := "FLTK based simple text editor written in Ada"; - Author_Text : String := "Programmed by Jed Barber"; + Heading_Text : constant String := "Adapad 0.8"; + Blurb_Text : constant String := "FLTK based simple text editor written in Ada"; + Author_Text : constant String := "Programmed by Jed Barber"; begin return This : About_Window := - (WD.Double_Window'(WD.Create (0, 0, My_Width, My_Height, "About Adapad")) with + (WD.Double_Window'(WD.Forge.Create (0, 0, My_Width, My_Height, "About Adapad")) with - Picture => BX.Box'(BX.Create + Picture => BX.Box'(BX.Forge.Create ((My_Width - Logo_Width) / 2, Logo_Line, Logo_Width, Logo_Height, "")), - Heading => BX.Box'(BX.Create + Heading => BX.Box'(BX.Forge.Create (0, Heading_Line, My_Width, Heading_Size, Heading_Text)), - Blurb => BX.Box'(BX.Create + Blurb => BX.Box'(BX.Forge.Create (0, Blurb_Line, My_Width, Text_Size, Blurb_Text)), - Author => BX.Box'(BX.Create + Author => BX.Box'(BX.Forge.Create (0, Author_Line, My_Width, Text_Size, Author_Text)), - Dismiss => EN.Enter_Button'(EN.Create + Dismiss => EN.Enter_Button'(EN.Forge.Create ((My_Width - Button_Width) / 2, Button_Line, Button_Width, Button_Height, "Close"))) do @@ -68,26 +68,5 @@ package body Windows.About is end Create; - - - function Create - (X, Y, W, H : in Integer; - Label_Text : in String) - return About_Window is - begin - return Create; - end Create; - - - - - function Create - (W, H : in Integer) - return About_Window is - begin - return Create; - end Create; - - end Windows.About; -- cgit