This commit was manufactured by cvs2svn to create tag
[lyx.git] / src / lyxfr1.h
blobf05a44aa4e2650b979fd06ffa1c4257ccf98037a
1 // -*- C++ -*-
2 #ifndef LYXFR1_H
3 #define LYXFR1_H
5 #ifdef __GNUG__
6 #pragma interface
7 #endif
9 #include FORMS_H_LOCATION
10 #include "lyxparagraph.h"
12 class LyXText;
14 /**
15 LyXFindReplace1"
17 This class implements Find & Replace in LyXText texts. It is based on
18 LyXFindReplace0, which implements the form related stuff. (see lyxfr0.h)
20 class LyXFindReplace1 : public LyXFindReplace0 {
21 public:
22 ///
23 LyXFindReplace1() : LyXFindReplace0() {};
24 ///
25 ~LyXFindReplace1() {};
27 /// Initialize internal variables and search form
28 virtual void StartSearch();
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;
40 /// Direction we are searching:
41 bool searchForward;
43 ///
44 bool SearchForward(LyXText *lt);
45 ///
46 bool SearchBackward(LyXText *lt);
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}
56 int CompareChars(char chSearch, char chText);
57 #ifdef NEW_TEXT
58 /// returns true if the specified string is at the specified position
59 bool IsSearchStringInText(LyXParagraph * par, LyXParagraph::size_type pos);
60 #else
61 /// returns true if the specified string is at the specified position
62 bool IsSearchStringInText(LyXParagraph * par, int pos);
63 #endif
65 #endif