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 "MathMLStream.h"
16 #include "MathSupport.h"
17 #include "support/std_ostream.h"
23 InsetMathComment::InsetMathComment()
28 InsetMathComment::InsetMathComment(string const & str)
32 asArray(lyx::from_utf8(str), cell(0));
36 auto_ptr<InsetBase> InsetMathComment::doClone() const
38 return auto_ptr<InsetBase>(new InsetMathComment(*this));
42 void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
44 cell(0).metrics(mi, dim);
50 void InsetMathComment::draw(PainterInfo & pi, int x, int y) const
52 cell(0).draw(pi, x + 1, y);
53 drawMarkers(pi, x, y);
57 void InsetMathComment::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
59 cell(0).metricsT(mi, dim);
63 void InsetMathComment::drawT(TextPainter & pain, int x, int y) const
65 cell(0).drawT(pain, x, y);
69 void InsetMathComment::write(WriteStream & os) const
71 os << '%' << cell(0) << "\n";
75 void InsetMathComment::maple(MapleStream & os) const
77 os << '#' << cell(0) << "\n";
81 void InsetMathComment::mathematica(MathematicaStream &) const
85 void InsetMathComment::octave(OctaveStream &) const
89 void InsetMathComment::mathmlize(MathMLStream & os) const
91 os << MTag("comment") << cell(0) << cell(1) << ETag("comment");
95 void InsetMathComment::infoize(std::ostream & os) const