1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright (C) 1998 The LyX Team.
8 *======================================================*/
13 #pragma implementation
16 #include "insetfoot.h"
19 #include "BufferView.h"
20 #include "lyxscreen.h"
24 InsetFoot::InsetFoot(Buffer * bf): InsetCollapsable(bf)
27 LyXFont font(LyXFont::ALL_SANE);
30 font.setColor(LColor::footnote);
32 setAutoCollapse(false);
36 InsetFoot * InsetFoot::Clone() const
38 InsetFoot * result = new InsetFoot(buffer);
43 const char * InsetFoot::EditMessage() const
45 return _("Opened Footnote Inset");
48 #ifndef USE_OSTREAM_ONLY
49 int InsetFoot::Latex(string & l, signed char fragile) const
54 l += "\\footnotetext{";
58 i = InsetText::Latex(l, fragile);
65 int InsetFoot::Latex(ostream & os, signed char fragile) const
70 os << "\\footnotetext{";
74 i = InsetText::Latex(os, fragile);
80 void InsetFoot::Write(ostream & os) const
89 WriteParagraphData(os);
92 void InsetFoot::Read(LyXLex & lex)
98 token = lex.GetString();
99 if (token == "collapsed") {
101 collapsed = lex.GetBool();
104 InsetText::Read(lex);
107 bool InsetFoot::InsertInset(BufferView *bv, Inset * inset)
109 if ((inset->LyxCode() == Inset::FOOT_CODE) ||
110 (inset->LyxCode() == Inset::MARGIN_CODE)) {
113 return InsetText::InsertInset(bv, inset);