1 //////////////////////////////////////////////////////////////////////////////
2 // File: contrib/samples/stc/prefs.cpp
3 // Purpose: STC test Preferences initialization
6 // Copyright: (c) wxGuide
7 // Licence: wxWindows licence
8 //////////////////////////////////////////////////////////////////////////////
10 //----------------------------------------------------------------------------
12 //----------------------------------------------------------------------------
14 // For compilers that support precompilation, includes "wx/wx.h".
15 #include "wx/wxprec.h"
21 // for all others, include the necessary headers (this file is usually all you
22 // need because it includes almost all 'standard' wxWidgets headers)
29 //! wxWidgets/contrib headers
31 //! application headers
32 #include "defsext.h" // Additional definitions
33 #include "prefs.h" // Preferences
36 //============================================================================
38 //============================================================================
40 //----------------------------------------------------------------------------
42 const CommonInfo g_CommonPrefs
= {
43 // editor functionality prefs
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
58 //----------------------------------------------------------------------------
61 const char* CppWordlist1
=
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 "
70 const char* CppWordlist2
=
72 const char* CppWordlist3
=
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 $ @ \"\" & < > # { }";
85 const char* PythonWordlist1
=
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";
89 const char* PythonWordlist2
=
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";
99 //----------------------------------------------------------------------------
101 const LanguageInfo g_LanguagePrefs
[] = {
104 "*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma",
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
138 mySTC_FOLD_COMMENT
| mySTC_FOLD_COMPACT
| mySTC_FOLD_PREPROC
},
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
},
175 mySTC_FOLD_COMMENTPY
| mySTC_FOLD_QUOTESPY
},
177 {wxTRANSLATE(DEFAULT_LANGUAGE
),
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
},
215 const int g_LanguagePrefsSize
= WXSIZEOF(g_LanguagePrefs
);
217 //----------------------------------------------------------------------------
219 const StyleInfo g_StylePrefs
[] = {
220 // mySTC_TYPE_DEFAULT
222 wxT("BLACK"), wxT("WHITE"),
227 wxT("BLUE"), wxT("WHITE"),
228 wxT(""), 10, mySTC_STYLE_BOLD
, 0},
232 wxT("MIDNIGHT BLUE"), wxT("WHITE"),
237 wxT("CORNFLOWER BLUE"), wxT("WHITE"),
242 wxT("CYAN"), wxT("WHITE"),
247 wxT("DARK GREY"), wxT("WHITE"),
252 wxT("GREY"), wxT("WHITE"),
255 // mySTC_TYPE_COMMENT
257 wxT("FOREST GREEN"), wxT("WHITE"),
260 // mySTC_TYPE_COMMENT_DOC
261 {wxT("Comment (Doc)"),
262 wxT("FOREST GREEN"), wxT("WHITE"),
265 // mySTC_TYPE_COMMENT_LINE
266 {wxT("Comment line"),
267 wxT("FOREST GREEN"), wxT("WHITE"),
270 // mySTC_TYPE_COMMENT_SPECIAL
271 {wxT("Special comment"),
272 wxT("FOREST GREEN"), wxT("WHITE"),
273 wxT(""), 10, mySTC_STYLE_ITALIC
, 0},
275 // mySTC_TYPE_CHARACTER
277 wxT("KHAKI"), wxT("WHITE"),
280 // mySTC_TYPE_CHARACTER_EOL
281 {wxT("Character (EOL)"),
282 wxT("KHAKI"), wxT("WHITE"),
287 wxT("BROWN"), wxT("WHITE"),
290 // mySTC_TYPE_STRING_EOL
291 {wxT("String (EOL)"),
292 wxT("BROWN"), wxT("WHITE"),
295 // mySTC_TYPE_DELIMITER
297 wxT("ORANGE"), wxT("WHITE"),
300 // mySTC_TYPE_PUNCTUATION
302 wxT("ORANGE"), wxT("WHITE"),
305 // mySTC_TYPE_OPERATOR
307 wxT("BLACK"), wxT("WHITE"),
308 wxT(""), 10, mySTC_STYLE_BOLD
, 0},
312 wxT("VIOLET"), wxT("WHITE"),
315 // mySTC_TYPE_COMMAND
317 wxT("BLUE"), wxT("WHITE"),
320 // mySTC_TYPE_IDENTIFIER
322 wxT("BLACK"), wxT("WHITE"),
327 wxT("VIOLET"), wxT("WHITE"),
332 wxT("SIENNA"), wxT("WHITE"),
335 // mySTC_TYPE_PARAMETER
337 wxT("VIOLET"), wxT("WHITE"),
338 wxT(""), 10, mySTC_STYLE_ITALIC
, 0},
341 {wxT("Regular expression"),
342 wxT("ORCHID"), wxT("WHITE"),
347 wxT("ORCHID"), wxT("WHITE"),
352 wxT("ORCHID"), wxT("WHITE"),
353 wxT(""), 10, mySTC_STYLE_ITALIC
, 0},
355 // mySTC_TYPE_PREPROCESSOR
356 {wxT("Preprocessor"),
357 wxT("GREY"), wxT("WHITE"),
362 wxT("DARK GREY"), wxT("WHITE"),
367 wxT("RED"), wxT("WHITE"),
370 // mySTC_TYPE_UNDEFINED
372 wxT("ORANGE"), wxT("WHITE"),
377 const int g_StylePrefsSize
= WXSIZEOF(g_StylePrefs
);