-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_; };
- 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();
- int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0);
+ // Style setting
+ virtual void StartAt(unsigned int start, char chMask=31)=0;
+ virtual void SetFlags(char chFlags_, char chWhile_)=0;
+ virtual unsigned int GetStartSegment()=0;
+ virtual void StartSegment(unsigned int pos)=0;
+ virtual void ColourTo(unsigned int pos, int chAttr)=0;
+ virtual void SetLevel(int line, int level)=0;
+ virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0;