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"
21 #include "support/LOstream.h"
25 InsetFoot::InsetFoot(Buffer * bf)
26 : InsetCollapsable(bf)
29 LyXFont font(LyXFont::ALL_SANE);
32 font.setColor(LColor::footnote);
34 setAutoCollapse(false);
39 Inset * InsetFoot::Clone() const
41 InsetFoot * result = new InsetFoot(buffer);
42 result->init(buffer, this);
44 result->collapsed = collapsed;
49 char const * InsetFoot::EditMessage() const
51 return _("Opened Footnote Inset");
55 int InsetFoot::Latex(ostream & os, bool fragile, bool fp) const
57 os << "\\footnote{%" << endl;
59 int i = InsetText::Latex(os, fragile, fp);
66 bool InsetFoot::InsertInset(BufferView * bv, Inset * inset)
68 if (!InsertInsetAllowed(inset))
71 return InsetText::InsertInset(bv, inset);
74 bool InsetFoot::InsertInsetAllowed(Inset * inset) const
76 if ((inset->LyxCode() == Inset::FOOT_CODE) ||
77 (inset->LyxCode() == Inset::MARGIN_CODE)) {
83 LyXFont InsetFoot::GetDrawFont(LyXParagraph * par, int pos) const
85 LyXFont fn = InsetCollapsable::GetDrawFont(par, pos);