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
;
61 ColourPair selAdditionalForeground
;
63 ColourPair selbackground
;
64 ColourPair selAdditionalBackground
;
65 ColourPair selbackground2
;
67 int selAdditionalAlpha
;
69 bool whitespaceForegroundSet
;
70 ColourPair whitespaceForeground
;
71 bool whitespaceBackgroundSet
;
72 ColourPair whitespaceBackground
;
74 ColourPair selbarlight
;
75 bool foldmarginColourSet
;
76 ColourPair foldmarginColour
;
77 bool foldmarginHighlightColourSet
;
78 ColourPair foldmarginHighlightColour
;
79 bool hotspotForegroundSet
;
80 ColourPair hotspotForeground
;
81 bool hotspotBackgroundSet
;
82 ColourPair hotspotBackground
;
83 bool hotspotUnderline
;
84 bool hotspotSingleLine
;
85 /// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
87 int leftMarginWidth
; ///< Spacing margin on left of text
88 int rightMarginWidth
; ///< Spacing margin on left of text
90 int maskInLine
; ///< Mask for markers to be put into text because there is nowhere for them to go in margin
91 MarginStyle ms
[margins
];
94 WhiteSpaceVisibility viewWhitespace
;
96 IndentView viewIndentationGuides
;
99 ColourPair caretcolour
;
100 ColourPair additionalCaretColour
;
101 bool showCaretLineBackground
;
102 ColourPair caretLineBackground
;
104 ColourPair edgecolour
;
108 bool someStylesProtected
;
109 bool someStylesForceCase
;
113 int marginStyleOffset
;
114 int annotationVisible
;
115 int annotationStyleOffset
;
118 ViewStyle(const ViewStyle
&source
);
120 void Init(size_t stylesSize_
=64);
121 void RefreshColourPalette(Palette
&pal
, bool want
);
122 void Refresh(Surface
&surface
);
123 void AllocStyles(size_t sizeNew
);
124 void EnsureStyle(size_t index
);
125 void ResetDefaultStyle();
127 void SetStyleFontName(int styleIndex
, const char *name
);
128 bool ProtectionActive() const;
129 bool ValidStyle(size_t styleIndex
) const;