]> git.lyx.org Git - features.git/blob - src/Floating.h
d47cb7d38a295dbab5e377d9d331664ba7918f6c
[features.git] / src / Floating.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *
7  *           Copyright 1998-2000 The LyX Team.
8  *
9  * ======================================================
10  */
11
12 #ifndef FLOATING_H
13 #define FLOATING_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 /** This is a "float layout" object. It contains the parameters for how to
20     handle the different kinds of floats, default ones and user created ones.
21     Objects of this class is stored in a container in FloatList. The different
22     InsetFloat(s) have a pointer/reference through the name of the Floating
23     so that it knows how the different floats should be handled.
24 */
25 class Floating {
26 public:
27         ///
28         Floating();
29         ///
30         Floating(string const & type, string const & placement,
31                  string const & ext, string const & within,
32                  string const & style, string const & name,
33                  bool builtin = false);
34         ///
35         string const & type() const;
36         ///
37         string const & placement() const;
38         ///
39         string const & name() const;
40         ///
41         bool builtin() const;
42 private:
43         ///
44         string type_;
45         ///
46         string placement_;
47         ///
48         string ext_;
49         ///
50         string within_;
51         ///
52         string style_;
53         ///
54         string name_;
55         ///
56         bool builtin_;
57 };
58
59
60 inline
61 Floating::Floating() 
62 {}
63
64
65 inline
66 Floating::Floating(string const & type, string const & placement,
67                    string const & ext, string const & within,
68                    string const & style, string const & name,
69                    bool builtin)
70         : type_(type), placement_(placement), ext_(ext), within_(within),
71           style_(style), name_(name), builtin_(builtin)
72 {}
73
74
75 inline
76 string const & Floating::type() const
77 {
78         return type_;
79 }
80
81
82 inline
83 string const & Floating::placement() const
84 {
85         return placement_;
86 }
87
88
89 inline
90 string const & Floating::name() const
91 {
92         return name_;
93 }
94
95
96 inline
97 bool Floating::builtin() const
98 {
99         return builtin_;
100 }
101
102 #endif