7 #include "math_fboxinset.h"
8 #include "math_support.h"
9 #include "math_mathmlstream.h"
10 #include "frontends/Painter.h"
14 MathFboxInset::MathFboxInset()
19 MathInset * MathFboxInset::clone() const
21 return new MathFboxInset(*this);
25 void MathFboxInset::metrics(MathMetricsInfo & mi) const
27 MathFontSetChanger dummy(mi.base, "textnormal");
28 dim_ = xcell(0).metrics(mi);
29 metricsMarkers2(5); // 5 pixels margin
33 void MathFboxInset::draw(MathPainterInfo & pi, int x, int y) const
35 MathFontSetChanger dummy(pi.base, "textnormal");
36 pi.pain.rectangle(x + 1, y - ascent() + 1, width() - 2, height() - 2,
38 xcell(0).draw(pi, x + 5, y);
42 void MathFboxInset::write(WriteStream & os) const
44 os << "\\fbox{" << cell(0) << '}';
48 void MathFboxInset::normalize(NormalStream & os) const
50 os << "[fbox " << cell(0) << ']';