aboutsummaryrefslogtreecommitdiff
path: root/src/windows-replace.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/windows-replace.adb')
-rw-r--r--src/windows-replace.adb84
1 files changed, 42 insertions, 42 deletions
diff --git a/src/windows-replace.adb b/src/windows-replace.adb
index 5dce69e..6dd7a78 100644
--- a/src/windows-replace.adb
+++ b/src/windows-replace.adb
@@ -18,14 +18,14 @@ package body Windows.Replace is
is
use type BU.State;
type Replace_Window_Access is access all Replace_Window;
- Dialog : access Replace_Window := Replace_Window_Access (Item.Parent);
+ Dialog : constant access Replace_Window := Replace_Window_Access (Item.Parent);
begin
if Dialog.Callback /= null then
Dialog.Callback.all
- (Dialog.Find_What.Get_Value,
- Dialog.Replace_With.Get_Value,
- Dialog.Match_Case.Get_State = BU.On,
- Dialog.Replace_All.Get_State = BU.On);
+ (Dialog.Find_What.Get_Value,
+ Dialog.Replace_With.Get_Value,
+ Dialog.Match_Case.Get_State = BU.On,
+ Dialog.Replace_All.Get_State = BU.On);
end if;
end Replace_M;
@@ -35,52 +35,51 @@ package body Windows.Replace is
function Create
return Replace_Window
is
- My_Width : constant Integer := 350;
- My_Height : constant Integer := 180;
+ My_Width : constant Integer := 350;
+ My_Height : constant Integer := 180;
- Button_Width : constant Integer := 140;
- Button_Height : constant Integer := 40;
+ Button_Width : constant Integer := 140;
+ Button_Height : constant Integer := 40;
- Find_Line : constant Integer := 10;
- Replace_Line : constant Integer := 40;
- Match_Line : constant Integer := 80;
- Rep_All_Line : constant Integer := 100;
- Button_Line : constant Integer := 130;
+ Find_Line : constant Integer := 10;
+ Replace_Line : constant Integer := 40;
+ Match_Line : constant Integer := 80;
+ Rep_All_Line : constant Integer := 100;
+ Button_Line : constant Integer := 130;
- Input_Width : constant Integer := 220;
- Input_Height : constant Integer := 25;
+ Input_Width : constant Integer := 220;
+ Input_Height : constant Integer := 25;
Input_Margin_Right : constant Integer := 10;
- Check_Width : constant Integer := 100;
- Check_Height : constant Integer := 20;
+ Check_Width : constant Integer := 100;
+ Check_Height : constant Integer := 20;
Check_Margin_Left : constant Integer := 50;
- Text_Size : constant Integer := 12;
+ Text_Size : constant Integer := 12;
begin
return This : Replace_Window :=
- (WD.Double_Window'(WD.Forge.Create (0, 0, My_Width, My_Height, "Replace")) with
-
- Find_What => IP.Text_Input'(IP.Forge.Create
- (My_Width - Input_Width - Input_Margin_Right,
- Find_Line, Input_Width, Input_Height, "Find what:")),
- Replace_With => IP.Text_Input'(IP.Forge.Create
- (My_Width - Input_Width - Input_Margin_Right,
- Replace_Line, Input_Width, Input_Height, "Replace with:")),
- Match_Case => LC.Check_Button'(LC.Forge.Create
- (Check_Margin_Left, Match_Line,
- Check_Width, Check_Height, "Match case")),
- Replace_All => LC.Check_Button'(LC.Forge.Create
- (Check_Margin_Left, Rep_All_Line,
- Check_Width, Check_Height, "Replace all")),
- Cancel => BU.Button'(BU.Forge.Create
- ((My_Width - 2 * Button_Width) / 3,
- Button_Line, Button_Width, Button_Height, "Cancel")),
- Start => EN.Enter_Button'(EN.Forge.Create
- ((My_Width - 2 * Button_Width) * 2 / 3 + Button_Width,
- Button_Line, Button_Width, Button_Height, "Replace")),
-
- Callback => null) do
-
+ (WD.Forge.Create (0, 0, My_Width, My_Height, "Replace")
+ with
+ Find_What => IP.Forge.Create
+ (My_Width - Input_Width - Input_Margin_Right,
+ Find_Line, Input_Width, Input_Height, "Find what:"),
+ Replace_With => IP.Forge.Create
+ (My_Width - Input_Width - Input_Margin_Right,
+ Replace_Line, Input_Width, Input_Height, "Replace with:"),
+ Match_Case => LC.Forge.Create
+ (Check_Margin_Left, Match_Line,
+ Check_Width, Check_Height, "Match case"),
+ Replace_All => LC.Forge.Create
+ (Check_Margin_Left, Rep_All_Line,
+ Check_Width, Check_Height, "Replace all"),
+ Cancel => BU.Forge.Create
+ ((My_Width - 2 * Button_Width) / 3,
+ Button_Line, Button_Width, Button_Height, "Cancel"),
+ Start => EN.Forge.Create
+ ((My_Width - 2 * Button_Width) * 2 / 3 + Button_Width,
+ Button_Line, Button_Width, Button_Height, "Replace"),
+ Callback => null)
+ do
This.Add (This.Find_What);
This.Add (This.Replace_With);
This.Add (This.Match_Case);
@@ -110,3 +109,4 @@ package body Windows.Replace is
end Windows.Replace;
+