2 * \file InsetMathFBox.C
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"
15 #include "MathStream.h"
16 #include "MathParser.h"
17 #include "MathStream.h"
20 #include "support/std_ostream.h"
21 #include "frontends/Painter.h"
29 InsetMathFBox::InsetMathFBox()
34 auto_ptr<InsetBase> InsetMathFBox::doClone() const
36 return auto_ptr<InsetBase>(new InsetMathFBox(*this));
40 InsetMath::mode_type InsetMathFBox::currentMode() const
46 void InsetMathFBox::metrics(MetricsInfo & mi, Dimension & dim) const
48 FontSetChanger dummy(mi.base, "textnormal");
49 cell(0).metrics(mi, dim);
50 metricsMarkers(dim, 3); // 1 pixel space, 1 frame, 1 space
55 void InsetMathFBox::draw(PainterInfo & pi, int x, int y) const
57 pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
58 dim_.width() - 2, dim_.height() - 2, LColor::foreground);
59 FontSetChanger dummy(pi.base, "textnormal");
60 cell(0).draw(pi, x + 3, y);
61 setPosCache(pi, x, y);
65 void InsetMathFBox::write(WriteStream & os) const
67 os << "\\fbox{" << cell(0) << '}';
71 void InsetMathFBox::normalize(NormalStream & os) const
73 os << "[fbox " << cell(0) << ']';
77 void InsetMathFBox::infoize(odocstream & os) const