Add an UI to enable/disable specific overlay handlers.
[TortoiseGit.git] / ext / scintilla / src / ViewStyle.h
bloba2638fb3ae9477c68fddd62e7a7e1477d5067fd6
1 // Scintilla source code edit control
2 /** @file ViewStyle.h
3 ** Store information on how the document is to be viewed.
4 **/
5 // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 #ifndef VIEWSTYLE_H
9 #define VIEWSTYLE_H
11 #ifdef SCI_NAMESPACE
12 namespace Scintilla {
13 #endif
15 /**
17 class MarginStyle {
18 public:
19 int style;
20 int width;
21 int mask;
22 bool sensitive;
23 MarginStyle();
26 /**
28 class FontNames {
29 private:
30 char **names;
31 int size;
32 int max;
34 public:
35 FontNames();
36 ~FontNames();
37 void Clear();
38 const char *Save(const char *name);
41 enum IndentView {ivNone, ivReal, ivLookForward, ivLookBoth};
43 enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2};
45 /**
47 class ViewStyle {
48 public:
49 FontNames fontNames;
50 size_t stylesSize;
51 Style *styles;
52 LineMarker markers[MARKER_MAX + 1];
53 Indicator indicators[INDIC_MAX + 1];
54 int lineHeight;
55 unsigned int maxAscent;
56 unsigned int maxDescent;
57 unsigned int aveCharWidth;
58 unsigned int spaceWidth;
59 bool selforeset;
60 ColourPair selforeground;
61 bool selbackset;
62 ColourPair selbackground;
63 ColourPair selbackground2;
64 int selAlpha;
65 bool selEOLFilled;
66 bool whitespaceForegroundSet;
67 ColourPair whitespaceForeground;
68 bool whitespaceBackgroundSet;
69 ColourPair whitespaceBackground;
70 ColourPair selbar;
71 ColourPair selbarlight;
72 bool foldmarginColourSet;
73 ColourPair foldmarginColour;
74 bool foldmarginHighlightColourSet;
75 ColourPair foldmarginHighlightColour;
76 bool hotspotForegroundSet;
77 ColourPair hotspotForeground;
78 bool hotspotBackgroundSet;
79 ColourPair hotspotBackground;
80 bool hotspotUnderline;
81 bool hotspotSingleLine;
82 /// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
83 enum { margins=5 };
84 int leftMarginWidth; ///< Spacing margin on left of text
85 int rightMarginWidth; ///< Spacing margin on left of text
86 bool symbolMargin;
87 int maskInLine; ///< Mask for markers to be put into text because there is nowhere for them to go in margin
88 MarginStyle ms[margins];
89 int fixedColumnWidth;
90 int zoomLevel;
91 WhiteSpaceVisibility viewWhitespace;
92 IndentView viewIndentationGuides;
93 bool viewEOL;
94 bool showMarkedLines;
95 ColourPair caretcolour;
96 bool showCaretLineBackground;
97 ColourPair caretLineBackground;
98 int caretLineAlpha;
99 ColourPair edgecolour;
100 int edgeState;
101 int caretStyle;
102 int caretWidth;
103 bool someStylesProtected;
104 bool extraFontFlag;
106 ViewStyle();
107 ViewStyle(const ViewStyle &source);
108 ~ViewStyle();
109 void Init(size_t stylesSize_=64);
110 void RefreshColourPalette(Palette &pal, bool want);
111 void Refresh(Surface &surface);
112 void AllocStyles(size_t sizeNew);
113 void EnsureStyle(size_t index);
114 void ResetDefaultStyle();
115 void ClearStyles();
116 void SetStyleFontName(int styleIndex, const char *name);
117 bool ProtectionActive() const;
120 #ifdef SCI_NAMESPACE
122 #endif
124 #endif