]> git.lyx.org Git - lyx.git/blob - src/CompletionList.h
Avoid full metrics computation with Update:FitCursor
[lyx.git] / src / CompletionList.h
1 // -*- C++ -*-
2 /**
3  * \file CompletionList.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 COMPLETIONLIST_H
13 #define COMPLETIONLIST_H
14
15 #include "support/docstring.h"
16
17 namespace lyx {
18
19 class CompletionList {
20 public:
21         ///
22         virtual ~CompletionList() {}
23         ///
24         virtual bool sorted() const = 0;
25         ///
26         virtual size_t size() const = 0;
27         /// returns the string shown in the gui.
28         virtual lyx::docstring const & data(size_t idx) const = 0;
29         /// returns the resource string used to load an icon.
30         virtual std::string icon(size_t /*idx*/) const { return std::string(); }
31 };
32
33 } // namespace lyx
34
35 #endif
36