diff options
| author | nyamatongwe <devnull@localhost> | 2009-07-14 03:28:22 +0000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2009-07-14 03:28:22 +0000 |
| commit | a9b440a2e4da168325378e08c0ea0141547c5c81 (patch) | |
| tree | 084abdf19b98d1571d40853b503bd05b723c243e /src/Selection.h | |
| parent | c7f0bfabd60940e8addc8176be556e0ecd2389a0 (diff) | |
| download | scintilla-mirror-a9b440a2e4da168325378e08c0ea0141547c5c81.tar.gz | |
Added controls for enabling multiple selection and multiple selection
typing. Renamed multiline options to reflect use on multiple selections.
Using std::vector for selections.
Diffstat (limited to 'src/Selection.h')
| -rw-r--r-- | src/Selection.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Selection.h b/src/Selection.h index 6fe828a2c..e98709312 100644 --- a/src/Selection.h +++ b/src/Selection.h @@ -116,19 +116,17 @@ struct SelectionRange { SelectionPosition End() const { return (anchor < caret) ? caret : anchor; } - bool Trim(SelectionPosition startPos, SelectionPosition endPos); + bool Trim(SelectionRange range); // If range is all virtual collapse to start of virtual space void MinimizeVirtualSpace(); }; class Selection { - SelectionRange *ranges; + std::vector<SelectionRange> ranges; SelectionRange rangeRectangular; - size_t allocated; size_t nRanges; size_t mainRange; bool moveExtends; - void Allocate(); public: enum selTypes { noSel, selStream, selRectangle, selLines, selThin }; selTypes selType; @@ -151,7 +149,8 @@ public: SelectionPosition Last() const; int Length() const; void MovePositions(bool insertion, int startChange, int length); - void TrimSelection(SelectionPosition startPos, SelectionPosition endPos); + void TrimSelection(SelectionRange range); + void AddSelection(SelectionRange range); void AddSelection(SelectionPosition spPos); void AddSelection(SelectionPosition spStartPos, SelectionPosition spEndPos, bool anchorLeft); int CharacterInSelection(int posCharacter) const; |
