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"
31 MathInset::MathInset()
35 MathInset::~MathInset()
39 int MathInset::height() const
41 return ascent() + descent();
45 std::ostream & operator<<(std::ostream & os, MathInset const & inset)
47 WriteStream wi(0, os, false);
53 MathInset::size_type MathInset::nargs() const
61 MathXArray & MathInset::xcell(idx_type)
63 lyxerr << "I don't have a cell 1\n";
68 MathXArray const & MathInset::xcell(idx_type) const
70 lyxerr << "I don't have a cell 2\n";
75 MathArray & MathInset::cell(idx_type)
77 lyxerr << "I don't have a cell 3\n";
78 return dummyCell.data_;
82 MathArray const & MathInset::cell(idx_type) const
84 lyxerr << "I don't have a cell 4\n";
85 return dummyCell.data_;
89 void MathInset::substitute(MathMacro const &)
93 bool MathInset::idxNext(idx_type &, pos_type &) const
99 bool MathInset::idxRight(idx_type &, pos_type &) const
105 bool MathInset::idxPrev(idx_type &, pos_type &) const
111 bool MathInset::idxLeft(idx_type &, pos_type &) const
117 bool MathInset::idxUp(idx_type &, pos_type &) const
123 bool MathInset::idxDown(idx_type &, pos_type &) const
129 bool MathInset::idxFirst(idx_type &, pos_type &) const
135 bool MathInset::idxFirstUp(idx_type &, pos_type &) const
141 bool MathInset::idxFirstDown(idx_type &, pos_type &) const
147 bool MathInset::idxLast(idx_type &, pos_type &) const
153 bool MathInset::idxLastUp(idx_type &, pos_type &) const
159 bool MathInset::idxLastDown(idx_type &, pos_type &) const
165 bool MathInset::idxHome(idx_type &, pos_type &) const
171 bool MathInset::idxEnd(idx_type &, pos_type &) const
177 void MathInset::idxDelete(idx_type &, bool & popit, bool & deleteit)
184 void MathInset::idxDeleteRange(idx_type, idx_type)
188 void MathInset::normalize(NormalStream & os) const
191 WriteStream wi(0, os.os_, false);
197 void MathInset::dump() const
199 lyxerr << "---------------------------------------------\n";
200 WriteStream wi(0, lyxerr, false);
202 lyxerr << "\n---------------------------------------------\n";
206 bool MathInset::covers(int, int) const
208 lyxerr << "MathInset::covers() called directly!\n";
213 void MathInset::validate(LaTeXFeatures &) const
217 std::vector<MathInset::idx_type>
218 MathInset::idxBetween(idx_type from, idx_type to) const
220 std::vector<idx_type> res;
221 for (idx_type i = from; i <= to; ++i)
227 void MathInset::metrics(MathMetricsInfo const &) const
229 lyxerr << "MathInset::metrics() called directly!\n";
233 void MathInset::draw(Painter &, int, int) const
235 lyxerr << "MathInset::draw() called directly!\n";
239 void MathInset::write(WriteStream &) const
241 lyxerr << "MathInset::write() called directly!\n";
245 void MathInset::octavize(OctaveStream & os) const
247 NormalStream ns(os.os_);
252 void MathInset::maplize(MapleStream & os) const
254 NormalStream ns(os.os_);
259 void MathInset::mathmlize(MathMLStream & os) const
261 NormalStream ns(os.os_);