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
22 #include "math_inset.h"
23 #include "math_scriptinset.h"
27 MathInset::MathInset()
31 MathInset::~MathInset()
35 int MathInset::height() const
37 return ascent() + descent();
41 std::ostream & operator<<(std::ostream & os, MathInset const & inset)
43 MathWriteInfo wi(0, 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 void MathInset::substitute(MathMacro const &)
89 bool MathInset::idxNext(idx_type &, pos_type &) const
95 bool MathInset::idxRight(idx_type &, pos_type &) const
101 bool MathInset::idxPrev(idx_type &, pos_type &) const
107 bool MathInset::idxLeft(idx_type &, pos_type &) const
113 bool MathInset::idxUp(idx_type &, pos_type &) const
119 bool MathInset::idxDown(idx_type &, pos_type &) const
125 bool MathInset::idxFirst(idx_type &, pos_type &) const
131 bool MathInset::idxLast(idx_type &, pos_type &) const
137 bool MathInset::idxHome(idx_type &, pos_type &) const
143 bool MathInset::idxEnd(idx_type &, pos_type &) const
149 void MathInset::idxDelete(idx_type &, bool & popit, bool & deleteit)
156 void MathInset::idxDeleteRange(idx_type, idx_type)
160 void MathInset::writeNormal(std::ostream & os) const
163 MathWriteInfo wi(0, os, false);
169 void MathInset::dump() const
171 lyxerr << "---------------------------------------------\n";
172 MathWriteInfo wi(0, lyxerr, false);
174 lyxerr << "\n---------------------------------------------\n";
178 bool MathInset::covers(int x, int y) const
180 lyxerr << "MathInset::covers() called directly!\n";
185 void MathInset::validate(LaTeXFeatures &) const
189 std::vector<MathInset::idx_type>
190 MathInset::idxBetween(idx_type from, idx_type to) const
192 std::vector<idx_type> res;
193 for (idx_type i = from; i <= to; ++i)
199 void MathInset::metrics(MathMetricsInfo const &) const
201 lyxerr << "MathInset::metrics() called directly!\n";
205 void MathInset::draw(Painter &, int, int) const
207 lyxerr << "MathInset::draw() called directly!\n";
211 void MathInset::write(MathWriteInfo &) const
213 lyxerr << "MathInset::write() called directly!\n";