From 1f35137574691335d63e86bf5d2b2366fc91c1ba Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Wed, 9 Nov 2016 11:32:47 +1100 Subject: Moved code for each window into its own package --- src/windows-find.ads | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/windows-find.ads (limited to 'src/windows-find.ads') diff --git a/src/windows-find.ads b/src/windows-find.ads new file mode 100644 index 0000000..b22c8aa --- /dev/null +++ b/src/windows-find.ads @@ -0,0 +1,64 @@ + + +with FLTK.Widgets.Groups.Windows.Double; +with FLTK.Widgets; -- this cannot be made private and I don't know why +private with FLTK.Widgets.Inputs; +private with FLTK.Widgets.Buttons; +private with FLTK.Widgets.Buttons.Enter; +private with FLTK.Widgets.Buttons.Light.Check; + + +package Windows.Find is + + + type Find_Window is new FLTK.Widgets.Groups.Windows.Double.Double_Window with private; + + + type Find_Callback is interface; + procedure Call + (This : in Find_Callback; + Item : in String; + Match_Case : in Boolean) is abstract; + + + function Create + return Find_Window; + + + function Create + (X, Y, W, H : in Integer; + Label_Text : in String) + return Find_Window; + + + function Create + (W, H : in Integer) + return Find_Window; + + + procedure Set_Find_Callback + (This : in out Find_Window; + Func : not null access Find_Callback'Class); + + +private + + + type Find_Marshaller is new FLTK.Widgets.Widget_Callback with null record; + overriding procedure Call + (This : in Find_Marshaller; + Item : in out FLTK.Widgets.Widget'Class); + + + type Find_Window is new FLTK.Widgets.Groups.Windows.Double.Double_Window with + record + Find_What : FLTK.Widgets.Inputs.Input; + Match_Case : FLTK.Widgets.Buttons.Light.Check.Check_Button; + Cancel : FLTK.Widgets.Buttons.Button; + Start : FLTK.Widgets.Buttons.Enter.Enter_Button; + Callback : access Find_Callback'Class; + end record; + + +end Windows.Find; + -- cgit