]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
cosmetics
[lyx.git] / src / Cursor.cpp
index 160775f9de5dbdbe5c8c4c37746501464939d90b..1f1ed772667cd8f4e32dc355836c5225a507f34f 100644 (file)
@@ -97,9 +97,9 @@ namespace {
                        int xo;
                        int yo;
                        Inset const * inset = &it.inset();
-                       std::map<Inset const *, Point> const & data =
+                       std::map<Inset const *, Geometry> const & data =
                                c.bv().coordCache().getInsets().getData();
-                       std::map<Inset const *, Point>::const_iterator I = data.find(inset);
+                       std::map<Inset const *, Geometry>::const_iterator I = data.find(inset);
 
                        // FIXME: in the case where the inset is not in the cache, this
                        // means that no part of it is visible on screen. In this case
@@ -110,7 +110,7 @@ namespace {
                                return it;
                        }
 
-                       Point o = I->second;
+                       Point o = I->second.pos;
                        inset->cursorPos(c.bv(), it.top(), c.boundary(), xo, yo);
                        // Convert to absolute
                        xo += o.x_;
@@ -162,7 +162,7 @@ namespace {
                for ( ; it != et; it.forwardPos(true)) {
                        // avoid invalid nesting when selecting
                        if (!cursor.selection() || positionable(it, cursor.anchor_)) {
-                               Point p = bv_funcs::getPos(bv, it, false);
+                               Point p = bv.getPos(it, false);
                                int xo = p.x_;
                                int yo = p.y_;
                                if (xlow <= xo && xo <= xhigh && ylow <= yo && yo <= yhigh) {
@@ -218,9 +218,9 @@ namespace {
 
                for ( ; it != et; it.forwardPos()) {
                        // avoid invalid nesting when selecting
-                       if (bv_funcs::status(&bv, it) == bv_funcs::CUR_INSIDE
+                       if (bv.cursorStatus(it) == CUR_INSIDE
                            && (!cur.selection() || positionable(it, cur.anchor_))) {
-                               Point p = bv_funcs::getPos(bv, it, false);
+                               Point p = bv.getPos(it, false);
                                int xo = p.x_;
                                int yo = p.y_;
                                if (xlow <= xo && xo <= xhigh && ylow <= yo && yo <= yhigh) {
@@ -419,7 +419,7 @@ int Cursor::currentMode()
 
 void Cursor::getPos(int & x, int & y) const
 {
-       Point p = bv_funcs::getPos(bv(), *this, boundary());
+       Point p = bv().getPos(*this, boundary());
        x = p.x_;
        y = p.y_;
 }
@@ -682,7 +682,7 @@ bool Cursor::openable(MathAtom const & t) const
 }
 
 
-void Cursor::setScreenPos(int x, int y)
+void Cursor::setScreenPos(int x, int /*y*/)
 {
        setTargetX(x);
        //bruteFind(*this, x, y, 0, bv().workWidth(), 0, bv().workHeight());
@@ -1235,7 +1235,7 @@ bool Cursor::upDownInText(bool up, bool & updateNeeded)
 
        // with and without selection are handled differently
        if (!selection()) {
-               int yo = bv_funcs::getPos(bv(), *this, boundary()).y_;
+               int yo = bv().getPos(*this, boundary()).y_;
                Cursor old = *this;
                // To next/previous row
                if (up)