]> git.lyx.org Git - lyx.git/blob - src/Thesaurus.h
Avoid full metrics computation with Update:FitCursor
[lyx.git] / src / Thesaurus.h
1 // -*- C++ -*-
2 /**
3  * \file Thesaurus.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  * \author Jürgen Spitzmüller
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef THESAURUS_H
14 #define THESAURUS_H
15
16 #include "support/strfwd.h"
17
18 #include <map>
19 #include <vector>
20
21 namespace lyx {
22
23 class WordLangTuple;
24
25 /**
26  * This class provides an interface to whatever thesauri we might support.
27  */
28
29 class Thesaurus
30 {
31         /// noncopyable
32         Thesaurus(Thesaurus const &);
33         void operator=(Thesaurus const &);
34 public:
35         ///
36         Thesaurus();
37         ///
38         ~Thesaurus();
39
40         typedef std::map<docstring, std::vector<docstring> > Meanings;
41
42         /**
43          * look up some text in the thesaurus
44          */
45         Meanings lookup(WordLangTuple const & wl);
46         /** check if a thesaurus for a given language \p lang is available
47          *  (installed and loaded)
48          */
49         bool thesaurusAvailable(docstring const & lang) const;
50         /// check if a thesaurus for a given language \p lang is installed
51         bool thesaurusInstalled(docstring const & lang) const;
52
53 private:
54         struct Private;
55         Private * const d;
56 };
57
58 extern Thesaurus thesaurus;
59
60
61 } // namespace lyx
62
63 #endif