]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlThesaurus.h
This file is part of LyX, the document processor.
[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 #ifdef __GNUG__
17 #pragma interface
18 #endif
19
20 #include <vector>
21
22 #include "LString.h"
23 #include "Thesaurus.h"
24 #include "ControlDialog_impl.h"
25
26 /** A controller for Thesaurus dialogs.
27  */
28 class ControlThesaurus : public ControlDialogBD {
29 public:
30         ///
31         ControlThesaurus(LyXView &, Dialogs &);
32
33         /// replace the particular string
34         void replace(string const & newstr);
35
36         /// show dialog
37         virtual void showEntry(string const & str);
38
39         /// get meanings
40         Thesaurus::Meanings const & getMeanings(string const & str);
41
42         /// the text
43         string const & text() {
44                 return oldstr_;
45         }
46
47 private:
48         /// last string looked up
49         string laststr_;
50
51         /// entries for last string
52         Thesaurus::Meanings meanings_;
53
54         /// original string
55         string oldstr_;
56
57         /// not needed.
58         virtual void apply() {}
59 };
60
61 #endif // CONTROLTHESAURUS_H