OSDN Git Service

Commit DialogBox compile Okay
[tortoisegit/TortoiseGitJp.git] / ext / scintilla / src / ViewStyle.h
1 // Scintilla source code edit control\r
2 /** @file ViewStyle.h\r
3  ** Store information on how the document is to be viewed.\r
4  **/\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
7 \r
8 #ifndef VIEWSTYLE_H\r
9 #define VIEWSTYLE_H\r
10 \r
11 #ifdef SCI_NAMESPACE\r
12 namespace Scintilla {\r
13 #endif\r
14 \r
15 /**\r
16  */\r
17 class MarginStyle {\r
18 public:\r
19         int style;\r
20         int width;\r
21         int mask;\r
22         bool sensitive;\r
23         MarginStyle();\r
24 };\r
25 \r
26 /**\r
27  */\r
28 class FontNames {\r
29 private:\r
30         char **names;\r
31         int size;\r
32         int max;\r
33 \r
34 public:\r
35         FontNames();\r
36         ~FontNames();\r
37         void Clear();\r
38         const char *Save(const char *name);\r
39 };\r
40 \r
41 enum IndentView {ivNone, ivReal, ivLookForward, ivLookBoth};\r
42 \r
43 enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2};\r
44 \r
45 /**\r
46  */\r
47 class ViewStyle {\r
48 public:\r
49         FontNames fontNames;\r
50         size_t stylesSize;\r
51         Style *styles;\r
52         LineMarker markers[MARKER_MAX + 1];\r
53         Indicator indicators[INDIC_MAX + 1];\r
54         int lineHeight;\r
55         unsigned int maxAscent;\r
56         unsigned int maxDescent;\r
57         unsigned int aveCharWidth;\r
58         unsigned int spaceWidth;\r
59         bool selforeset;\r
60         ColourPair selforeground;\r
61         bool selbackset;\r
62         ColourPair selbackground;\r
63         ColourPair selbackground2;\r
64         int selAlpha;\r
65         bool selEOLFilled;\r
66         bool whitespaceForegroundSet;\r
67         ColourPair whitespaceForeground;\r
68         bool whitespaceBackgroundSet;\r
69         ColourPair whitespaceBackground;\r
70         ColourPair selbar;\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
83         enum { margins=5 };\r
84         int leftMarginWidth;    ///< Spacing margin on left of text\r
85         int rightMarginWidth;   ///< Spacing margin on left of text\r
86         bool symbolMargin;\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
90         int zoomLevel;\r
91         WhiteSpaceVisibility viewWhitespace;\r
92         IndentView viewIndentationGuides;\r
93         bool viewEOL;\r
94         bool showMarkedLines;\r
95         ColourPair caretcolour;\r
96         bool showCaretLineBackground;\r
97         ColourPair caretLineBackground;\r
98         int caretLineAlpha;\r
99         ColourPair edgecolour;\r
100         int edgeState;\r
101         int caretStyle;\r
102         int caretWidth;\r
103         bool someStylesProtected;\r
104         bool extraFontFlag;\r
105 \r
106         ViewStyle();\r
107         ViewStyle(const ViewStyle &source);\r
108         ~ViewStyle();\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
118 };\r
119 \r
120 #ifdef SCI_NAMESPACE\r
121 }\r
122 #endif\r
123 \r
124 #endif\r