2 * \file InsetMathBM.cpp
\r
3 * This file is part of LyX, the document processor.
\r
4 * Licence details can be found in the file COPYING.
\r
6 * \author Bernhard Roider
\r
8 * Full author contact details are available in file CREDITS.
\r
13 #include "InsetMathBM.h"
\r
15 #include "MathStream.h"
\r
16 #include "MathData.h"
\r
17 #include "LaTeXFeatures.h"
\r
24 InsetMathBM::InsetMathBM()
\r
29 Inset * InsetMathBM::clone() const
\r
31 return new InsetMathBM(*this);
\r
35 void InsetMathBM::metrics(MetricsInfo & mi, Dimension & dim) const
\r
37 //FontSetChanger dummy(mi.base, "mathbf");
\r
38 cell(0).metrics(mi, dim);
\r
39 metricsMarkers(dim);
\r
40 ++dim.wid; // for 'double stroke'
\r
44 void InsetMathBM::draw(PainterInfo & pi, int x, int y) const
\r
46 //FontSetChanger dummy(pi.base, "mathbf");
\r
47 cell(0).draw(pi, x + 1, y);
\r
48 cell(0).draw(pi, x + 2, y);
\r
49 drawMarkers(pi, x, y);
\r
53 void InsetMathBM::metricsT(TextMetricsInfo const & mi, Dimension & /*dim*/) const
\r
57 cell(0).metricsT(mi, dim);
\r
61 void InsetMathBM::drawT(TextPainter & pain, int x, int y) const
\r
63 cell(0).drawT(pain, x, y);
\r
67 void InsetMathBM::validate(LaTeXFeatures & features) const
\r
69 InsetMathNest::validate(features);
\r
70 features.require("bm");
\r
74 void InsetMathBM::write(WriteStream & os) const
\r
76 os << "\\bm{" << cell(0) << "}";
\r
80 void InsetMathBM::infoize(odocstream & os) const
\r