1 // Scintilla source code edit control
\r
2 /** @file ViewStyle.h
\r
3 ** Store information on how the document is to be viewed.
\r
5 // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
\r
6 // The License.txt file describes the conditions under which this software may be distributed.
\r
11 #ifdef SCI_NAMESPACE
\r
12 namespace Scintilla {
\r
38 const char *Save(const char *name);
\r
41 enum IndentView {ivNone, ivReal, ivLookForward, ivLookBoth};
\r
43 enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2};
\r
49 FontNames fontNames;
\r
52 LineMarker markers[MARKER_MAX + 1];
\r
53 Indicator indicators[INDIC_MAX + 1];
\r
55 unsigned int maxAscent;
\r
56 unsigned int maxDescent;
\r
57 unsigned int aveCharWidth;
\r
58 unsigned int spaceWidth;
\r
60 ColourPair selforeground;
\r
62 ColourPair selbackground;
\r
63 ColourPair selbackground2;
\r
66 bool whitespaceForegroundSet;
\r
67 ColourPair whitespaceForeground;
\r
68 bool whitespaceBackgroundSet;
\r
69 ColourPair whitespaceBackground;
\r
71 ColourPair selbarlight;
\r
72 bool foldmarginColourSet;
\r
73 ColourPair foldmarginColour;
\r
74 bool foldmarginHighlightColourSet;
\r
75 ColourPair foldmarginHighlightColour;
\r
76 bool hotspotForegroundSet;
\r
77 ColourPair hotspotForeground;
\r
78 bool hotspotBackgroundSet;
\r
79 ColourPair hotspotBackground;
\r
80 bool hotspotUnderline;
\r
81 bool hotspotSingleLine;
\r
82 /// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
\r
84 int leftMarginWidth; ///< Spacing margin on left of text
\r
85 int rightMarginWidth; ///< Spacing margin on left of text
\r
87 int maskInLine; ///< Mask for markers to be put into text because there is nowhere for them to go in margin
\r
88 MarginStyle ms[margins];
\r
89 int fixedColumnWidth;
\r
91 WhiteSpaceVisibility viewWhitespace;
\r
92 IndentView viewIndentationGuides;
\r
94 bool showMarkedLines;
\r
95 ColourPair caretcolour;
\r
96 bool showCaretLineBackground;
\r
97 ColourPair caretLineBackground;
\r
99 ColourPair edgecolour;
\r
103 bool someStylesProtected;
\r
104 bool extraFontFlag;
\r
107 ViewStyle(const ViewStyle &source);
\r
109 void Init(size_t stylesSize_=64);
\r
110 void RefreshColourPalette(Palette &pal, bool want);
\r
111 void Refresh(Surface &surface);
\r
112 void AllocStyles(size_t sizeNew);
\r
113 void EnsureStyle(size_t index);
\r
114 void ResetDefaultStyle();
\r
115 void ClearStyles();
\r
116 void SetStyleFontName(int styleIndex, const char *name);
\r
117 bool ProtectionActive() const;
\r
120 #ifdef SCI_NAMESPACE
\r