]> git.lyx.org Git - lyx.git/blob - src/insets/insetfootlike.C
604f8465b915438989a2ae15f4d7ec2eb3b64855
[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
14 #include "insetfootlike.h"
15 #include "lyxfont.h"
16 #include "buffer.h"
17 #include "lyxtext.h"
18 #include "support/LOstream.h"
19
20
21 using std::ostream;
22
23
24 InsetFootlike::InsetFootlike(BufferParams const & bp)
25         : InsetCollapsable(bp)
26 {
27         LyXFont font(LyXFont::ALL_SANE);
28         font.decSize();
29         font.decSize();
30         font.setColor(LColor::collapsable);
31         setLabelFont(font);
32 }
33
34
35 InsetFootlike::InsetFootlike(InsetFootlike const & in)
36         : InsetCollapsable(in)
37 {
38         LyXFont font(LyXFont::ALL_SANE);
39         font.decSize();
40         font.decSize();
41         font.setColor(LColor::collapsable);
42         setLabelFont(font);
43 }
44
45
46 // InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
47 //      : InsetCollapsable(in, same_id)
48 // {
49 //      LyXFont font(LyXFont::ALL_SANE);
50 //      font.decSize();
51 //      font.decSize();
52 //      font.setColor(LColor::collapsable);
53 //      setLabelFont(font);
54 // }
55
56
57 void InsetFootlike::write(Buffer const * buf, ostream & os) const
58 {
59         os << getInsetName() << "\n";
60         InsetCollapsable::write(buf, os);
61 }
62
63
64 bool InsetFootlike::insetAllowed(Inset::Code code) const
65 {
66         if ((code == Inset::FOOT_CODE) || (code == Inset::MARGIN_CODE)
67             || (code == Inset::FLOAT_CODE))
68                 return false;
69         return InsetCollapsable::insetAllowed(code);
70 }