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"
22 #include "support/LOstream.h"
26 InsetFoot::InsetFoot(Buffer * bf)
27 : InsetCollapsable(bf)
30 LyXFont font(LyXFont::ALL_SANE);
33 font.setColor(LColor::footnote);
35 setAutoCollapse(false);
40 Inset * InsetFoot::Clone() const
42 InsetFoot * result = new InsetFoot(buffer);
43 result->init(buffer, this);
45 result->collapsed = collapsed;
50 char const * InsetFoot::EditMessage() const
52 return _("Opened Footnote Inset");
56 int InsetFoot::Latex(ostream & os, bool fragile, bool fp) const
59 os << "\\footnote{"; // was footnotemark but that won't work
63 int i = InsetText::Latex(os, fragile, fp);
70 bool InsetFoot::InsertInset(BufferView * bv, Inset * inset)
72 if (!InsertInsetAllowed(inset))
75 return InsetText::InsertInset(bv, inset);
78 bool InsetFoot::InsertInsetAllowed(Inset * inset) const
80 if ((inset->LyxCode() == Inset::FOOT_CODE) ||
81 (inset->LyxCode() == Inset::MARGIN_CODE)) {
87 LyXFont InsetFoot::GetDrawFont(LyXParagraph * par, int pos) const
89 LyXFont fn = InsetCollapsable::GetDrawFont(par, pos);