3 * Purpose: Implementation of insets for mathed
4 * Author: Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
5 * Created: January 1996
8 * Dependencies: Xlib, XForms
10 * Copyright: 1996, 1997 Alejandro Aguilar Sierra
14 * You are free to use and modify this code under the terms of
15 * the GNU General Public Licence version 2 or later.
19 #pragma implementation
25 #include "math_inset.h"
26 #include "math_scriptinset.h"
27 #include "math_mathmlstream.h"
35 int MathInset::height() const
37 return ascent() + descent();
41 ostream & operator<<(ostream & os, MathInset const & inset)
43 WriteStream wi(os, false);
49 MathInset::size_type MathInset::nargs() const
57 MathXArray & MathInset::xcell(idx_type)
59 lyxerr << "I don't have a cell 1\n";
64 MathXArray const & MathInset::xcell(idx_type) const
66 lyxerr << "I don't have a cell 2\n";
71 MathArray & MathInset::cell(idx_type)
73 lyxerr << "I don't have a cell 3\n";
74 return dummyCell.data_;
78 MathArray const & MathInset::cell(idx_type) const
80 lyxerr << "I don't have a cell 4\n";
81 return dummyCell.data_;
85 MathInset::idx_type MathInset::index(row_type row, col_type col) const
88 lyxerr << "illegal row: " << row << "\n";
90 lyxerr << "illegal col: " << col << "\n";
94 void MathInset::substitute(MathMacro const &)
98 bool MathInset::idxNext(idx_type &, pos_type &) const
104 bool MathInset::idxRight(idx_type &, pos_type &) const
110 bool MathInset::idxPrev(idx_type &, pos_type &) const
116 bool MathInset::idxLeft(idx_type &, pos_type &) const
122 bool MathInset::idxUp(idx_type &) const
128 bool MathInset::idxDown(idx_type &) const
134 bool MathInset::idxFirst(idx_type &, pos_type &) const
140 bool MathInset::idxLast(idx_type &, pos_type &) const
146 bool MathInset::idxHome(idx_type &, pos_type &) const
152 bool MathInset::idxEnd(idx_type &, pos_type &) const
158 void MathInset::idxDelete(idx_type &, bool & popit, bool & deleteit)
165 void MathInset::normalize(NormalStream & os) const
168 WriteStream wi(os.os(), false);
174 void MathInset::dump() const
176 lyxerr << "---------------------------------------------\n";
177 WriteStream wi(lyxerr, false);
179 lyxerr << "\n---------------------------------------------\n";
183 void MathInset::validate(LaTeXFeatures &) const
187 vector<MathInset::idx_type>
188 MathInset::idxBetween(idx_type from, idx_type to) const
190 vector<idx_type> res;
191 for (idx_type i = from; i <= to; ++i)
197 void MathInset::metrics(MathMetricsInfo const &) const
199 lyxerr << "MathInset::metrics() called directly!\n";
203 void MathInset::draw(Painter &, int, int) const
205 lyxerr << "MathInset::draw() called directly!\n";
209 void MathInset::write(WriteStream &) const
211 lyxerr << "MathInset::write() called directly!\n";
215 void MathInset::octavize(OctaveStream & os) const
217 NormalStream ns(os.os());
222 void MathInset::maplize(MapleStream & os) const
224 NormalStream ns(os.os());
229 void MathInset::mathmlize(MathMLStream & os) const
231 NormalStream ns(os.os());