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