aboutsummaryrefslogtreecommitdiff
path: root/src/windows-replace.ads
blob: 1290a46f6e7d650dd361eab9f2f694ab3c93b32d (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


--  Programmed by Jedidiah Barber
--  Licensed under the Sunset License v1.0

--  See license.txt for further details


private with

    FLTK.Widgets.Inputs.Text,
    FLTK.Widgets.Buttons.Enter,
    FLTK.Widgets.Buttons.Light.Check;


package Windows.Replace is


    type Replace_Window is new Window with private;

    type Replace_Callback is access procedure
           (Item, Replace_With  : in String;
            Match_Case, Rep_All : in Boolean);




    function Create
        return Replace_Window;




    procedure Set_Replace_Callback
           (This : in out Replace_Window;
            Func : in     Replace_Callback);


private


    type Replace_Window is new Window with record
        Find_What, Replace_With : FLTK.Widgets.Inputs.Text.Text_Input;
        Match_Case, Replace_All : FLTK.Widgets.Buttons.Light.Check.Check_Button;
        Cancel                  : FLTK.Widgets.Buttons.Button;
        Start                   : FLTK.Widgets.Buttons.Enter.Enter_Button;
        Callback                : Replace_Callback;
    end record;


end Windows.Replace;