-DispatchResult LyXText::moveRight(LCursor & cur)
-{
- if (isRTL(cur.paragraph()))
- return moveLeftIntern(cur, false, true, false);
- else
- return moveRightIntern(cur, true, true, false);
-}
-
-
-DispatchResult LyXText::moveLeft(LCursor & cur)
-{
- if (isRTL(cur.paragraph()))
- return moveRightIntern(cur, true, true, false);
- else
- return moveLeftIntern(cur, false, true, false);
-}
-
-
-DispatchResult LyXText::moveRightIntern(LCursor & cur,
- bool front, bool activate_inset, bool selecting)
-{
- if (cur.par() == cur.lastpar() && cur.pos() == cur.lastpos())
- return DispatchResult(false, FINISHED_RIGHT);
- if (activate_inset && checkAndActivateInset(cur, front))
- return DispatchResult(true, true);
- cursorRight(cur, true);
- if (!selecting)
- cur.clearSelection();
- return DispatchResult(true);
-}
-
-
-DispatchResult LyXText::moveLeftIntern(LCursor & cur,
- bool front, bool activate_inset, bool selecting)
-{
- if (cur.par() == 0 && cur.pos() == 0)
- return DispatchResult(false, FINISHED);
- cursorLeft(cur, true);
- if (!selecting)
- cur.clearSelection();
- if (activate_inset && checkAndActivateInset(cur, front))
- return DispatchResult(true, true);
- return DispatchResult(true);
-}
-
-
-DispatchResult LyXText::moveUp(LCursor & cur)
-{
- if (cur.par() == 0 && cur.crow() == 0)
- return DispatchResult(false, FINISHED_UP);
- cursorUp(cur, false);
- cur.clearSelection();
- return DispatchResult(true);
-}
-
-
-DispatchResult LyXText::moveDown(LCursor & cur)
-{
- if (cur.par() == cur.lastpar() && cur.textRow().endpos() == cur.lastpos())
- return DispatchResult(false, FINISHED_DOWN);
- cursorDown(cur, false);
- cur.clearSelection();
- return DispatchResult(true);
-}
-
-
-bool LyXText::cursorLeft(LCursor & cur, bool internal)