From 01a6a4f0f58ccf38384132ea3083b28f140e0e30 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 1 Apr 2017 13:16:24 +1100 Subject: More encapsulation for Decoration and DecorationList. --- src/Decoration.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/Decoration.h') diff --git a/src/Decoration.h b/src/Decoration.h index a0c434af8..6f5fe6283 100644 --- a/src/Decoration.h +++ b/src/Decoration.h @@ -12,15 +12,21 @@ namespace Scintilla { #endif class Decoration { + int indicator; public: Decoration *next; RunStyles rs; - int indicator; explicit Decoration(int indicator_); ~Decoration(); bool Empty() const; + Decoration *Next() const { + return next; + } + int Indicator() const { + return indicator; + } }; class DecorationList { @@ -32,13 +38,17 @@ class DecorationList { Decoration *Create(int indicator, int length); void Delete(int indicator); void DeleteAnyEmpty(); -public: Decoration *root; bool clickNotified; +public: DecorationList(); ~DecorationList(); + Decoration *Root() const { + return root; + } + void SetCurrentIndicator(int indicator); int GetCurrentIndicator() const { return currentIndicator; } @@ -55,6 +65,13 @@ public: int ValueAt(int indicator, int position); int Start(int indicator, int position); int End(int indicator, int position); + + virtual bool ClickNotified() const { + return clickNotified; + } + virtual void SetClickNotified(bool notified) { + clickNotified = notified; + } }; #ifdef SCI_NAMESPACE -- cgit v1.2.3