1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 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 Inset * InsetFoot::Clone() const
38 Inset * result = new InsetFoot(buffer);
43 char const * InsetFoot::EditMessage() const
45 return _("Opened Footnote Inset");
49 int InsetFoot::Latex(ostream & os, signed char fragile, bool fp) const
52 os << "\\footnotetext{";
56 int i = InsetText::Latex(os, fragile, fp);
63 void InsetFoot::Write(ostream & os) const
71 WriteParagraphData(os);
75 void InsetFoot::Read(LyXLex & lex)
79 string token = lex.GetString();
80 if (token == "collapsed") {
82 collapsed = lex.GetBool();
89 bool InsetFoot::InsertInset(BufferView * bv, Inset * inset)
91 if ((inset->LyxCode() == Inset::FOOT_CODE) ||
92 (inset->LyxCode() == Inset::MARGIN_CODE)) {
95 return InsetText::InsertInset(bv, inset);