diff options
author | Neil <nyamatongwe@gmail.com> | 2013-08-09 16:11:28 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-08-09 16:11:28 +1000 |
commit | 60f687c690f19e1470a28e0805f563bbd1f4b7db (patch) | |
tree | 73175035f01df52ee9f1277cda1dfe1b3ee54573 /src/ViewStyle.h | |
parent | 5b3f266d4de340bf8a881b37d7e5097d2eda16ab (diff) | |
download | scintilla-mirror-60f687c690f19e1470a28e0805f563bbd1f4b7db.tar.gz |
Structure colour settings into ColourOptional and ForeBackColours types.
Diffstat (limited to 'src/ViewStyle.h')
-rw-r--r-- | src/ViewStyle.h | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/ViewStyle.h b/src/ViewStyle.h index 22e8a8f5a..0222af591 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -58,6 +58,20 @@ typedef std::map<FontSpecification, FontRealised *> FontMap; enum WrapMode { eWrapNone, eWrapWord, eWrapChar }; +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(lParam), isSet(wParam != 0) { + } +}; + +struct ForeBackColours { + ColourOptional fore; + ColourOptional back; +}; + /** */ class ViewStyle { @@ -76,32 +90,21 @@ public: XYPOSITION aveCharWidth; XYPOSITION spaceWidth; XYPOSITION tabWidth; - bool selforeset; - ColourDesired selforeground; + ForeBackColours selColours; ColourDesired selAdditionalForeground; - bool selbackset; - ColourDesired selbackground; ColourDesired selAdditionalBackground; - ColourDesired selbackground2; + ColourDesired selBackground2; int selAlpha; int selAdditionalAlpha; bool selEOLFilled; - bool whitespaceForegroundSet; - ColourDesired whitespaceForeground; - bool whitespaceBackgroundSet; - ColourDesired whitespaceBackground; + ForeBackColours whitespaceColours; int controlCharSymbol; XYPOSITION controlCharWidth; ColourDesired selbar; ColourDesired selbarlight; - bool foldmarginColourSet; - ColourDesired foldmarginColour; - bool foldmarginHighlightColourSet; - ColourDesired foldmarginHighlightColour; - bool hotspotForegroundSet; - ColourDesired hotspotForeground; - bool hotspotBackgroundSet; - ColourDesired hotspotBackground; + ColourOptional foldmarginColour; + ColourOptional foldmarginHighlightColour; + ForeBackColours hotspotColours; bool hotspotUnderline; bool hotspotSingleLine; /// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin |