Add --no-scm configure option to bypass SCM detection
[geany-mirror.git] / scintilla / src / RunStyles.h
blobb096ad8004ff1456f5f3d8261c651dead3471b0c
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.
7 /// Styling buffer using one element for each run rather than using
8 /// a filled buffer.
10 #ifndef RUNSTYLES_H
11 #define RUNSTYLES_H
13 #ifdef SCI_NAMESPACE
14 namespace Scintilla {
15 #endif
17 class RunStyles {
18 private:
19 Partitioning *starts;
20 SplitVector<int> *styles;
21 int RunFromPosition(int position) const;
22 int SplitRun(int position);
23 void RemoveRun(int run);
24 void RemoveRunIfEmpty(int run);
25 void RemoveRunIfSameAsPrevious(int run);
26 // Private so RunStyles objects can not be copied
27 RunStyles(const RunStyles &);
28 public:
29 RunStyles();
30 ~RunStyles();
31 int Length() const;
32 int ValueAt(int position) const;
33 int FindNextChange(int position, int end) const;
34 int StartRun(int position) const;
35 int EndRun(int position) const;
36 // Returns true if some values may have changed
37 bool FillRange(int &position, int value, int &fillLength);
38 void SetValueAt(int position, int value);
39 void InsertSpace(int position, int insertLength);
40 void DeleteAll();
41 void DeleteRange(int position, int deleteLength);
42 int Runs() const;
43 bool AllSame() const;
44 bool AllSameAs(int value) const;
45 int Find(int value, int start) const;
47 void Check() const;
50 #ifdef SCI_NAMESPACE
52 #endif
54 #endif