// Scintilla source code edit control /** @file ViewStyle.h ** Store information on how the document is to be viewed. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef VIEWSTYLE_H #define VIEWSTYLE_H namespace Scintilla { /** */ class MarginStyle { public: int style; ColourDesired back; int width; int mask; bool sensitive; int cursor; MarginStyle(int style_= SC_MARGIN_SYMBOL, int width_=0, int mask_=0); }; /** */ class FontNames { private: std::vector names; public: FontNames(); // FontNames objects can not be copied. FontNames(const FontNames &) = delete; FontNames(FontNames &&) = delete; FontNames &operator=(const FontNames &) = delete; FontNames &operator=(FontNames &&) = delete; ~FontNames(); void Clear(); const char *Save(const char *name); }; class FontRealised : public FontMeasurements { public: Font font; FontRealised(); // FontRealised objects can not be copied. FontRealised(const FontRealised &) = delete; FontRealised(FontRealised &&) = delete; FontRealised &operator=(const FontRealised &) = delete; FontRealised &operator=(FontRealised &&) = delete; virtual ~FontRealised(); void Realise(Surface &surface, int zoomLevel, int technology, const FontSpecification &fs); }; enum IndentView {ivNone, ivReal, ivLookForward, ivLookBoth}; enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2, wsVisibleOnlyInIndent=3}; enum TabDrawMode {tdLongArrow=0, tdStrikeOut=1}; typedef std::map> FontMap; enum WrapMode { eWrapNone, eWrapWord, eWrapChar, eWrapWhitespace }; class ColourOptional : public ColourDesired { public: bool isSet; ColourOptional(ColourDesired colour_=ColourDesired(0,0,0), bool isSet_=false) : ColourDesired(colour_), isSet(isSet_) { } ColourOptional(uptr_t wParam, sptr_t lParam) : ColourDesired(static_cast(lParam)), isSet(wParam != 0) { } }; struct ForeBackColours { ColourOptional fore; ColourOptional back; }; struct EdgeProperties { int column; ColourDesired colour; EdgeProperties(int column_ = 0, ColourDesired colour_ = ColourDesired(0)) : column(column_), colour(colour_) { } EdgeProperties(uptr_t wParam, sptr_t lParam) : column(static_cast(wParam)), colour(static_cast(lParam)) { } }; /** */ class ViewStyle { FontNames fontNames; FontMap fonts; public: std::vector