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"
25 InsetFoot::InsetFoot(Buffer * bf)
26 : InsetCollapsable(bf)
29 LyXFont font(LyXFont::ALL_SANE);
32 font.setColor(LColor::footnote);
34 setAutoCollapse(false);
38 Inset * InsetFoot::Clone() const
40 InsetFoot * result = new InsetFoot(buffer);
41 result->init(buffer, par);
43 result->collapsed = collapsed;
48 char const * InsetFoot::EditMessage() const
50 return _("Opened Footnote Inset");
54 int InsetFoot::Latex(ostream & os, signed char fragile, bool fp) const
57 os << "\\footnotetext{";
61 int i = InsetText::Latex(os, fragile, fp);
68 void InsetFoot::Write(ostream & os) const
76 WriteParagraphData(os);
80 void InsetFoot::Read(LyXLex & lex)
84 string token = lex.GetString();
85 if (token == "collapsed") {
87 collapsed = lex.GetBool();
94 bool InsetFoot::InsertInset(BufferView * bv, Inset * inset)
96 if ((inset->LyxCode() == Inset::FOOT_CODE) ||
97 (inset->LyxCode() == Inset::MARGIN_CODE)) {
100 return InsetText::InsertInset(bv, inset);