]> git.lyx.org Git - lyx.git/blob - src/FloatList.h
Avoid full metrics computation with Update:FitCursor
[lyx.git] / src / FloatList.h
1 // -*- C++ -*-
2 /**
3  * \file FloatList.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef FLOATLIST_H
13 #define FLOATLIST_H
14
15 #include "Floating.h"
16
17 #include <map>
18 #include <string>
19
20
21 namespace lyx {
22
23
24 ///
25 class FloatList {
26 public:
27         ///
28         typedef std::map<std::string, Floating> List;
29         ///
30         typedef List::const_iterator const_iterator;
31         ///
32         FloatList();
33         ///
34         const_iterator begin() const;
35         ///
36         const_iterator end() const;
37         ///
38         void newFloat(Floating const & fl);
39         ///
40         std::string const defaultPlacement(std::string const & t) const;
41         ///
42         std::string const allowedPlacement(std::string const & t) const;
43         ///
44         bool typeExist(std::string const & t) const;
45         ///
46         bool allowsWide(std::string const & t) const;
47         ///
48         bool allowsSideways(std::string const & t) const;
49         ///
50         Floating const & getType(std::string const & t) const;
51         ///
52         void erase(std::string const & t);
53         ///
54         const_iterator operator[](std::string const & t) const;
55 private:
56         ///
57         List list;
58 };
59
60
61 } // namespace lyx
62
63 #endif