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_mathmlstream.h"
15 #include "math_cursor.h"
18 #include "formulabase.h"
24 BufferView * MathInset::view() const
26 return mathcursor ? mathcursor->formula()->view() : 0;
30 MathInset::size_type MathInset::nargs() const
38 MathArray & MathInset::cell(idx_type)
40 lyxerr << "I don't have a cell 1" << endl;
45 MathArray const & MathInset::cell(idx_type) const
47 lyxerr << "I don't have a cell 2" << endl;
52 MathInset::idx_type MathInset::index(row_type row, col_type col) const
55 lyxerr << "illegal row: " << row << endl;
57 lyxerr << "illegal col: " << col << endl;
61 void MathInset::substitute(MathMacro const &)
65 bool MathInset::idxNext(idx_type &, pos_type &) const
71 bool MathInset::idxRight(idx_type &, pos_type &) const
77 bool MathInset::idxPrev(idx_type &, pos_type &) const
83 bool MathInset::idxLeft(idx_type &, pos_type &) const
89 bool MathInset::idxUpDown(idx_type &, pos_type &, bool, int) const
95 bool MathInset::idxUpDown2(idx_type &, pos_type &, bool, int) const
101 bool MathInset::idxFirst(idx_type &, pos_type &) const
107 bool MathInset::idxLast(idx_type &, pos_type &) const
113 bool MathInset::idxHome(idx_type &, pos_type &) const
119 bool MathInset::idxEnd(idx_type &, pos_type &) const
125 void MathInset::getPos(idx_type, pos_type, int & x, int & y) const
127 lyxerr << "MathInset::getPos() called directly!" << endl;
132 void MathInset::dump() const
134 lyxerr << "---------------------------------------------" << endl;
135 WriteStream wi(lyxerr, false, true);
137 lyxerr << "\n---------------------------------------------" << endl;
141 bool MathInset::idxBetween(idx_type idx, idx_type from, idx_type to) const
143 return from <= idx && idx <= to;
147 void MathInset::drawSelection(PainterInfo &,
148 idx_type, pos_type, idx_type, pos_type) const
150 lyxerr << "MathInset::drawSelection() called directly!" << endl;
154 void MathInset::metricsT(TextMetricsInfo const &, Dimension &) const
157 lyxerr << "MathInset::metricsT(Text) called directly!" << endl;
162 void MathInset::drawT(TextPainter &, int, int) const
165 lyxerr << "MathInset::drawT(Text) called directly!" << endl;
171 void MathInset::write(WriteStream & os) const
173 os << '\\' << name().c_str();
174 os.pendingSpace(true);
178 void MathInset::normalize(NormalStream & os) const
180 os << '[' << name().c_str() << "] ";
184 void MathInset::octave(OctaveStream & os) const
186 NormalStream ns(os.os());
191 void MathInset::maple(MapleStream & os) const
193 NormalStream ns(os.os());
198 void MathInset::maxima(MaximaStream & os) const
200 MapleStream ns(os.os());
205 void MathInset::mathematica(MathematicaStream & os) const
207 NormalStream ns(os.os());
212 void MathInset::mathmlize(MathMLStream & os) const
214 NormalStream ns(os.os());
219 int MathInset::ascii(std::ostream &, int) const
225 int MathInset::linuxdoc(std::ostream &) const
231 int MathInset::docbook(std::ostream &, bool) const
237 string const & MathInset::getType() const
239 static string const t("none");
244 string MathInset::name() const
250 ostream & operator<<(ostream & os, MathAtom const & at)
252 WriteStream wi(os, false, false);
258 string MathInset::fileInsetLabel() const