aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/RunStyles.h
blob: 539e5de474f1695007f73c8354d1faac8e51b85c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/** @file RunStyles.h
 ** Data structure used to store sparse styles.
 **/
// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.

/// Styling buffer using one element for each run rather than using
/// a filled buffer.

class RunStyles {
public:
	Partitioning *starts;
	SplitVector<int> *styles;
	int RunFromPosition(int position);
	void SplitRun(int position);
	void RemoveRun(int run);
	void RemoveRunIfEmpty(int run);
	void RemoveRunIfSameAsPrevious(int run);
public:
	RunStyles();
	~RunStyles();
	int Length();
	int ValueAt(int position);
	int FindNextChange(int position, int end);
	int StartRun(int position);
	int EndRun(int position);
	void FillRange(int position, int value, int fillLength);
	void InsertSpace(int position, int insertLength);
	void DeleteAll();
	void DeleteRange(int position, int deleteLength);
};