2 * \file InsetMathBoldSymbol.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 "InsetMathBoldSymbol.h"
15 #include "MathStream.h"
17 #include "LaTeXFeatures.h"
24 InsetMathBoldSymbol::InsetMathBoldSymbol()
29 Inset * InsetMathBoldSymbol::clone() const
31 return new InsetMathBoldSymbol(*this);
35 void InsetMathBoldSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
37 //FontSetChanger dummy(mi.base, "mathbf");
38 cell(0).metrics(mi, dim);
40 ++dim.wid; // for 'double stroke'
41 // Cache the inset dimension.
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
59 cell(0).metricsT(mi, dim);
63 void InsetMathBoldSymbol::drawT(TextPainter & pain, int x, int y) const
65 cell(0).drawT(pain, x, y);
69 void InsetMathBoldSymbol::validate(LaTeXFeatures & features) const
71 InsetMathNest::validate(features);
72 features.require("amssymb");
76 void InsetMathBoldSymbol::write(WriteStream & os) const
78 os << "\\boldsymbol{" << cell(0) << "}";
82 void InsetMathBoldSymbol::infoize(odocstream & os) const