]> git.lyx.org Git - lyx.git/blob - src/lyxfr0.h
update all .po files ot latestes pot
[lyx.git] / src / lyxfr0.h
1 // -*- C++ -*-
2 #ifndef LYXFR0_H
3 #define LYXFR0_H
4
5 #ifdef __GNUG__
6 #pragma interface
7 #endif
8
9 #include "LString.h"
10 #include FORMS_H_LOCATION
11 #include "form1.h"
12
13 class LyXFindReplace;
14
15 /**
16    The comments below are most likely not valied anymore since
17    the rewrite of LyXFindReplace0 and LyXFindReplace1. (Lgb)
18    
19   LyXFindReplace0
20  
21   This is a virtual base class. It does not handle text specific
22   items. It only manages the Find & Replace form and the variables.
23   
24   To be added:
25
26   - Confirm replace lightbutton (checkbox)
27
28   - A history list for search and replace strings.
29   These 2 stringlists should match, so that you can replay previous replaces.
30   If you select another search string, then the first choice should be the 
31   replace string you have typed before.
32   
33   - regex searches (I'm working on that -- dnaber, 1999-02-24)
34
35 */
36 class SearchForm {
37 public:
38         ///
39         SearchForm();
40         ///
41         ~SearchForm();  
42         
43         ///
44         bool CaseSensitive() const {
45                 return fl_get_button(search_form->btnCaseSensitive);
46         }
47
48         ///
49         bool MatchWord() const {
50                 return fl_get_button(search_form->btnMatchWord);
51         }
52
53         ///
54         string const SearchString() const {
55                 return fl_get_input(search_form->input_search);
56         }
57
58         /// Initialize internal variables and dialog
59         void StartSearch(LyXFindReplace *);
60
61         ///
62         void replaceEnabled(bool fEnabled);
63         ///
64         bool replaceEnabled() const { return fReplaceEnabled; }
65
66         // Callbacks from form
67         ///
68         void SearchCancelCB();
69
70         // Return values
71         ///
72         void SetSearchString(string const & ls);
73         ///
74         string const ReplaceString() const;
75
76         ///
77         bool ValidSearchData() const { return !(SearchString().empty()); }
78 private:
79         ///
80         FD_form_search * search_form;
81         /// replace buttons enabled?
82         bool fReplaceEnabled;
83 };
84
85 #endif