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 InsetFoot * result = new InsetFoot(buffer);
39 result->init(buffer, par);
45 char const * InsetFoot::EditMessage() const
47 return _("Opened Footnote Inset");
51 int InsetFoot::Latex(ostream & os, signed char fragile, bool fp) const
54 os << "\\footnotetext{";
58 int i = InsetText::Latex(os, fragile, fp);
65 void InsetFoot::Write(ostream & os) const
73 WriteParagraphData(os);
77 void InsetFoot::Read(LyXLex & lex)
81 string token = lex.GetString();
82 if (token == "collapsed") {
84 collapsed = lex.GetBool();
91 bool InsetFoot::InsertInset(BufferView * bv, Inset * inset)
93 if ((inset->LyxCode() == Inset::FOOT_CODE) ||
94 (inset->LyxCode() == Inset::MARGIN_CODE)) {
97 return InsetText::InsertInset(bv, inset);