#include "BufferView.h"
#include "CoordCache.h"
#include "Cursor.h"
+#include "Dimension.h"
#include "mathed/InsetMathUnknown.h"
#include "support/docstream.h"
#include "support/gettext.h"
#include "support/lassert.h"
-#include "support/lyxalgo.h"
#include <cstdlib>
MathData::MathData(Buffer * buf, const_iterator from, const_iterator to)
- : base_type(from, to), minasc_(0), mindes_(0), slevel_(0),
- sshift_(0), buffer_(buf)
+ : base_type(from, to), buffer_(buf)
{}
// This is one of the the few points where the drawing font is known,
// so that we can set the caret vertical dimensions.
- mrow.caret_ascent = min(dim.asc, fm.maxAscent());
- mrow.caret_descent = min(dim.des, fm.maxDescent());
+ mrow.caret_dim.asc = min(dim.asc, fm.maxAscent());
+ mrow.caret_dim.des = min(dim.des, fm.maxDescent());
+ mrow.caret_dim.wid = fm.lineWidth();
+
/// do the same for math cells linearized in the row
- MathRow caret_row = MathRow(mrow.caret_ascent, mrow.caret_descent);
+ MathRow caret_row = MathRow(mrow.caret_dim);
for (auto const & e : mrow)
if (e.type == MathRow::BEGIN && e.ar)
bv->setMathRow(e.ar, caret_row);
// FIXME: Abdel 16/10/2006
// This drawT() method is never used, this is dead code.
- for (const_iterator it = begin(), et = end(); it != et; ++it) {
- (*it)->drawT(pain, x, y);
- //x += (*it)->width_;
+ for (auto const & it : *this) {
+ it->drawT(pain, x, y);
+ //x += it->width_;
x += 2;
}
}
for (MathAtom const & at : *this) {
MathClass mc = at->mathClass();
if (mc != MC_UNKNOWN)
- return res = mc;
+ res = mc;
}
return res;
}