Update Tortoise.pot
[TortoiseGit.git] / ext / scintilla / src / RunStyles.h
blob4bb4375e2426b1c8473a58ff15aaf05be95a7cd5
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 std::unique_ptr<Partitioning> starts;
20 std::unique_ptr<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 public:
27 RunStyles();
28 // Deleted so RunStyles objects can not be copied.
29 RunStyles(const RunStyles &) = delete;
30 void operator=(const RunStyles &) = delete;
31 ~RunStyles();
32 int Length() const;
33 int ValueAt(int position) const;
34 int FindNextChange(int position, int end) const;
35 int StartRun(int position) const;
36 int EndRun(int position) const;
37 // Returns true if some values may have changed
38 bool FillRange(int &position, int value, int &fillLength);
39 void SetValueAt(int position, int value);
40 void InsertSpace(int position, int insertLength);
41 void DeleteAll();
42 void DeleteRange(int position, int deleteLength);
43 int Runs() const;
44 bool AllSame() const;
45 bool AllSameAs(int value) const;
46 int Find(int value, int start) const;
48 void Check() const;
51 #ifdef SCI_NAMESPACE
53 #endif
55 #endif