~ubuntu-branches/ubuntu/raring/geany/raring-proposed

« back to all changes in this revision

Viewing changes to scintilla/include/WindowAccessor.h

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2011-12-10 07:43:26 UTC
  • mfrom: (3.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20111210074326-s8yqbew5i20h33tf
Tags: 0.21-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  - debian/patches/20_use_evince_viewer.patch:
     + use evince as viewer for pdf and dvi files
  - debian/patches/20_use_x_terminal_emulator.patch:
     + use x-terminal-emulator as terminal
  - debian/control
     + Add breaks on geany-plugins-common << 0.20
* Also fixes bugs:
  - Filter for MATLAB/Octave files filters everythign (LP: 885505)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Scintilla source code edit control
2
 
/** @file WindowAccessor.h
3
 
 ** Implementation of BufferAccess and StylingAccess on a Scintilla
4
 
 ** rapid easy access to contents of a Scintilla.
5
 
 **/
6
 
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
7
 
// The License.txt file describes the conditions under which this software may be distributed.
8
 
 
9
 
#ifdef SCI_NAMESPACE
10
 
namespace Scintilla {
11
 
#endif
12
 
 
13
 
/**
14
 
 */
15
 
 
16
 
class WindowAccessor : public Accessor {
17
 
        // Private so WindowAccessor objects can not be copied
18
 
        WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {}
19
 
        WindowAccessor &operator=(const WindowAccessor &) { return *this; }
20
 
protected:
21
 
        WindowID id;
22
 
        PropertyGet &props;
23
 
        int lenDoc;
24
 
 
25
 
        char styleBuf[bufferSize];
26
 
        int validLen;
27
 
        char chFlags;
28
 
        char chWhile;
29
 
        unsigned int startSeg;
30
 
 
31
 
        bool InternalIsLeadByte(char ch);
32
 
        void Fill(int position);
33
 
public:
34
 
        WindowAccessor(WindowID id_, PropertyGet &props_) : 
35
 
                Accessor(), id(id_), props(props_), 
36
 
                lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
37
 
        }
38
 
        ~WindowAccessor();
39
 
        bool Match(int pos, const char *s);
40
 
        char StyleAt(int position);
41
 
        int GetLine(int position);
42
 
        int LineStart(int line);
43
 
        int LevelAt(int line);
44
 
        int Length();
45
 
        void Flush();
46
 
        int GetLineState(int line);
47
 
        int SetLineState(int line, int state);
48
 
        int GetPropertyInt(const char *key, int defaultValue=0) { 
49
 
                return props.GetInt(key, defaultValue); 
50
 
        }
51
 
        char *GetProperties() {
52
 
                return props.ToString();
53
 
        }
54
 
 
55
 
        void StartAt(unsigned int start, char chMask=31);
56
 
        void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }
57
 
        unsigned int GetStartSegment() { return startSeg; }
58
 
        void StartSegment(unsigned int pos);
59
 
        void ColourTo(unsigned int pos, int chAttr);
60
 
        void SetLevel(int line, int level);
61
 
        int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0);
62
 
        void IndicatorFill(int start, int end, int indicator, int value);
63
 
};
64
 
 
65
 
#ifdef SCI_NAMESPACE
66
 
}
67
 
#endif