1 // Scintilla source code edit control
3 ** Store information on how the document is to be viewed.
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.
38 const char *Save(const char *name
);
41 enum IndentView
{ivNone
, ivReal
, ivLookForward
, ivLookBoth
};
43 enum WhiteSpaceVisibility
{wsInvisible
=0, wsVisibleAlways
=1, wsVisibleAfterIndent
=2};
52 LineMarker markers
[MARKER_MAX
+ 1];
53 Indicator indicators
[INDIC_MAX
+ 1];
55 unsigned int maxAscent
;
56 unsigned int maxDescent
;
57 unsigned int aveCharWidth
;
58 unsigned int spaceWidth
;
60 ColourPair selforeground
;
62 ColourPair selbackground
;
63 ColourPair selbackground2
;
66 bool whitespaceForegroundSet
;
67 ColourPair whitespaceForeground
;
68 bool whitespaceBackgroundSet
;
69 ColourPair whitespaceBackground
;
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
84 int leftMarginWidth
; ///< Spacing margin on left of text
85 int rightMarginWidth
; ///< Spacing margin on left of text
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
];
91 WhiteSpaceVisibility viewWhitespace
;
92 IndentView viewIndentationGuides
;
95 ColourPair caretcolour
;
96 bool showCaretLineBackground
;
97 ColourPair caretLineBackground
;
99 ColourPair edgecolour
;
103 bool someStylesProtected
;
107 ViewStyle(const ViewStyle
&source
);
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();
116 void SetStyleFontName(int styleIndex
, const char *name
);
117 bool ProtectionActive() const;