2 * \file InsetMathFBox.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "InsetMathFBox.h"
14 #include "MathArray.h"
15 #include "MathStream.h"
18 #include "support/std_ostream.h"
19 #include "frontends/Painter.h"
27 InsetMathFBox::InsetMathFBox()
32 auto_ptr<InsetBase> InsetMathFBox::doClone() const
34 return auto_ptr<InsetBase>(new InsetMathFBox(*this));
38 InsetMath::mode_type InsetMathFBox::currentMode() const
44 bool InsetMathFBox::metrics(MetricsInfo & mi, Dimension & dim) const
46 FontSetChanger dummy(mi.base, "textnormal");
47 cell(0).metrics(mi, dim);
48 metricsMarkers(dim, 3); // 1 pixel space, 1 frame, 1 space
56 void InsetMathFBox::draw(PainterInfo & pi, int x, int y) const
58 pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
59 dim_.width() - 2, dim_.height() - 2, LColor::foreground);
60 FontSetChanger dummy(pi.base, "textnormal");
61 cell(0).draw(pi, x + 3, y);
62 setPosCache(pi, x, y);
66 void InsetMathFBox::write(WriteStream & os) const
68 os << "\\fbox{" << cell(0) << '}';
72 void InsetMathFBox::normalize(NormalStream & os) const
74 os << "[fbox " << cell(0) << ']';
78 void InsetMathFBox::infoize(odocstream & os) const