diff options
Diffstat (limited to 'src/ViewStyle.h')
-rw-r--r-- | src/ViewStyle.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/ViewStyle.h b/src/ViewStyle.h index db415344b..f08fb777a 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -22,17 +22,18 @@ public: int mask; bool sensitive; int cursor; - MarginStyle(); + MarginStyle(int style_= SC_MARGIN_SYMBOL, int width_=0, int mask_=0); }; /** */ class FontNames { private: - std::vector<char *> names; + std::vector<const char *> names; - // Private so FontNames objects can not be copied - FontNames(const FontNames &); + // FontNames objects can not be copied + FontNames(const FontNames &) = delete; + FontNames &operator=(const FontNames &) = delete; public: FontNames(); ~FontNames(); @@ -41,9 +42,9 @@ public: }; class FontRealised : public FontMeasurements { - // Private so FontRealised objects can not be copied - FontRealised(const FontRealised &); - FontRealised &operator=(const FontRealised &); + // FontRealised objects can not be copied + FontRealised(const FontRealised &) = delete; + FontRealised &operator=(const FontRealised &) = delete; public: Font font; FontRealised(); @@ -57,7 +58,7 @@ enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterInden enum TabDrawMode {tdLongArrow=0, tdStrikeOut=1}; -typedef std::map<FontSpecification, FontRealised *> FontMap; +typedef std::map<FontSpecification, std::unique_ptr<FontRealised>> FontMap; enum WrapMode { eWrapNone, eWrapWord, eWrapChar, eWrapWhitespace }; @@ -94,11 +95,11 @@ class ViewStyle { public: std::vector<Style> styles; size_t nextExtendedStyle; - LineMarker markers[MARKER_MAX + 1]; + std::vector<LineMarker> markers; int largestMarkerHeight; - Indicator indicators[INDIC_MAX + 1]; - unsigned int indicatorsDynamic; - unsigned int indicatorsSetFore; + std::vector<Indicator> indicators; + bool indicatorsDynamic; + bool indicatorsSetFore; int technology; int lineHeight; int lineOverlap; @@ -211,8 +212,8 @@ private: void CreateAndAddFont(const FontSpecification &fs); FontRealised *Find(const FontSpecification &fs); void FindMaxAscentDescent(); - // Private so can only be copied through copy constructor which ensures font names initialised correctly - ViewStyle &operator=(const ViewStyle &); + // Can only be copied through copy constructor which ensures font names initialised correctly + ViewStyle &operator=(const ViewStyle &) = delete; }; #ifdef SCI_NAMESPACE |