2 * \file InsetMathComment.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 "InsetMathComment.h"
16 #include "MathStream.h"
17 #include "MathSupport.h"
24 InsetMathComment::InsetMathComment()
29 InsetMathComment::InsetMathComment(docstring const & str)
33 asArray(str, cell(0));
37 Inset * InsetMathComment::clone() const
39 return new InsetMathComment(*this);
43 void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
45 cell(0).metrics(mi, dim);
47 // Cache the inset dimension.
52 void InsetMathComment::draw(PainterInfo & pi, int x, int y) const
54 cell(0).draw(pi, x + 1, y);
55 drawMarkers(pi, x, y);
59 void InsetMathComment::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
61 cell(0).metricsT(mi, dim);
65 void InsetMathComment::drawT(TextPainter & pain, int x, int y) const
67 cell(0).drawT(pain, x, y);
71 void InsetMathComment::write(WriteStream & os) const
73 os << '%' << cell(0) << "\n";
77 void InsetMathComment::maple(MapleStream & os) const
79 os << '#' << cell(0) << "\n";
83 void InsetMathComment::mathematica(MathematicaStream &) const
87 void InsetMathComment::octave(OctaveStream &) const
91 void InsetMathComment::mathmlize(MathStream & os) const
93 os << MTag("comment") << cell(0) << cell(1) << ETag("comment");
97 void InsetMathComment::infoize(odocstream & os) const