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(Buffer * buf)
25 : InsetMathNest(buf, 1)
29 InsetMathComment::InsetMathComment(MathData const & ar)
30 : InsetMathNest(const_cast<Buffer *>(ar.buffer()), 1)
36 InsetMathComment::InsetMathComment(Buffer * buf, docstring const & str)
37 : InsetMathNest(buf, 1)
40 asArray(str, cell(0));
44 Inset * InsetMathComment::clone() const
46 return new InsetMathComment(*this);
50 void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
52 cell(0).metrics(mi, dim);
56 void InsetMathComment::draw(PainterInfo & pi, int x, int y) const
58 cell(0).draw(pi, x, y);
62 void InsetMathComment::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
64 cell(0).metricsT(mi, dim);
68 void InsetMathComment::drawT(TextPainter & pain, int x, int y) const
70 cell(0).drawT(pain, x, y);
74 void InsetMathComment::write(WriteStream & os) const
76 os << '%' << cell(0) << "\n";
80 void InsetMathComment::maple(MapleStream & os) const
82 os << '#' << cell(0) << "\n";
86 void InsetMathComment::mathmlize(MathStream & os) const
88 os << MTag("comment") << cell(0) << ETag("comment");
92 void InsetMathComment::htmlize(HtmlStream & os) const
94 os << "<!-- " << cell(0) << " -->";
98 void InsetMathComment::infoize(odocstream & os) const