2 * \file InsetMathComment.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 "InsetMathComment.h"
15 #include "MathStream.h"
16 #include "MathSupport.h"
17 #include "support/std_ostream.h"
26 InsetMathComment::InsetMathComment()
31 InsetMathComment::InsetMathComment(docstring const & str)
35 asArray(str, cell(0));
39 auto_ptr<InsetBase> InsetMathComment::doClone() const
41 return auto_ptr<InsetBase>(new InsetMathComment(*this));
45 void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
47 cell(0).metrics(mi, dim);
53 void InsetMathComment::draw(PainterInfo & pi, int x, int y) const
55 cell(0).draw(pi, x + 1, y);
56 drawMarkers(pi, x, y);
60 void InsetMathComment::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
62 cell(0).metricsT(mi, dim);
66 void InsetMathComment::drawT(TextPainter & pain, int x, int y) const
68 cell(0).drawT(pain, x, y);
72 void InsetMathComment::write(WriteStream & os) const
74 os << '%' << cell(0) << "\n";
78 void InsetMathComment::maple(MapleStream & os) const
80 os << '#' << cell(0) << "\n";
84 void InsetMathComment::mathematica(MathematicaStream &) const
88 void InsetMathComment::octave(OctaveStream &) const
92 void InsetMathComment::mathmlize(MathStream & os) const
94 os << MTag("comment") << cell(0) << cell(1) << ETag("comment");
98 void InsetMathComment::infoize(odocstream & os) const