aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-06-16 13:11:03 +1000
committerNeil <nyamatongwe@gmail.com>2015-06-16 13:11:03 +1000
commitdfa87cc18cc453a12113a53671c75c8461f437d8 (patch)
treea1469092ecb9c9066eb00e29604115e3db76ef1d /src/Editor.h
parentf1bd8d5f4ac8a741df0b10000f09345752f6e6af (diff)
downloadscintilla-mirror-dfa87cc18cc453a12113a53671c75c8461f437d8.tar.gz
Clean up some selection operations. Commonly when changing selection modes,
all of the selection needs to be redrawn so that is implmeneted in Editor::InvalidateWholeSelection. Any extra selections should be discarded with only the main remaining so that is Selection::DropAdditionalRanges. Some default parameters led to less clarity so they no longer have default values. Both Editor::MovePositionTo methods always returned 0 which was ignored so they are now void. Some variables were made const.
Diffstat (limited to 'src/Editor.h')
-rw-r--r--src/Editor.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Editor.h b/src/Editor.h
index b08fc7159..3301c4b05 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -313,6 +313,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
void SetRectangularRange();
void ThinRectangularRange();
void InvalidateSelection(SelectionRange newMain, bool invalidateWholeSelection=false);
+ void InvalidateWholeSelection();
void SetSelection(SelectionPosition currentPos_, SelectionPosition anchor_);
void SetSelection(int currentPos_, int anchor_);
void SetSelection(SelectionPosition currentPos_);
@@ -325,8 +326,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
bool SelectionContainsProtected();
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true) const;
SelectionPosition MovePositionOutsideChar(SelectionPosition pos, int moveDir, bool checkLineEnd=true) const;
- int MovePositionTo(SelectionPosition newPos, Selection::selTypes selt=Selection::noSel, bool ensureVisible=true);
- int MovePositionTo(int newPos, Selection::selTypes selt=Selection::noSel, bool ensureVisible=true);
+ void MovePositionTo(SelectionPosition newPos, Selection::selTypes selt=Selection::noSel, bool ensureVisible=true);
+ void MovePositionTo(int newPos, Selection::selTypes selt=Selection::noSel, bool ensureVisible=true);
SelectionPosition MovePositionSoVisible(SelectionPosition pos, int moveDir);
SelectionPosition MovePositionSoVisible(int pos, int moveDir);
Point PointMainCaret();
@@ -457,8 +458,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
void Duplicate(bool forLine);
virtual void CancelModes();
void NewLine();
- void CursorUpOrDown(int direction, Selection::selTypes selt=Selection::noSel);
- void ParaUpOrDown(int direction, Selection::selTypes selt=Selection::noSel);
+ void CursorUpOrDown(int direction, Selection::selTypes selt);
+ void ParaUpOrDown(int direction, Selection::selTypes selt);
int StartEndDisplayLine(int pos, bool start);
virtual int KeyCommand(unsigned int iMessage);
virtual int KeyDefault(int /* key */, int /*modifiers*/);