This commit was manufactured by cvs2svn to create tag
[lyx.git] / src / lyxfr0.h
blob923a4af19bc5f1ae04659e06ca6a94dfefa784c7
1 // -*- C++ -*-
2 #ifndef LYXFR0_H
3 #define LYXFR0_H
5 #ifdef __GNUG__
6 #pragma interface
7 #endif
9 #include FORMS_H_LOCATION
12 /**
13 LyXFindReplace0
15 This is a virtual base class. It does not handle text specific
16 items. It only manages the Find & Replace form and the variables.
18 To be added:
20 - Confirm replace lightbutton (checkbox)
22 - A history list for search and replace strings.
23 These 2 stringlists should match, so that you can replay previous replaces.
24 If you select another search string, then the first choice should be the
25 replace string you have typed before.
27 - regex searches (I'm working on that -- dnaber, 1999-02-24)
30 class LyXFindReplace0 {
31 public:
32 ///
33 LyXFindReplace0();
34 ///
35 virtual ~LyXFindReplace0() {};
37 /// Initialize internal variables and dialog
38 virtual void StartSearch();
40 // Callbacks from form
41 ///
42 virtual void SearchCancelCB();
43 ///
44 virtual bool SearchCB(bool fForward) = 0;
45 ///
46 virtual void SearchReplaceCB() = 0;
47 ///
48 virtual void SearchReplaceAllCB() = 0;
49 protected:
50 ///
51 bool fCaseSensitive;
52 /// Match complete word only.
53 bool fMatchWord;
54 /// replace buttons enabled?
55 bool fReplaceEnabled;
56 /// search string
57 string lsSearch;
59 ///
60 void SetReplaceEnabled(bool fEnabled);
61 ///
62 bool ReplaceEnabled() { return fReplaceEnabled; }
64 /// Initialize search variables from Find & Replace form
65 virtual void ReInitFromForm();
67 // Return values
68 ///
69 bool CaseSensitive() { return fCaseSensitive; }
70 ///
71 bool MatchWord() { return fMatchWord; }
72 ///
73 string const SearchString() { return lsSearch; }
74 ///
75 void SetSearchString(string const &ls);
76 ///
77 string const ReplaceString();
79 ///
80 bool ValidSearchData() { return !lsSearch.empty(); }
83 #endif