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_mathmlstream.h"
16 #include "math_cursor.h"
19 #include "formulabase.h"
25 BufferView * MathInset::view() const
27 return mathcursor ? mathcursor->formula()->view() : 0;
31 MathInset::size_type MathInset::nargs() const
39 MathArray & MathInset::cell(idx_type)
41 lyxerr << "I don't have a cell 1" << endl;
46 MathArray const & MathInset::cell(idx_type) const
48 lyxerr << "I don't have a cell 2" << endl;
53 MathInset::idx_type MathInset::index(row_type row, col_type col) const
56 lyxerr << "illegal row: " << row << endl;
58 lyxerr << "illegal col: " << col << endl;
62 void MathInset::substitute(MathMacro const &)
66 bool MathInset::idxNext(idx_type &, pos_type &) const
72 bool MathInset::idxRight(idx_type &, pos_type &) const
78 bool MathInset::idxPrev(idx_type &, pos_type &) const
84 bool MathInset::idxLeft(idx_type &, pos_type &) const
90 bool MathInset::idxUpDown(idx_type &, pos_type &, bool, int) const
96 bool MathInset::idxUpDown2(idx_type &, pos_type &, bool, int) const
102 bool MathInset::idxFirst(idx_type &, pos_type &) const
108 bool MathInset::idxLast(idx_type &, pos_type &) const
114 bool MathInset::idxHome(idx_type &, pos_type &) const
120 bool MathInset::idxEnd(idx_type &, pos_type &) const
126 void MathInset::getPos(idx_type, pos_type, int & x, int & y) const
128 lyxerr << "MathInset::getPos() called directly!" << endl;
133 void MathInset::dump() const
135 lyxerr << "---------------------------------------------" << endl;
136 WriteStream wi(lyxerr, false, true);
138 lyxerr << "\n---------------------------------------------" << endl;
142 bool MathInset::idxBetween(idx_type idx, idx_type from, idx_type to) const
144 return from <= idx && idx <= to;
148 void MathInset::drawSelection(PainterInfo &,
149 idx_type, pos_type, idx_type, pos_type) const
151 lyxerr << "MathInset::drawSelection() called directly!" << endl;
155 void MathInset::metricsT(TextMetricsInfo const &, Dimension &) const
158 lyxerr << "MathInset::metricsT(Text) called directly!" << endl;
163 void MathInset::drawT(TextPainter &, int, int) const
166 lyxerr << "MathInset::drawT(Text) called directly!" << endl;
172 void MathInset::write(WriteStream & os) const
174 os << '\\' << name().c_str();
175 os.pendingSpace(true);
179 void MathInset::normalize(NormalStream & os) const
181 os << '[' << name().c_str() << "] ";
185 void MathInset::octave(OctaveStream & os) const
187 NormalStream ns(os.os());
192 void MathInset::maple(MapleStream & os) const
194 NormalStream ns(os.os());
199 void MathInset::maxima(MaximaStream & os) const
201 MapleStream ns(os.os());
206 void MathInset::mathematica(MathematicaStream & os) const
208 NormalStream ns(os.os());
213 void MathInset::mathmlize(MathMLStream & os) const
215 NormalStream ns(os.os());
220 int MathInset::ascii(std::ostream &, int) const
226 int MathInset::linuxdoc(std::ostream &) const
232 int MathInset::docbook(std::ostream &, bool) const
238 string const & MathInset::getType() const
240 static string const t("none");
245 string MathInset::name() const
251 ostream & operator<<(ostream & os, MathAtom const & at)
253 WriteStream wi(os, false, false);
259 string MathInset::fileInsetLabel() const