From defb53343417f2cc3ca28c5968322b8bd658364c Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sun, 13 Nov 2016 22:23:47 +1100 Subject: Added find next and find previous --- src/windows-find.adb | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/windows-find.adb') diff --git a/src/windows-find.adb b/src/windows-find.adb index 4f76338..394ce2d 100644 --- a/src/windows-find.adb +++ b/src/windows-find.adb @@ -28,7 +28,8 @@ package body Windows.Find is if Dialog.Callback /= null then Dialog.Callback.all (Dialog.Find_What.Get_Value, - Dialog.Match_Case.Get_State = BU.On); + Dialog.Match_Case.Get_State = BU.On, + Forward); end if; end Find_M; @@ -120,5 +121,22 @@ package body Windows.Find is end Set_Find_Callback; + + + procedure Do_Callback + (This : in Find_Window; + Dir : in Direction := Forward) + is + use type BU.State; + begin + if This.Callback /= null then + This.Callback.all + (This.Find_What.Get_Value, + This.Match_Case.Get_State = BU.On, + Dir); + end if; + end Do_Callback; + + end Windows.Find; -- cgit