]> git.lyx.org Git - features.git/blob - src/insets/InsetFlex.cpp
Move some stuff from InsetFlex to InsetCollapsable, and make use of the
[features.git] / src / insets / InsetFlex.cpp
1 /**
2  * \file InsetFlex.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Angus Leeming
7  * \author Martin Vermeer
8  * \author Jürgen Spitzmüller
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #include <config.h>
14
15 #include "InsetFlex.h"
16
17 #include "Buffer.h"
18 #include "BufferParams.h"
19 #include "Lexer.h"
20
21 #include "support/gettext.h"
22
23 #include <ostream>
24
25 //#include "support/debug.h"
26 using namespace std;
27
28 namespace lyx {
29
30
31 InsetFlex::InsetFlex(Buffer const & buf, string const & layoutName)
32         : InsetCollapsable(buf), name_(layoutName)
33 {
34         // again, because now the name is initialized
35         setLayout(buf.params().documentClassPtr());
36         status_= Collapsed;
37 }
38
39
40 InsetFlex::InsetFlex(InsetFlex const & in)
41         : InsetCollapsable(in), name_(in.name_)
42 {}
43
44
45 docstring InsetFlex::editMessage() const
46 {
47         return _("Opened Flex Inset");
48 }
49
50
51 void InsetFlex::write(ostream & os) const
52 {
53         os << "Flex " <<
54                 (name_.empty() ? "undefined" : name_) << "\n";
55         InsetCollapsable::write(os);
56 }
57
58
59 } // namespace lyx