]> git.lyx.org Git - lyx.git/blob - src/insets/insetfootlike.C
Clean up InsetGraphics::Cache and rename as GraphicsInset.
[lyx.git] / src / insets / insetfootlike.C
1 /**
2  * \file insetfootlike.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Lars Gullik Bjønnes
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #include <config.h>
12
13 #include "insetfootlike.h"
14 #include "lyxfont.h"
15 #include "buffer.h"
16 #include "lyxtext.h"
17 #include "support/LOstream.h"
18
19
20 using std::ostream;
21
22
23 InsetFootlike::InsetFootlike(BufferParams const & bp)
24         : InsetCollapsable(bp)
25 {
26         LyXFont font(LyXFont::ALL_SANE);
27         font.decSize();
28         font.decSize();
29         font.setColor(LColor::collapsable);
30         setLabelFont(font);
31 }
32
33
34 InsetFootlike::InsetFootlike(InsetFootlike const & in)
35         : InsetCollapsable(in)
36 {
37         LyXFont font(LyXFont::ALL_SANE);
38         font.decSize();
39         font.decSize();
40         font.setColor(LColor::collapsable);
41         setLabelFont(font);
42 }
43
44
45 void InsetFootlike::write(Buffer const * buf, ostream & os) const
46 {
47         os << getInsetName() << "\n";
48         InsetCollapsable::write(buf, os);
49 }
50
51
52 bool InsetFootlike::insetAllowed(Inset::Code code) const
53 {
54         if ((code == Inset::FOOT_CODE) || (code == Inset::MARGIN_CODE)
55             || (code == Inset::FLOAT_CODE))
56                 return false;
57         return InsetCollapsable::insetAllowed(code);
58 }