~efargaspro/+junk/codeblocks-16.01-release

« back to all changes in this revision

Viewing changes to src/sdk/wxscintilla/src/scintilla/src/RunStyles.h

  • Committer: damienlmoore at gmail
  • Date: 2016-02-02 02:43:22 UTC
  • Revision ID: damienlmoore@gmail.com-20160202024322-yql5qmtbwdyamdwd
Code::BlocksĀ 16.01

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#ifndef RUNSTYLES_H
 
11
#define RUNSTYLES_H
 
12
 
 
13
/* C::B begin */
 
14
#include "Partitioning.h"
 
15
/* C::B end */
 
16
 
 
17
#ifdef SCI_NAMESPACE
 
18
namespace Scintilla {
 
19
#endif
 
20
 
 
21
class RunStyles {
 
22
private:
 
23
        Partitioning *starts;
 
24
        SplitVector<int> *styles;
 
25
        int RunFromPosition(int position) const;
 
26
        int SplitRun(int position);
 
27
        void RemoveRun(int run);
 
28
        void RemoveRunIfEmpty(int run);
 
29
        void RemoveRunIfSameAsPrevious(int run);
 
30
        // Private so RunStyles objects can not be copied
 
31
        RunStyles(const RunStyles &);
 
32
public:
 
33
        RunStyles();
 
34
        ~RunStyles();
 
35
        int Length() const;
 
36
        int ValueAt(int position) const;
 
37
        int FindNextChange(int position, int end) const;
 
38
        int StartRun(int position) const;
 
39
        int EndRun(int position) const;
 
40
        // Returns true if some values may have changed
 
41
        bool FillRange(int &position, int value, int &fillLength);
 
42
        void SetValueAt(int position, int value);
 
43
        void InsertSpace(int position, int insertLength);
 
44
        void DeleteAll();
 
45
        void DeleteRange(int position, int deleteLength);
 
46
        int Runs() const;
 
47
        bool AllSame() const;
 
48
        bool AllSameAs(int value) const;
 
49
        int Find(int value, int start) const;
 
50
 
 
51
        void Check() const;
 
52
 
 
53
/* CHANGEBAR begin */
 
54
    char *PersistantForm() const;
 
55
    void FromPersistant(const char *form);
 
56
    static bool PersistantSame(const char *form1, const char *form2);
 
57
/* CHANGEBAR end */
 
58
};
 
59
 
 
60
#ifdef SCI_NAMESPACE
 
61
}
 
62
#endif
 
63
 
 
64
#endif