aboutsummaryrefslogtreecommitdiff
path: root/test/buttons.adb
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-02-03 14:38:29 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-02-03 14:38:29 +1300
commit2bc98da4d5b964de2d0d5e40927aa777704f2f29 (patch)
tree95b47d4e1462e96945a9b9c40e247e361144fa57 /test/buttons.adb
parente2e976c7f4716034673e5939fa9f60797bf401fd (diff)
More test programs added: button, buttons, clock, color_chooser, cursor, curve, hello
Diffstat (limited to 'test/buttons.adb')
-rw-r--r--test/buttons.adb59
1 files changed, 59 insertions, 0 deletions
diff --git a/test/buttons.adb b/test/buttons.adb
new file mode 100644
index 0000000..e93da8e
--- /dev/null
+++ b/test/buttons.adb
@@ -0,0 +1,59 @@
+
+
+-- Programmed by Jedidiah Barber
+-- Released into the public domain
+
+
+-- Another button test program functionality reproduced in Ada
+
+
+with
+
+ FLTK.Tooltips,
+ FLTK.Widgets.Buttons.Enter,
+ FLTK.Widgets.Buttons.Light.Check,
+ FLTK.Widgets.Buttons.Light.Round,
+ FLTK.Widgets.Buttons.Repeat,
+ FLTK.Widgets.Groups.Windows;
+
+
+function Buttons
+ return Integer
+is
+
+
+ package Btn renames FLTK.Widgets.Buttons;
+ package Ent renames FLTK.Widgets.Buttons.Enter;
+ package Lit renames FLTK.Widgets.Buttons.Light;
+ package Chk renames FLTK.Widgets.Buttons.Light.Check;
+ package Ond renames FLTK.Widgets.Buttons.Light.Round;
+ package Rpt renames FLTK.Widgets.Buttons.Repeat;
+ package Win renames FLTK.Widgets.Groups.Windows;
+
+
+ The_Win : Win.Window := Win.Forge.Create (320, 130);
+
+
+ Base : Btn.Button := Btn.Forge.Create (The_Win, 10, 10, 130, 30, "Fl_Button");
+
+
+ Enter : Ent.Enter_Button := Ent.Forge.Create (The_Win, 150, 10, 160, 30, "Fl_Return_Button");
+ Repeat : Rpt.Repeat_Button := Rpt.Forge.Create (The_Win, 10, 50, 130, 30, "Fl_Repeat_Button");
+ Light : Lit.Light_Button := Lit.Forge.Create (The_Win, 10, 90, 130, 30, "Fl_Light_Button");
+ Round : Ond.Round_Button := Ond.Forge.Create (The_Win, 150, 50, 160, 30, "Fl_Round_Button");
+ Check : Chk.Check_Button := Chk.Forge.Create (The_Win, 150, 90, 160, 30, "Fl_Check_Button");
+
+
+begin
+
+
+ Base.Set_Tooltip ("This is a Tooltip.");
+
+ The_Win.Show_With_Args;
+
+ return FLTK.Run;
+
+
+end Buttons;
+
+