summaryrefslogtreecommitdiff
path: root/src/windows-find.ads
blob: b22c8aa5e4d1b0bb3a90d71e7e8b496777f313b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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;