]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlSearch.h
fix crash due to invalidated iterator
[lyx.git] / src / frontends / controllers / ControlSearch.h
1 // -*- C++ -*-
2 /**
3  * \file ControlSearch.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef CONTROLSEARCH_H
13 #define CONTROLSEARCH_H
14
15 #include "Dialog.h"
16
17 namespace lyx {
18 namespace frontend {
19
20 /** A controller for Search dialogs.
21  */
22 class ControlSearch : public Dialog::Controller {
23 public:
24         ControlSearch(Dialog &);
25
26         virtual bool initialiseParams(std::string const &) { return true; }
27         virtual void clearParams() {}
28         virtual void dispatchParams() {}
29         virtual bool isBufferDependent() const { return true; }
30
31         /// Searches occurence of string
32         void find(std::string const & search,
33                   bool casesensitive, bool matchword, bool forward);
34
35         /// Replaces occurence of string
36         void replace(std::string const & search, std::string const & replace,
37                      bool casesensitive, bool matchword,
38                      bool forward, bool all);
39 };
40
41 } // namespace frontend
42 } // namespace lyx
43
44 #endif // CONTROLSEARCH_H