summaryrefslogtreecommitdiff
path: root/src/editor_windows.ads
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2016-10-04 00:32:30 +1100
committerJed Barber <jjbarber@y7mail.com>2016-10-04 00:32:30 +1100
commit7a84d0f3d0d181196b24795592a260e05b63fa74 (patch)
treea9801dd8ba035cd20f269d1c713def579b035027 /src/editor_windows.ads
parentff006c440b90f1fdcfc47f8d809e07fbe54951ac (diff)
Find/Replace marshalling back to Adapad Main done, some Group/Widget_Cursor stuff removed
Diffstat (limited to 'src/editor_windows.ads')
-rw-r--r--src/editor_windows.ads42
1 files changed, 34 insertions, 8 deletions
diff --git a/src/editor_windows.ads b/src/editor_windows.ads
index 6fede6d..3acec25 100644
--- a/src/editor_windows.ads
+++ b/src/editor_windows.ads
@@ -83,6 +83,13 @@ package Editor_Windows is
type Find_Window is new 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;
@@ -97,9 +104,9 @@ package Editor_Windows is
return Find_Window;
- procedure Set_Function
+ procedure Set_Find_Callback
(This : in out Find_Window;
- Func : access procedure (Item : in String));
+ Func : not null access Find_Callback'Class);
@@ -107,6 +114,13 @@ package Editor_Windows is
type Replace_Window is new Double_Window with private;
+ type Replace_Callback is interface;
+ procedure Call
+ (This : in Replace_Callback;
+ Item, Replace_With : in String;
+ Match_Case, Rep_All : in Boolean) is abstract;
+
+
function Create return Replace_Window;
@@ -121,9 +135,9 @@ package Editor_Windows is
return Replace_Window;
- procedure Set_Function
+ procedure Set_Replace_Callback
(This : in out Replace_Window;
- Func : access procedure (Item : in String));
+ Func : not null access Replace_Callback'Class);
private
@@ -161,23 +175,35 @@ private
end record;
+ type Find_Marshaller is new Widget_Callback with null record;
+ overriding procedure Call
+ (This : in Find_Marshaller;
+ Item : in out Widget'Class);
+
+
type Find_Window is new Double_Window with
record
Find_What : Input;
Match_Case : Check_Button;
Cancel : Button;
Start : Enter_Button;
- -- callback
+ Callback : access Find_Callback'Class;
end record;
+ type Replace_Marshaller is new Widget_Callback with null record;
+ overriding procedure Call
+ (This : in Replace_Marshaller;
+ Item : in out Widget'Class);
+
+
type Replace_Window is new Double_Window with
record
Find_What, Replace_With : Input;
Match_Case, Replace_All : Check_Button;
- Cancel : Button;
- Start : Enter_Button;
- -- callback
+ Cancel : Button;
+ Start : Enter_Button;
+ Callback : access Replace_Callback'Class;
end record;