3 * \file ControlThesaurus.h
4 * Copyright 2001 the LyX Team
5 * Read the file COPYING
11 #ifndef CONTROLTHESAURUS_H
12 #define CONTROLTHESAURUS_H
22 #include "Thesaurus.h"
23 #include "ControlDialogs.h"
25 /** A controller for Thesaurus dialogs.
27 class ControlThesaurus : public ControlDialog<ControlConnectBD> {
30 ControlThesaurus(LyXView &, Dialogs &);
32 /// replace the particular string
33 void replace(string const & newstr);
36 virtual void showEntry(string const & str);
39 std::vector<string> getNouns(string const & str) {
40 return getEntries(str, Thesaurus::NOUN);
43 std::vector<string> getVerbs(string const & str) {
44 return getEntries(str, Thesaurus::VERB);
46 /// get adjective entries
47 std::vector<string> getAdjectives(string const & str) {
48 return getEntries(str, Thesaurus::ADJECTIVE);
50 /// get adverb entries
51 std::vector<string> getAdverbs(string const & str) {
52 return getEntries(str, Thesaurus::ADVERB);
55 std::vector<string> getOthers(string const & str) {
56 return getEntries(str, Thesaurus::OTHER);
60 string const & text() {
65 /// get entries for a str
66 std::vector<string> getEntries(string const & str, Thesaurus::POS pos);
68 /// last string looked up
71 /// entries for last string
72 std::vector<Thesaurus::ThesaurusEntry> entries_;
78 virtual void apply() {}
81 #endif // CONTROLTHESAURUS_H