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"
30 MathInset::MathInset()
34 MathInset::~MathInset()
38 int MathInset::height() const
40 return ascent() + descent();
44 std::ostream & operator<<(std::ostream & os, MathInset const & inset)
46 MathWriteInfo wi(0, os, false);
52 MathInset::size_type MathInset::nargs() const
60 MathXArray & MathInset::xcell(idx_type)
62 lyxerr << "I don't have a cell 1\n";
67 MathXArray const & MathInset::xcell(idx_type) const
69 lyxerr << "I don't have a cell 2\n";
74 MathArray & MathInset::cell(idx_type)
76 lyxerr << "I don't have a cell 3\n";
77 return dummyCell.data_;
81 MathArray const & MathInset::cell(idx_type) const
83 lyxerr << "I don't have a cell 4\n";
84 return dummyCell.data_;
88 void MathInset::substitute(MathMacro const &)
92 bool MathInset::idxNext(idx_type &, pos_type &) const
98 bool MathInset::idxRight(idx_type &, pos_type &) const
104 bool MathInset::idxPrev(idx_type &, pos_type &) const
110 bool MathInset::idxLeft(idx_type &, pos_type &) const
116 bool MathInset::idxUp(idx_type &, pos_type &) const
122 bool MathInset::idxDown(idx_type &, pos_type &) const
128 bool MathInset::idxFirst(idx_type &, pos_type &) const
134 bool MathInset::idxLast(idx_type &, pos_type &) const
140 bool MathInset::idxHome(idx_type &, pos_type &) const
146 bool MathInset::idxEnd(idx_type &, pos_type &) const
152 void MathInset::idxDelete(idx_type &, bool & popit, bool & deleteit)
159 void MathInset::idxDeleteRange(idx_type, idx_type)
163 void MathInset::writeNormal(std::ostream & os) const
166 MathWriteInfo wi(0, os, false);
172 void MathInset::dump() const
174 lyxerr << "---------------------------------------------\n";
175 MathWriteInfo wi(0, lyxerr, false);
177 lyxerr << "\n---------------------------------------------\n";
181 bool MathInset::covers(int, int) const
183 lyxerr << "MathInset::covers() called directly!\n";
188 void MathInset::validate(LaTeXFeatures &) const
192 std::vector<MathInset::idx_type>
193 MathInset::idxBetween(idx_type from, idx_type to) const
195 std::vector<idx_type> res;
196 for (idx_type i = from; i <= to; ++i)
202 void MathInset::metrics(MathMetricsInfo const &) const
204 lyxerr << "MathInset::metrics() called directly!\n";
208 void MathInset::draw(Painter &, int, int) const
210 lyxerr << "MathInset::draw() called directly!\n";
214 void MathInset::write(MathWriteInfo &) const
216 lyxerr << "MathInset::write() called directly!\n";
220 string MathInset::octavize() const
229 string MathInset::maplize() const
235 string MathInset::mathmlize() const