diff options
| author | nyamatongwe <unknown> | 2009-07-14 03:28:22 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2009-07-14 03:28:22 +0000 | 
| commit | 03cca7be7b6f7e1a2899c01bf50a7a61f9be1a21 (patch) | |
| tree | 084abdf19b98d1571d40853b503bd05b723c243e /src/Selection.h | |
| parent | 1231cf6c2eecdf6fdaba67c13d82a7cfb251ccbb (diff) | |
| download | scintilla-mirror-03cca7be7b6f7e1a2899c01bf50a7a61f9be1a21.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; | 
