]> git.saurik.com Git - wxWidgets.git/blame - contrib/src/stc/scintilla/src/ViewStyle.h
Applied patch [ 571965 ] update stc contrib stuff
[wxWidgets.git] / contrib / src / stc / scintilla / src / ViewStyle.h
CommitLineData
9ce192d4 1// Scintilla source code edit control
65ec6247
RD
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>
9ce192d4
RD
6// The License.txt file describes the conditions under which this software may be distributed.
7
8#ifndef VIEWSTYLE_H
9#define VIEWSTYLE_H
10
65ec6247
RD
11/**
12 */
9ce192d4
RD
13class MarginStyle {
14public:
15 bool symbol;
16 int width;
17 int mask;
18 bool sensitive;
19 MarginStyle();
20};
21
65ec6247
RD
22/**
23 */
f6bcfd97
BP
24class FontNames {
25private:
26 char *names[STYLE_MAX + 1];
27 int max;
65ec6247 28
f6bcfd97
BP
29public:
30 FontNames();
31 ~FontNames();
32 void Clear();
33 const char *Save(const char *name);
34};
35
d134f170 36enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2};
65ec6247
RD
37
38/**
39 */
9ce192d4
RD
40class ViewStyle {
41public:
f6bcfd97 42 FontNames fontNames;
9ce192d4
RD
43 Style styles[STYLE_MAX + 1];
44 LineMarker markers[MARKER_MAX + 1];
45 Indicator indicators[INDIC_MAX + 1];
46 int lineHeight;
47 unsigned int maxAscent;
48 unsigned int maxDescent;
49 unsigned int aveCharWidth;
50 unsigned int spaceWidth;
51 bool selforeset;
52 ColourPair selforeground;
53 bool selbackset;
54 ColourPair selbackground;
d134f170 55 ColourPair selbackground2;
9ce192d4
RD
56 ColourPair selbar;
57 ColourPair selbarlight;
65ec6247 58 /// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
9ce192d4 59 enum { margins=3 };
65ec6247
RD
60 int leftMarginWidth; ///< Spacing margin on left of text
61 int rightMarginWidth; ///< Spacing margin on left of text
9ce192d4 62 bool symbolMargin;
65ec6247 63 int maskInLine; ///< Mask for markers to be put into text because there is nowhere for them to go in margin
9ce192d4
RD
64 MarginStyle ms[margins];
65 int fixedColumnWidth;
66 int zoomLevel;
d134f170
RD
67 WhiteSpaceVisibility viewWhitespace;
68 bool viewIndentationGuides;
9ce192d4
RD
69 bool viewEOL;
70 bool showMarkedLines;
71 ColourPair caretcolour;
65ec6247
RD
72 bool showCaretLineBackground;
73 ColourPair caretLineBackground;
9ce192d4 74 ColourPair edgecolour;
d134f170 75 int edgeState;
65ec6247 76 int caretWidth;
9ce192d4
RD
77
78 ViewStyle();
79 ViewStyle(const ViewStyle &source);
80 ~ViewStyle();
81 void Init();
82 void RefreshColourPalette(Palette &pal, bool want);
83 void Refresh(Surface &surface);
84 void ResetDefaultStyle();
85 void ClearStyles();
f6bcfd97 86 void SetStyleFontName(int styleIndex, const char *name);
9ce192d4
RD
87};
88
89#endif