]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlThesaurus.h
std:: changes, stupid stuff
[lyx.git] / src / frontends / controllers / ControlThesaurus.h
1 // -*- C++ -*-
2 /**
3  * \file ControlThesaurus.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12
13 #ifndef CONTROLTHESAURUS_H
14 #define CONTROLTHESAURUS_H
15
16 #include "Dialog.h"
17 #include "Thesaurus.h"
18
19 /** A controller for Thesaurus dialogs.
20  */
21 class ControlThesaurus : public Dialog::Controller {
22 public:
23         ///
24         ControlThesaurus(Dialog &);
25         ///
26         virtual bool initialiseParams(std::string const & data);
27         ///
28         virtual void clearParams();
29         ///
30         virtual void dispatchParams() {}
31         ///
32         virtual bool isBufferDependent() const { return true; }
33
34         /// replace the particular string
35         void replace(std::string const & newstr);
36
37         /// get meanings
38         Thesaurus::Meanings const & getMeanings(std::string const & str);
39
40         /// the text
41         std::string const & text() const { return oldstr_; }
42
43 private:
44         /// last string looked up
45         std::string laststr_;
46
47         /// entries for last string
48         Thesaurus::Meanings meanings_;
49
50         /// original string
51         std::string oldstr_;
52
53         /// not needed.
54         virtual void apply() {}
55 };
56
57 #endif // CONTROLTHESAURUS_H