~ubuntu-branches/ubuntu/maverick/codelite/maverick

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-07-29 19:42:47 UTC
  • mfrom: (1.1.9 upstream) (18.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100729194247-cuibfk03wog33nxq
Tags: 2.6.0.4189~dfsg-1
* New upstream release.
* Bump Standards.
* Refresh patches.
* Add license information about files under ./Debugger/

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
        Range(Position pos=0) :
34
34
                start(pos), end(pos) {
35
 
        };
 
35
        }
36
36
        Range(Position start_, Position end_) :
37
37
                start(start_), end(end_) {
38
 
        };
 
38
        }
39
39
 
40
40
        bool Valid() const {
41
41
                return (start != invalidPosition) && (end != invalidPosition);
115
115
        }
116
116
};
117
117
 
 
118
class CaseFolder {
 
119
public:
 
120
        virtual ~CaseFolder() {
 
121
        }
 
122
        virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) = 0;
 
123
};
 
124
 
 
125
class CaseFolderTable : public CaseFolder {
 
126
protected:
 
127
        char mapping[256];
 
128
public:
 
129
        CaseFolderTable();
 
130
        virtual ~CaseFolderTable();
 
131
        virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed);
 
132
        void SetTranslation(char ch, char chTranslation);
 
133
        void StandardASCII();
 
134
};
 
135
 
118
136
/**
119
137
 */
120
138
class Document : PerLine {
225
243
        void DelCharBack(int pos);
226
244
 
227
245
        char CharAt(int position) { return cb.CharAt(position); }
228
 
        void GetCharRange(char *buffer, int position, int lengthRetrieve) {
 
246
        void GetCharRange(char *buffer, int position, int lengthRetrieve) const {
229
247
                cb.GetCharRange(buffer, position, lengthRetrieve);
230
248
        }
231
 
        char StyleAt(int position) { return cb.StyleAt(position); }
 
249
        char StyleAt(int position) const { return cb.StyleAt(position); }
232
250
        int GetMark(int line);
233
251
        int AddMark(int line, int markerNum);
234
252
        void AddMarkSet(int line, int valueSet);
243
261
        int VCHomePosition(int position) const;
244
262
 
245
263
        int SetLevel(int line, int level);
246
 
        int GetLevel(int line);
 
264
        int GetLevel(int line) const;
247
265
        void ClearLevels();
248
266
        int GetLastChild(int lineParent, int level=-1);
249
267
        int GetFoldParent(int line);
254
272
        int NextWordEnd(int pos, int delta);
255
273
        int Length() const { return cb.Length(); }
256
274
        void Allocate(int newSize) { cb.Allocate(newSize); }
257
 
        long FindText(int minPos, int maxPos, const char *s,
258
 
                bool caseSensitive, bool word, bool wordStart, bool regExp, int flags, int *length);
259
 
        long FindText(int iMessage, unsigned long wParam, long lParam);
 
275
        size_t ExtractChar(int pos, char *bytes);
 
276
        bool MatchesWordOptions(bool word, bool wordStart, int pos, int length);
 
277
        long FindText(int minPos, int maxPos, const char *search, bool caseSensitive, bool word,
 
278
                bool wordStart, bool regExp, int flags, int *length, CaseFolder *pcf);
260
279
        const char *SubstituteByPosition(const char *text, int *length);
261
280
        int LinesTotal() const;
262
281
 
275
294
        void DecorationFillRange(int position, int value, int fillLength);
276
295
 
277
296
        int SetLineState(int line, int state);
278
 
        int GetLineState(int line);
 
297
        int GetLineState(int line) const;
279
298
        int GetMaxLineState();
280
299
 
281
300
        StyledText MarginStyledText(int line);