3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Alejandro Aguilar Sierra
9 * Full author contact details are available in file CREDITS.
14 #include "math_inset.h"
15 #include "math_data.h"
16 #include "math_mathmlstream.h"
24 MathInset::size_type MathInset::nargs() const
32 MathArray & MathInset::cell(idx_type)
34 lyxerr << "I don't have a cell 1" << endl;
39 MathArray const & MathInset::cell(idx_type) const
41 lyxerr << "I don't have a cell 2" << endl;
46 MathInset::idx_type MathInset::index(row_type row, col_type col) const
49 lyxerr << "illegal row: " << row << endl;
51 lyxerr << "illegal col: " << col << endl;
55 void MathInset::substitute(MathMacro const &)
59 bool MathInset::idxNext(LCursor &) const
65 bool MathInset::idxRight(LCursor &) const
71 bool MathInset::idxPrev(LCursor &) const
77 bool MathInset::idxLeft(LCursor &) const
83 bool MathInset::idxUpDown(LCursor &, bool, int) const
89 bool MathInset::idxUpDown2(LCursor &, bool, int) const
95 bool MathInset::idxFirst(LCursor &) const
101 bool MathInset::idxLast(LCursor &) const
107 bool MathInset::idxHome(LCursor &) const
113 bool MathInset::idxEnd(LCursor &) const
119 void MathInset::getScreenPos(idx_type, pos_type, int & x, int & y) const
121 lyxerr << "MathInset::getScreenPos() called directly!" << endl;
126 void MathInset::dump() const
128 lyxerr << "---------------------------------------------" << endl;
129 WriteStream wi(lyxerr, false, true);
131 lyxerr << "\n---------------------------------------------" << endl;
135 bool MathInset::idxBetween(idx_type idx, idx_type from, idx_type to) const
137 return from <= idx && idx <= to;
141 void MathInset::drawSelection(PainterInfo &,
142 idx_type, pos_type, idx_type, pos_type) const
144 lyxerr << "MathInset::drawSelection() called directly!" << endl;
148 void MathInset::metricsT(TextMetricsInfo const &, Dimension &) const
151 lyxerr << "MathInset::metricsT(Text) called directly!" << endl;
156 void MathInset::drawT(TextPainter &, int, int) const
159 lyxerr << "MathInset::drawT(Text) called directly!" << endl;
165 void MathInset::write(WriteStream & os) const
167 os << '\\' << name().c_str();
168 os.pendingSpace(true);
172 void MathInset::normalize(NormalStream & os) const
174 os << '[' << name().c_str() << "] ";
178 void MathInset::octave(OctaveStream & os) const
180 NormalStream ns(os.os());
185 void MathInset::maple(MapleStream & os) const
187 NormalStream ns(os.os());
192 void MathInset::maxima(MaximaStream & os) const
194 MapleStream ns(os.os());
199 void MathInset::mathematica(MathematicaStream & os) const
201 NormalStream ns(os.os());
206 void MathInset::mathmlize(MathMLStream & os) const
208 NormalStream ns(os.os());
213 int MathInset::plaintext(std::ostream &, OutputParams const &) const
219 int MathInset::linuxdoc(std::ostream &, OutputParams const &) const
225 int MathInset::docbook(std::ostream &, OutputParams const &) const
231 string const & MathInset::getType() const
233 static string const t("none");
238 string MathInset::name() const
244 ostream & operator<<(ostream & os, MathAtom const & at)
246 WriteStream wi(os, false, false);
252 string MathInset::fileInsetLabel() const