diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2013-08-26 08:00:51 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2013-08-26 12:06:24 +0300 |
commit | 89d33e9accdf452ddb421b2967db26e3ebb52e06 (patch) | |
tree | 5d821ba57ca5824e3455c0aecdb3fa948da5d23c /scintilla/src/ViewStyle.h | |
parent | 0b41923e7cc1d17242c2a8a59bca460d8e707bfb (diff) | |
download | notepad2-mod-89d33e9accdf452ddb421b2967db26e3ebb52e06.zip notepad2-mod-89d33e9accdf452ddb421b2967db26e3ebb52e06.tar.gz notepad2-mod-89d33e9accdf452ddb421b2967db26e3ebb52e06.tar.bz2 |
Update Scintilla to v3.3.5.
Diffstat (limited to 'scintilla/src/ViewStyle.h')
-rw-r--r-- | scintilla/src/ViewStyle.h | 63 |
1 files changed, 45 insertions, 18 deletions
diff --git a/scintilla/src/ViewStyle.h b/scintilla/src/ViewStyle.h index 2288a64..f795993 100644 --- a/scintilla/src/ViewStyle.h +++ b/scintilla/src/ViewStyle.h @@ -56,6 +56,22 @@ enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterInden 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 {
@@ -73,30 +89,22 @@ public: unsigned int maxDescent;
XYPOSITION aveCharWidth;
XYPOSITION spaceWidth;
- bool selforeset;
- ColourDesired selforeground;
+ XYPOSITION tabWidth;
+ 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
@@ -134,12 +142,23 @@ public: int braceHighlightIndicator;
bool braceBadLightIndicatorSet;
int braceBadLightIndicator;
+ int theEdge;
+ int marginNumberPadding; // the right-side padding of the number margin
+ int ctrlCharPadding; // the padding around control character text blobs
+ int lastSegItalicsOffset; // the offset so as not to clip italic characters at EOLs
+
+ // Wrapping support
+ WrapMode wrapState;
+ int wrapVisualFlags;
+ int wrapVisualFlagsLocation;
+ int wrapVisualStartIndent;
+ int wrapIndentMode; // SC_WRAPINDENT_FIXED, _SAME, _INDENT
ViewStyle();
ViewStyle(const ViewStyle &source);
~ViewStyle();
void Init(size_t stylesSize_=64);
- void Refresh(Surface &surface);
+ void Refresh(Surface &surface, int tabInChars);
void ReleaseAllExtendedStyles();
int AllocateExtendedStyles(int numberStyles);
void EnsureStyle(size_t index);
@@ -147,8 +166,16 @@ public: void ClearStyles();
void SetStyleFontName(int styleIndex, const char *name);
bool ProtectionActive() const;
+ int ExternalMarginWidth() const;
bool ValidStyle(size_t styleIndex) const;
void CalcLargestMarkerHeight();
+ ColourDesired WrapColour() const;
+ bool SetWrapState(int wrapState_);
+ bool SetWrapVisualFlags(int wrapVisualFlags_);
+ bool SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation_);
+ bool SetWrapVisualStartIndent(int wrapVisualStartIndent_);
+ bool SetWrapIndentMode(int wrapIndentMode_);
+
private:
void AllocStyles(size_t sizeNew);
void CreateFont(const FontSpecification &fs);
|