]> git.lyx.org Git - lyx.git/blob - src/insets/insetfootlike.C
Don't remove cell selections after fontchange.
[lyx.git] / src / insets / insetfootlike.C
1 /* This file is part of
2  * ======================================================
3  * 
4  *           LyX, The Document Processor
5  *       
6  *          Copyright 2000-2001 The LyX Team.
7  *
8  * ======================================================
9  */
10
11 #include <config.h>
12
13 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "insetfootlike.h"
18 #include "lyxfont.h"
19 #include "buffer.h"
20 #include "lyxtext.h"
21 #include "support/LOstream.h"
22
23
24 using std::ostream;
25
26
27 InsetFootlike::InsetFootlike()
28         : InsetCollapsable()
29 {
30         LyXFont font(LyXFont::ALL_SANE);
31         font.decSize();
32         font.decSize();
33         font.setColor(LColor::collapsable);
34         setLabelFont(font);
35 }
36
37
38 InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
39         : InsetCollapsable(in, same_id)
40 {
41         LyXFont font(LyXFont::ALL_SANE);
42         font.decSize();
43         font.decSize();
44         font.setColor(LColor::collapsable);
45         setLabelFont(font);
46 }
47
48
49 void InsetFootlike::write(Buffer const * buf, ostream & os) const 
50 {
51         os << getInsetName() << "\n";
52         InsetCollapsable::write(buf, os);
53 }
54
55
56 bool InsetFootlike::insetAllowed(Inset::Code code) const
57 {
58         if ((code == Inset::FOOT_CODE) || (code == Inset::MARGIN_CODE)
59             || (code ==Inset::FLOAT_CODE))
60                 return false;
61         return InsetCollapsable::insetAllowed(code);
62 }