]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_pos.C
split inset -> inset + updatableinset
[lyx.git] / src / mathed / math_pos.C
index 2c8e7e6c26253715179e7aeefb459f429f073083..3ed162d8b801c412cd8e800ed08a528d2178d27b 100644 (file)
@@ -1,15 +1,12 @@
-#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"
 
 
-using std::ostream;
-
 MathCursorPos::MathCursorPos()
        : par_(0), idx_(0), pos_(0)
 {}
@@ -37,29 +34,21 @@ MathArray & MathCursorPos::cell() const
 }
 
 
-MathXArray & MathCursorPos::xcell(MathArray::idx_type idx) const
-{
-       lyx::Assert(par_);
-       return par_->xcell(idx);
-}
-
-
-MathXArray & MathCursorPos::xcell() const
+void MathCursorPos::getPos(int & x, int & y) const
 {
-       lyx::Assert(par_);
-       return par_->xcell(idx_);
+       par_->getPos(idx_, pos_, x, y);
 }
 
 
-void MathCursorPos::getPos(int & x, int & y) const
+void MathCursorPos::setPos(MathArray::pos_type pos)
 {
-       par_->getPos(idx_, pos_, x, y);
+       pos_ = pos;
 }
 
 
-ostream & operator<<(ostream & os, MathCursorPos const & p)
+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;
 }