-class StylingContext : public Accessor {
- char styleBuf[bufferSize];
- int validLen;
- char chFlags;
- char chWhile;
- unsigned int startSeg;
-public:
- StylingContext(WindowID id_, PropSet &props_, int offset_=0) :
- Accessor(id_,props_,offset_), validLen(0), chFlags(0) {}
- void StartAt(unsigned int start, char chMask=31);
- void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; };
- void ColourSegment(unsigned int start, unsigned int end, int chAttr);
- unsigned int GetStartSegment() { return startSeg; }
- void StartSegment(unsigned int pos);
- void ColourTo(unsigned int pos, int chAttr);
- int GetLine(int position);
- void SetLevel(int line, int level);
- void Flush();
-};
+ virtual bool Match(int pos, const char *s)=0;
+ virtual char StyleAt(int position)=0;
+ virtual int GetLine(int position)=0;
+ virtual int LineStart(int line)=0;
+ virtual int LevelAt(int line)=0;
+ virtual int Length()=0;
+ virtual void Flush()=0;
+ virtual int GetLineState(int line)=0;
+ virtual int SetLineState(int line, int state)=0;
+ virtual int GetPropertyInt(const char *key, int defaultValue=0)=0;
+ virtual char *GetProperties()=0;