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