]> git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/RunStyles.h
bbf20b26245330a0ededb2aa7d3d946de3c083e0
[wxWidgets.git] / src / stc / scintilla / src / RunStyles.h
1 /** @file RunStyles.h
2 ** Data structure used to store sparse styles.
3 **/
4 // Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>
5 // The License.txt file describes the conditions under which this software may be distributed.
6
7 /// Styling buffer using one element for each run rather than using
8 /// a filled buffer.
9
10 #ifdef SCI_NAMESPACE
11 namespace Scintilla {
12 #endif
13
14 class RunStyles {
15 public:
16 Partitioning *starts;
17 SplitVector<int> *styles;
18 int RunFromPosition(int position);
19 int SplitRun(int position);
20 void RemoveRun(int run);
21 void RemoveRunIfEmpty(int run);
22 void RemoveRunIfSameAsPrevious(int run);
23 public:
24 RunStyles();
25 ~RunStyles();
26 int Length();
27 int ValueAt(int position);
28 int FindNextChange(int position, int end);
29 int StartRun(int position);
30 int EndRun(int position);
31 // Returns true if some values may have changed
32 bool FillRange(int &position, int value, int &fillLength);
33 void SetValueAt(int position, int value);
34 void InsertSpace(int position, int insertLength);
35 void DeleteAll();
36 void DeleteRange(int position, int deleteLength);
37 };
38
39 #ifdef SCI_NAMESPACE
40 }
41 #endif