-#include "config.h"
-
-#include <iostream>
+#include "config.h"
#include "math_pos.h"
#include "math_inset.h"
#include "debug.h"
#include "support/LAssert.h"
+#include "support/LOstream.h"
MathCursorPos::MathCursorPos()
}
-MathXArray & MathCursorPos::xcell(MathArray::idx_type idx) const
+void MathCursorPos::getPos(int & x, int & y) const
{
- lyx::Assert(par_);
- return par_->xcell(idx);
+ par_->getPos(idx_, pos_, x, y);
}
-MathXArray & MathCursorPos::xcell() const
+void MathCursorPos::setPos(MathArray::pos_type pos)
{
- lyx::Assert(par_);
- return par_->xcell(idx_);
-}
-
-
-int MathCursorPos::xpos() const
-{
- return xcell().xo() + xcell().pos2x(pos_);
-}
-
-
-int MathCursorPos::ypos() const
-{
- return xcell().yo();
+ pos_ = pos;
}
std::ostream & operator<<(std::ostream & os, MathCursorPos const & p)
{
- os << "(par: " << p.par_ << " idx: " << p.idx_ << " pos: " << p.pos_ << ")";
+ os << "(par: " << p.par_ << " idx: " << p.idx_ << " pos: " << p.pos_ << ')';
return os;
}
return p.idx_ < q.idx_;
return p.pos_ < q.pos_;
}
-
-