3 * \file ControlThesaurus.h
4 * Copyright 2001 the LyX Team
5 * Read the file COPYING
11 #ifndef CONTROLTHESAURUS_H
12 #define CONTROLTHESAURUS_H
21 #include "Thesaurus.h"
22 #include "ControlDialogs.h"
24 /** A controller for Thesaurus dialogs.
26 class ControlThesaurus : public ControlDialog<ControlConnectBD> {
29 ControlThesaurus(LyXView &, Dialogs &);
31 /// replace the particular string
32 void replace(string const & newstr);
35 virtual void showEntry(string const & str);
38 std::vector<string> getNouns(string const & str) {
39 return getEntries(str, Thesaurus::NOUN);
42 std::vector<string> getVerbs(string const & str) {
43 return getEntries(str, Thesaurus::VERB);
45 /// get adjective entries
46 std::vector<string> getAdjectives(string const & str) {
47 return getEntries(str, Thesaurus::ADJECTIVE);
49 /// get adverb entries
50 std::vector<string> getAdverbs(string const & str) {
51 return getEntries(str, Thesaurus::ADVERB);
54 std::vector<string> getOthers(string const & str) {
55 return getEntries(str, Thesaurus::OTHER);
59 string const & text() {
64 /// get entries for a str
65 std::vector<string> getEntries(string const & str, Thesaurus::POS pos);
67 /// last string looked up
70 /// entries for last string
71 std::vector<Thesaurus::ThesaurusEntry> entries_;
77 virtual void apply() {}
80 #endif // CONTROLTHESAURUS_H