2 * \file InsetMathBoldSymbol.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 "InsetMathBoldSymbol.h"
14 #include "MathStream.h"
16 #include "LaTeXFeatures.h"
17 #include "support/std_ostream.h"
25 InsetMathBoldSymbol::InsetMathBoldSymbol()
30 auto_ptr<InsetBase> InsetMathBoldSymbol::doClone() const
32 return auto_ptr<InsetBase>(new InsetMathBoldSymbol(*this));
36 void InsetMathBoldSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
38 //FontSetChanger dummy(mi.base, "mathbf");
39 cell(0).metrics(mi, dim);
41 ++dim.wid; // for 'double stroke'
46 void InsetMathBoldSymbol::draw(PainterInfo & pi, int x, int y) const
48 //FontSetChanger dummy(pi.base, "mathbf");
49 cell(0).draw(pi, x + 1, y);
50 cell(0).draw(pi, x + 2, y);
51 drawMarkers(pi, x, y);
55 void InsetMathBoldSymbol::metricsT(TextMetricsInfo const & mi, Dimension & /*dim*/) const
57 cell(0).metricsT(mi, dim_);
61 void InsetMathBoldSymbol::drawT(TextPainter & pain, int x, int y) const
63 cell(0).drawT(pain, x, y);
67 void InsetMathBoldSymbol::validate(LaTeXFeatures & features) const
69 InsetMathNest::validate(features);
70 features.require("amssymb");
74 void InsetMathBoldSymbol::write(WriteStream & os) const
76 os << "\\boldsymbol{" << cell(0) << "}";
80 void InsetMathBoldSymbol::infoize(odocstream & os) const