]> git.lyx.org Git - lyx.git/blob - src/WordList.h
Avoid full metrics computation with Update:FitCursor
[lyx.git] / src / WordList.h
1 // -*- C++ -*-
2 /**
3  * \file WordList.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Stefan Schimanski
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef WORDLIST_H
13 #define WORDLIST_H
14
15 #include "support/docstring.h"
16 #include "support/mute_warning.h"
17
18 #include <memory>
19
20 namespace lyx {
21
22 class WordList {
23 public:
24         ///
25         WordList();
26         ///
27         docstring const & word(size_t idx) const;
28         ///
29         size_t size() const;
30         ///
31         void insert(docstring const & w);
32         ///
33         void remove(docstring const & w);
34
35 private:
36         struct Impl;
37         std::unique_ptr<Impl> d;
38 };
39
40 LYX_BEGIN_MUTE_GCC_WARNING(dangling-reference)
41 WordList & theWordList(std::string const & lang);
42 LYX_END_MUTE_GCC_WARNING
43
44 } // namespace lyx
45
46 #endif // WORDLIST_H