2 * \file insetfootlike.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS.
13 #include "insetfootlike.h"
16 #include "metricsinfo.h"
17 #include "paragraph.h"
22 InsetFootlike::InsetFootlike(BufferParams const & bp)
23 : InsetCollapsable(bp)
25 LyXFont font(LyXFont::ALL_SANE);
28 font.setColor(LColor::collapsable);
33 InsetFootlike::InsetFootlike(InsetFootlike const & in)
34 : InsetCollapsable(in)
36 LyXFont font(LyXFont::ALL_SANE);
39 font.setColor(LColor::collapsable);
44 void InsetFootlike::metrics(MetricsInfo & mi, Dimension & dim) const
46 InsetCollapsable::metrics(mi, dim);
48 dim.wid = mi.base.textwidth;
53 void InsetFootlike::write(Buffer const & buf, ostream & os) const
55 os << getInsetName() << "\n";
56 InsetCollapsable::write(buf, os);
60 bool InsetFootlike::insetAllowed(InsetOld::Code code) const
62 if (code == InsetOld::FOOT_CODE || code == InsetOld::MARGIN_CODE
63 || code == InsetOld::FLOAT_CODE)
65 return InsetCollapsable::insetAllowed(code);