]> git.lyx.org Git - lyx.git/commit
Move some Cursor methods to CursorData
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 23 Jul 2017 16:13:33 +0000 (18:13 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 25 Oct 2017 14:20:27 +0000 (16:20 +0200)
commit02028c0b12ba94093e4e77494e7158a58f1631e5
treeea7268f624a6fbbd1ad0f9a0716e5ae223ccb986
parent785c6d4e05c86fdcf96604d68d252e6591769f0f
Move some Cursor methods to CursorData

Basically, everything that does not depend on a BufferView should move
there. Some methods that do not seem to need a BufferView, like
selHandle or IdxFirst or push actually depend on it and could not be
moved.

This allows to simplify a few uses of recordUndo helpers.

- Move some methods to DocIterator: nextMath, prevMath, getPossibleLabel,
  getEncoding;

- Move some methods to CursorData: setCursor, setCursorSelectionTo,
  (setCursorTo|normal|reset)Anchor, (set|clear)Selection,
  sel(|ection)(Begin|End), selectionAsString, info, currentState,
  (mark|clear|check)NewWordPosition, fixIfBroken, sanitize, all undo
  related methods, reset, isInside, leaveInset, current mode;

- kill some unused methods: macromode, replaceWord, setScreenPos, touch,
  markInsert, markErase;

- Move code around to group things, and add a few comments (a lot remains to be done).

This changes lead to some related changes in other classes: removal,
change of parameter.

No intended change.
16 files changed:
src/Buffer.cpp
src/Cursor.cpp
src/Cursor.h
src/CutAndPaste.cpp
src/CutAndPaste.h
src/DocIterator.cpp
src/DocIterator.h
src/Text.cpp
src/Text.h
src/insets/InsetGraphics.cpp
src/insets/InsetLabel.cpp
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathHull.h
src/mathed/InsetMathNest.cpp
src/mathed/MathData.cpp
src/mathed/MathData.h