From 931b27a04a5af60f297dd66288fd6163c277b181 Mon Sep 17 00:00:00 2001
From: Jed Barber
A typical FLTK Hello World program in Ada: +
A typical FLTK Hello World program in Ada:
- with
- FLTK.Widgets.Groups.Windows,
- FLTK.Widgets.Boxes;
+with
+ FLTK.Widgets.Groups.Windows,
+ FLTK.Widgets.Boxes;
- function Hello_World return Integer is
+function Hello_World return Integer is
- My_Win : FLTK.Widgets.Groups.Windows.Window :=
- FLTK.Widgets.Groups.Windows.Create (100, 100, 200, 200, "Untitled");
+ My_Win : FLTK.Widgets.Groups.Windows.Window :=
+ FLTK.Widgets.Groups.Windows.Create (100, 100, 200, 200, "Untitled");
- My_Box : FLTK.Widgets.Boxes.Box :=
- FLTK.Widgets.Boxes.Create (50, 50, 100, 100, "Hello, World!");
+ My_Box : FLTK.Widgets.Boxes.Box :=
+ FLTK.Widgets.Boxes.Create (50, 50, 100, 100, "Hello, World!");
- begin
+begin
- My_Win.Add (My_Box);
- My_Win.Show;
+ My_Win.Add (My_Box);
+ My_Win.Show;
- return FLTK.Run;
+ return FLTK.Run;
- end Hello_World;
+end Hello_World;
-
Aside from reworking the types to better fit the strongly typed philosophy of Ada, the entire library has been structured to avoid explicit heap usage. As you can see from the above example, the intended use is to -- cgit