From f6046faf0e8564416401edcae07c8110bf0a6ec1 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 15 Jul 2009 03:05:04 +0000 Subject: No explicit count of ranges in selection as can use vector::size(). Removed EmptyRanges method so that there is always at least one selection. Added SetSelection method to set a simple single selection. Removed 3 argument form of AddSelection since callers do know which argument is the caret. Simplified rectangular selection code. --- src/Selection.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/Selection.h') diff --git a/src/Selection.h b/src/Selection.h index e98709312..9e5372638 100644 --- a/src/Selection.h +++ b/src/Selection.h @@ -124,7 +124,6 @@ struct SelectionRange { class Selection { std::vector ranges; SelectionRange rangeRectangular; - size_t nRanges; size_t mainRange; bool moveExtends; public: @@ -142,7 +141,6 @@ public: void SetMain(size_t r); SelectionRange &Range(size_t r); SelectionRange &RangeMain(); - void ClearVirtualSpace(size_t r); bool MoveExtends() const; void SetMoveExtends(bool moveExtends_); bool Empty() const; @@ -150,14 +148,13 @@ public: int Length() const; void MovePositions(bool insertion, int startChange, int length); void TrimSelection(SelectionRange range); + void SetSelection(SelectionRange range); void AddSelection(SelectionRange range); void AddSelection(SelectionPosition spPos); - void AddSelection(SelectionPosition spStartPos, SelectionPosition spEndPos, bool anchorLeft); int CharacterInSelection(int posCharacter) const; int InSelectionForEOL(int pos) const; int VirtualSpaceFor(int pos) const; void Clear(); - void EmptyRanges(); }; #ifdef SCI_NAMESPACE -- cgit v1.2.3