]> git.lyx.org Git - lyx.git/blob - src/lyxfr1.h
white-space changes, removed definitions.h several enum changes because of this,...
[lyx.git] / src / lyxfr1.h
1 // -*- C++ -*-
2 #ifndef LYXFR1_H
3 #define LYXFR1_H
4
5 #ifdef __GNUG__
6 #pragma interface
7 #endif
8
9 #include FORMS_H_LOCATION
10 #include "lyxparagraph.h"
11
12 class   LyXText;
13
14 /**
15   LyXFindReplace1"
16
17   This class implements Find & Replace in LyXText texts. It is based on
18   LyXFindReplace0, which implements the form related stuff. (see lyxfr0.h)
19   */
20 class LyXFindReplace1 : public LyXFindReplace0 {
21 public:
22         ///
23         LyXFindReplace1() : LyXFindReplace0() {};
24         ///
25         ~LyXFindReplace1() {};  
26
27         /// Initialize internal variables and search form
28         virtual void StartSearch();
29
30         ///
31         virtual bool SearchCB(bool fForward);
32         ///
33         virtual void SearchReplaceCB();
34         ///
35         virtual void SearchReplaceAllCB();
36 protected:
37         /// Set by IsSearchStringInText:
38         int     iLenSelected;
39
40         /// Direction we are searching:
41         bool searchForward;
42     
43         ///
44         bool SearchForward(LyXText *lt);
45         ///
46         bool SearchBackward(LyXText *lt); 
47
48         /** Compares 2 char values. 
49         return value is
50             \begin{itemize}
51             \item > 0 if ch1 > ch2
52             \item = 0 if ch1 == ch2
53             \item < 0 if ch1 < ch2
54             \end{itemize}
55         */
56         int CompareChars(char chSearch, char chText);
57         /// returns true if the specified string is at the specified position 
58         bool IsSearchStringInText(LyXParagraph * par,
59                                   LyXParagraph::size_type pos);
60 };
61 #endif