]> git.saurik.com Git - wxWidgets.git/blob - contrib/src/stc/scintilla/src/ViewStyle.h
4436e83ff4057b637c358f622440867a11a95f4e
[wxWidgets.git] / contrib / src / stc / scintilla / src / ViewStyle.h
1 // Scintilla source code edit control
2 // ViewStyle.h - store information on how the document is to be viewed
3 // Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
4 // The License.txt file describes the conditions under which this software may be distributed.
5
6 #ifndef VIEWSTYLE_H
7 #define VIEWSTYLE_H
8
9 class MarginStyle {
10 public:
11 bool symbol;
12 int width;
13 int mask;
14 bool sensitive;
15 MarginStyle();
16 };
17
18 class FontNames {
19 private:
20 char *names[STYLE_MAX + 1];
21 int max;
22 public:
23 FontNames();
24 ~FontNames();
25 void Clear();
26 const char *Save(const char *name);
27 };
28
29 class ViewStyle {
30 public:
31 FontNames fontNames;
32 Style styles[STYLE_MAX + 1];
33 LineMarker markers[MARKER_MAX + 1];
34 Indicator indicators[INDIC_MAX + 1];
35 int lineHeight;
36 unsigned int maxAscent;
37 unsigned int maxDescent;
38 unsigned int aveCharWidth;
39 unsigned int spaceWidth;
40 bool selforeset;
41 ColourPair selforeground;
42 bool selbackset;
43 ColourPair selbackground;
44 ColourPair selbar;
45 ColourPair selbarlight;
46 // Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
47 int leftMarginWidth; // Spacing margin on left of text
48 int rightMarginWidth; // Spacing margin on left of text
49 enum { margins=3 };
50 bool symbolMargin;
51 int maskInLine; // Mask for markers to be put into text because there is nowhere for them to go in margin
52 MarginStyle ms[margins];
53 int fixedColumnWidth;
54 int zoomLevel;
55 bool viewWhitespace;
56 bool viewEOL;
57 bool showMarkedLines;
58 ColourPair caretcolour;
59 ColourPair edgecolour;
60
61 ViewStyle();
62 ViewStyle(const ViewStyle &source);
63 ~ViewStyle();
64 void Init();
65 void RefreshColourPalette(Palette &pal, bool want);
66 void Refresh(Surface &surface);
67 void ResetDefaultStyle();
68 void ClearStyles();
69 void SetStyleFontName(int styleIndex, const char *name);
70 };
71
72 #endif