[c51738]: src / RunStyles.h Maximize Restore History

Download this file

RunStyles.h    53 lines (46 with data), 1.4 kB

 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/** @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.
#ifndef RUNSTYLES_H
#define RUNSTYLES_H
#ifdef SCI_NAMESPACE
namespace Scintilla {
#endif
class RunStyles {
private:
Partitioning *starts;
SplitVector<int> *styles;
int RunFromPosition(int position) const;
int SplitRun(int position);
void RemoveRun(int run);
void RemoveRunIfEmpty(int run);
void RemoveRunIfSameAsPrevious(int run);
// Private so RunStyles objects can not be copied
RunStyles(const RunStyles &);
public:
RunStyles();
~RunStyles();
int Length() const;
int ValueAt(int position) const;
int FindNextChange(int position, int end);
int StartRun(int position);
int EndRun(int position);
// Returns true if some values may have changed
bool FillRange(int &position, int value, int &fillLength);
void SetValueAt(int position, int value);
void InsertSpace(int position, int insertLength);
void DeleteAll();
void DeleteRange(int position, int deleteLength);
int Runs() const;
bool AllSame() const;
bool AllSameAs(int value) const;
int Find(int value, int start) const;
};
#ifdef SCI_NAMESPACE
}
#endif
#endif