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)
25 : InsetCollapsable(bf)
28 LyXFont font(LyXFont::ALL_SANE);
31 font.setColor(LColor::footnote);
33 setAutoCollapse(false);
37 Inset * InsetFoot::Clone() const
39 InsetFoot * result = new InsetFoot(buffer);
40 result->init(buffer, par);
42 result->collapsed = collapsed;
47 char const * InsetFoot::EditMessage() const
49 return _("Opened Footnote Inset");
53 int InsetFoot::Latex(ostream & os, signed char fragile, bool fp) const
56 os << "\\footnotetext{";
60 int i = InsetText::Latex(os, fragile, fp);
67 void InsetFoot::Write(ostream & os) const
75 WriteParagraphData(os);
79 void InsetFoot::Read(LyXLex & lex)
83 string token = lex.GetString();
84 if (token == "collapsed") {
86 collapsed = lex.GetBool();
93 bool InsetFoot::InsertInset(BufferView * bv, Inset * inset)
95 if ((inset->LyxCode() == Inset::FOOT_CODE) ||
96 (inset->LyxCode() == Inset::MARGIN_CODE)) {
99 return InsetText::InsertInset(bv, inset);