]> git.saurik.com Git - wxWidgets.git/blame - samples/stc/prefs.cpp
corrected sentence
[wxWidgets.git] / samples / stc / prefs.cpp
CommitLineData
88a8b04e 1//////////////////////////////////////////////////////////////////////////////
f4ec6bd2 2// File: contrib/samples/stc/prefs.cpp
88a8b04e
RD
3// Purpose: STC test Preferences initialization
4// Maintainer: Wyo
5// Created: 2003-09-01
6// RCS-ID: $Id$
7// Copyright: (c) wxGuide
8// Licence: wxWindows licence
9//////////////////////////////////////////////////////////////////////////////
10
11//----------------------------------------------------------------------------
12// headers
13//----------------------------------------------------------------------------
14
f4ec6bd2 15// For compilers that support precompilation, includes "wx/wx.h".
c40691a0 16#include "wx/wxprec.h"
88a8b04e
RD
17
18#ifdef __BORLANDC__
19 #pragma hdrstop
20#endif
21
22// for all others, include the necessary headers (this file is usually all you
be5a51fb 23// need because it includes almost all 'standard' wxWidgets headers)
88a8b04e 24#ifndef WX_PRECOMP
c40691a0 25 #include "wx/wx.h"
88a8b04e
RD
26#endif
27
be5a51fb 28//! wxWidgets headers
88a8b04e 29
be5a51fb 30//! wxWidgets/contrib headers
88a8b04e
RD
31
32//! application headers
33#include "defsext.h" // Additional definitions
34#include "prefs.h" // Preferences
35
36
37//============================================================================
38// declarations
39//============================================================================
40
41//----------------------------------------------------------------------------
42//! language types
43const CommonInfo g_CommonPrefs = {
44 // editor functionality prefs
45 true, // syntaxEnable
46 true, // foldEnable
47 true, // indentEnable
48 // display defaults prefs
49 false, // overTypeInitial
50 false, // readOnlyInitial
51 false, // wrapModeInitial
52 false, // displayEOLEnable
53 false, // IndentGuideEnable
54 true, // lineNumberEnable
55 false, // longLineOnEnable
56 false, // whiteSpaceEnable
57};
58
59//----------------------------------------------------------------------------
60// keywordlists
61// C++
62wxChar* CppWordlist1 =
88b98c53
DS
63 _T("asm auto bool break case catch char class const const_cast ")
64 _T("continue default delete do double dynamic_cast else enum explicit ")
65 _T("export extern false float for friend goto if inline int long ")
66 _T("mutable namespace new operator private protected public register ")
67 _T("reinterpret_cast return short signed sizeof static static_cast ")
68 _T("struct switch template this throw true try typedef typeid ")
69 _T("typename union unsigned using virtual void volatile wchar_t ")
70 _T("while");
88a8b04e
RD
71wxChar* CppWordlist2 =
72 _T("file");
73wxChar* CppWordlist3 =
88b98c53
DS
74 _T("a addindex addtogroup anchor arg attention author b brief bug c ")
75 _T("class code date def defgroup deprecated dontinclude e em endcode ")
76 _T("endhtmlonly endif endlatexonly endlink endverbatim enum example ")
77 _T("exception f$ f[ f] file fn hideinitializer htmlinclude ")
78 _T("htmlonly if image include ingroup internal invariant interface ")
79 _T("latexonly li line link mainpage name namespace nosubgrouping note ")
80 _T("overload p page par param post pre ref relates remarks return ")
81 _T("retval sa section see showinitializer since skip skipline struct ")
82 _T("subsection test throw todo typedef union until var verbatim ")
83 _T("verbinclude version warning weakgroup $ @ \"\" & < > # { }");
88a8b04e
RD
84
85// Python
86wxChar* PythonWordlist1 =
88b98c53
DS
87 _T("and assert break class continue def del elif else except exec ")
88 _T("finally for from global if import in is lambda None not or pass ")
89 _T("print raise return try while yield");
88a8b04e 90wxChar* PythonWordlist2 =
88b98c53
DS
91 _T("ACCELERATORS ALT AUTO3STATE AUTOCHECKBOX AUTORADIOBUTTON BEGIN ")
92 _T("BITMAP BLOCK BUTTON CAPTION CHARACTERISTICS CHECKBOX CLASS ")
93 _T("COMBOBOX CONTROL CTEXT CURSOR DEFPUSHBUTTON DIALOG DIALOGEX ")
94 _T("DISCARDABLE EDITTEXT END EXSTYLE FONT GROUPBOX ICON LANGUAGE ")
95 _T("LISTBOX LTEXT MENU MENUEX MENUITEM MESSAGETABLE POPUP PUSHBUTTON ")
96 _T("RADIOBUTTON RCDATA RTEXT SCROLLBAR SEPARATOR SHIFT STATE3 ")
97 _T("STRINGTABLE STYLE TEXTINCLUDE VALUE VERSION VERSIONINFO VIRTKEY");
88a8b04e
RD
98
99
100//----------------------------------------------------------------------------
101//! languages
102const LanguageInfo g_LanguagePrefs [] = {
103 // C++
104 {_T("C++"),
105 _T("*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma"),
106 wxSTC_LEX_CPP,
107 {{mySTC_TYPE_DEFAULT, NULL},
108 {mySTC_TYPE_COMMENT, NULL},
109 {mySTC_TYPE_COMMENT_LINE, NULL},
110 {mySTC_TYPE_COMMENT_DOC, NULL},
111 {mySTC_TYPE_NUMBER, NULL},
112 {mySTC_TYPE_WORD1, CppWordlist1}, // KEYWORDS
113 {mySTC_TYPE_STRING, NULL},
114 {mySTC_TYPE_CHARACTER, NULL},
115 {mySTC_TYPE_UUID, NULL},
116 {mySTC_TYPE_PREPROCESSOR, NULL},
117 {mySTC_TYPE_OPERATOR, NULL},
118 {mySTC_TYPE_IDENTIFIER, NULL},
119 {mySTC_TYPE_STRING_EOL, NULL},
120 {mySTC_TYPE_DEFAULT, NULL}, // VERBATIM
121 {mySTC_TYPE_REGEX, NULL},
122 {mySTC_TYPE_COMMENT_SPECIAL, NULL}, // DOXY
123 {mySTC_TYPE_WORD2, CppWordlist2}, // EXTRA WORDS
124 {mySTC_TYPE_WORD3, CppWordlist3}, // DOXY KEYWORDS
125 {mySTC_TYPE_ERROR, NULL}, // KEYWORDS ERROR
126 {-1, NULL},
127 {-1, NULL},
128 {-1, NULL},
129 {-1, NULL},
130 {-1, NULL},
131 {-1, NULL},
132 {-1, NULL},
133 {-1, NULL},
134 {-1, NULL},
135 {-1, NULL},
136 {-1, NULL},
137 {-1, NULL},
138 {-1, NULL}},
139 mySTC_FOLD_COMMENT | mySTC_FOLD_COMPACT | mySTC_FOLD_PREPROC},
140 // Python
141 {_T("Python"),
142 _T("*.py;*.pyw"),
143 wxSTC_LEX_PYTHON,
144 {{mySTC_TYPE_DEFAULT, NULL},
145 {mySTC_TYPE_COMMENT_LINE, NULL},
146 {mySTC_TYPE_NUMBER, NULL},
147 {mySTC_TYPE_STRING, NULL},
148 {mySTC_TYPE_CHARACTER, NULL},
149 {mySTC_TYPE_WORD1, PythonWordlist1}, // KEYWORDS
150 {mySTC_TYPE_DEFAULT, NULL}, // TRIPLE
151 {mySTC_TYPE_DEFAULT, NULL}, // TRIPLEDOUBLE
152 {mySTC_TYPE_DEFAULT, NULL}, // CLASSNAME
153 {mySTC_TYPE_DEFAULT, PythonWordlist2}, // DEFNAME
154 {mySTC_TYPE_OPERATOR, NULL},
155 {mySTC_TYPE_IDENTIFIER, NULL},
156 {mySTC_TYPE_DEFAULT, NULL}, // COMMENT_BLOCK
157 {mySTC_TYPE_STRING_EOL, NULL},
158 {-1, NULL},
159 {-1, NULL},
160 {-1, NULL},
161 {-1, NULL},
162 {-1, NULL},
163 {-1, NULL},
164 {-1, NULL},
165 {-1, NULL},
166 {-1, NULL},
167 {-1, NULL},
168 {-1, NULL},
169 {-1, NULL},
170 {-1, NULL},
171 {-1, NULL},
172 {-1, NULL},
173 {-1, NULL},
174 {-1, NULL},
175 {-1, NULL}},
176 mySTC_FOLD_COMMENTPY | mySTC_FOLD_QUOTESPY},
177 // * (any)
178 {(wxChar *)DEFAULT_LANGUAGE,
179 _T("*.*"),
180 wxSTC_LEX_PROPERTIES,
181 {{mySTC_TYPE_DEFAULT, NULL},
182 {mySTC_TYPE_DEFAULT, NULL},
183 {mySTC_TYPE_DEFAULT, NULL},
184 {mySTC_TYPE_DEFAULT, NULL},
185 {mySTC_TYPE_DEFAULT, NULL},
186 {-1, NULL},
187 {-1, NULL},
188 {-1, NULL},
189 {-1, NULL},
190 {-1, NULL},
191 {-1, NULL},
192 {-1, NULL},
193 {-1, NULL},
194 {-1, NULL},
195 {-1, NULL},
196 {-1, NULL},
197 {-1, NULL},
198 {-1, NULL},
199 {-1, NULL},
200 {-1, NULL},
201 {-1, NULL},
202 {-1, NULL},
203 {-1, NULL},
204 {-1, NULL},
205 {-1, NULL},
206 {-1, NULL},
207 {-1, NULL},
208 {-1, NULL},
209 {-1, NULL},
210 {-1, NULL},
211 {-1, NULL},
212 {-1, NULL}},
213 0},
214 };
215
216const int g_LanguagePrefsSize = WXSIZEOF(g_LanguagePrefs);
217
218//----------------------------------------------------------------------------
219//! style types
220const StyleInfo g_StylePrefs [] = {
221 // mySTC_TYPE_DEFAULT
222 {_T("Default"),
223 _T("BLACK"), _T("WHITE"),
224 _T(""), 10, 0, 0},
225
226 // mySTC_TYPE_WORD1
227 {_T("Keyword1"),
228 _T("BLUE"), _T("WHITE"),
229 _T(""), 10, mySTC_STYLE_BOLD, 0},
230
231 // mySTC_TYPE_WORD2
232 {_T("Keyword2"),
233 _T("DARK BLUE"), _T("WHITE"),
234 _T(""), 10, 0, 0},
235
236 // mySTC_TYPE_WORD3
237 {_T("Keyword3"),
238 _T("CORNFLOWER BLUE"), _T("WHITE"),
239 _T(""), 10, 0, 0},
240
241 // mySTC_TYPE_WORD4
242 {_T("Keyword4"),
243 _T("CYAN"), _T("WHITE"),
244 _T(""), 10, 0, 0},
245
246 // mySTC_TYPE_WORD5
247 {_T("Keyword5"),
248 _T("DARK GREY"), _T("WHITE"),
249 _T(""), 10, 0, 0},
250
251 // mySTC_TYPE_WORD6
252 {_T("Keyword6"),
253 _T("GREY"), _T("WHITE"),
254 _T(""), 10, 0, 0},
255
256 // mySTC_TYPE_COMMENT
257 {_T("Comment"),
258 _T("FOREST GREEN"), _T("WHITE"),
259 _T(""), 10, 0, 0},
260
261 // mySTC_TYPE_COMMENT_DOC
262 {_T("Comment (Doc)"),
263 _T("FOREST GREEN"), _T("WHITE"),
264 _T(""), 10, 0, 0},
265
266 // mySTC_TYPE_COMMENT_LINE
267 {_T("Comment line"),
268 _T("FOREST GREEN"), _T("WHITE"),
269 _T(""), 10, 0, 0},
270
271 // mySTC_TYPE_COMMENT_SPECIAL
272 {_T("Special comment"),
273 _T("FOREST GREEN"), _T("WHITE"),
274 _T(""), 10, mySTC_STYLE_ITALIC, 0},
275
276 // mySTC_TYPE_CHARACTER
277 {_T("Character"),
278 _T("KHAKI"), _T("WHITE"),
279 _T(""), 10, 0, 0},
280
281 // mySTC_TYPE_CHARACTER_EOL
282 {_T("Character (EOL)"),
283 _T("KHAKI"), _T("WHITE"),
284 _T(""), 10, 0, 0},
285
286 // mySTC_TYPE_STRING
287 {_T("String"),
288 _T("BROWN"), _T("WHITE"),
289 _T(""), 10, 0, 0},
290
291 // mySTC_TYPE_STRING_EOL
292 {_T("String (EOL)"),
293 _T("BROWN"), _T("WHITE"),
294 _T(""), 10, 0, 0},
295
296 // mySTC_TYPE_DELIMITER
297 {_T("Delimiter"),
298 _T("ORANGE"), _T("WHITE"),
299 _T(""), 10, 0, 0},
300
301 // mySTC_TYPE_PUNCTUATION
302 {_T("Punctuation"),
303 _T("ORANGE"), _T("WHITE"),
304 _T(""), 10, 0, 0},
305
306 // mySTC_TYPE_OPERATOR
307 {_T("Operator"),
308 _T("BLACK"), _T("WHITE"),
309 _T(""), 10, mySTC_STYLE_BOLD, 0},
310
311 // mySTC_TYPE_BRACE
312 {_T("Label"),
313 _T("VIOLET"), _T("WHITE"),
314 _T(""), 10, 0, 0},
315
316 // mySTC_TYPE_COMMAND
317 {_T("Command"),
318 _T("BLUE"), _T("WHITE"),
319 _T(""), 10, 0, 0},
320
321 // mySTC_TYPE_IDENTIFIER
322 {_T("Identifier"),
323 _T("BLACK"), _T("WHITE"),
324 _T(""), 10, 0, 0},
325
326 // mySTC_TYPE_LABEL
327 {_T("Label"),
328 _T("VIOLET"), _T("WHITE"),
329 _T(""), 10, 0, 0},
330
331 // mySTC_TYPE_NUMBER
332 {_T("Number"),
333 _T("SIENNA"), _T("WHITE"),
334 _T(""), 10, 0, 0},
335
336 // mySTC_TYPE_PARAMETER
337 {_T("Parameter"),
338 _T("VIOLET"), _T("WHITE"),
339 _T(""), 10, mySTC_STYLE_ITALIC, 0},
340
341 // mySTC_TYPE_REGEX
342 {_T("Regular expression"),
343 _T("ORCHID"), _T("WHITE"),
344 _T(""), 10, 0, 0},
345
346 // mySTC_TYPE_UUID
347 {_T("UUID"),
348 _T("ORCHID"), _T("WHITE"),
349 _T(""), 10, 0, 0},
350
351 // mySTC_TYPE_VALUE
352 {_T("Value"),
353 _T("ORCHID"), _T("WHITE"),
354 _T(""), 10, mySTC_STYLE_ITALIC, 0},
355
356 // mySTC_TYPE_PREPROCESSOR
357 {_T("Preprocessor"),
358 _T("GREY"), _T("WHITE"),
359 _T(""), 10, 0, 0},
360
361 // mySTC_TYPE_SCRIPT
362 {_T("Script"),
363 _T("DARK GREY"), _T("WHITE"),
364 _T(""), 10, 0, 0},
365
366 // mySTC_TYPE_ERROR
367 {_T("Error"),
368 _T("RED"), _T("WHITE"),
369 _T(""), 10, 0, 0},
370
371 // mySTC_TYPE_UNDEFINED
372 {_T("Undefined"),
373 _T("ORANGE"), _T("WHITE"),
374 _T(""), 10, 0, 0}
375
376 };
377
378const int g_StylePrefsSize = WXSIZEOF(g_StylePrefs);