1 //////////////////////////////////////////////////////////////////////////////
2 // File: contrib/samples/stc/prefs.cpp
3 // Purpose: STC test Preferences initialization
7 // Copyright: (c) wxGuide
8 // Licence: wxWindows licence
9 //////////////////////////////////////////////////////////////////////////////
11 //----------------------------------------------------------------------------
13 //----------------------------------------------------------------------------
15 // For compilers that support precompilation, includes "wx/wx.h".
16 #include "wx/wxprec.h"
22 // for all others, include the necessary headers (this file is usually all you
23 // need because it includes almost all 'standard' wxWidgets headers)
30 //! wxWidgets/contrib headers
32 //! application headers
33 #include "defsext.h" // Additional definitions
34 #include "prefs.h" // Preferences
37 //============================================================================
39 //============================================================================
41 //----------------------------------------------------------------------------
43 const CommonInfo g_CommonPrefs
= {
44 // editor functionality prefs
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
59 //----------------------------------------------------------------------------
62 const char* CppWordlist1
=
63 "asm auto bool break case catch char class const const_cast "
64 "continue default delete do double dynamic_cast else enum explicit "
65 "export extern false float for friend goto if inline int long "
66 "mutable namespace new operator private protected public register "
67 "reinterpret_cast return short signed sizeof static static_cast "
68 "struct switch template this throw true try typedef typeid "
69 "typename union unsigned using virtual void volatile wchar_t "
71 const char* CppWordlist2
=
73 const char* CppWordlist3
=
74 "a addindex addtogroup anchor arg attention author b brief bug c "
75 "class code date def defgroup deprecated dontinclude e em endcode "
76 "endhtmlonly endif endlatexonly endlink endverbatim enum example "
77 "exception f$ f[ f] file fn hideinitializer htmlinclude "
78 "htmlonly if image include ingroup internal invariant interface "
79 "latexonly li line link mainpage name namespace nosubgrouping note "
80 "overload p page par param post pre ref relates remarks return "
81 "retval sa section see showinitializer since skip skipline struct "
82 "subsection test throw todo typedef union until var verbatim "
83 "verbinclude version warning weakgroup $ @ \"\" & < > # { }";
86 const char* PythonWordlist1
=
87 "and assert break class continue def del elif else except exec "
88 "finally for from global if import in is lambda None not or pass "
89 "print raise return try while yield";
90 const char* PythonWordlist2
=
91 "ACCELERATORS ALT AUTO3STATE AUTOCHECKBOX AUTORADIOBUTTON BEGIN "
92 "BITMAP BLOCK BUTTON CAPTION CHARACTERISTICS CHECKBOX CLASS "
93 "COMBOBOX CONTROL CTEXT CURSOR DEFPUSHBUTTON DIALOG DIALOGEX "
94 "DISCARDABLE EDITTEXT END EXSTYLE FONT GROUPBOX ICON LANGUAGE "
95 "LISTBOX LTEXT MENU MENUEX MENUITEM MESSAGETABLE POPUP PUSHBUTTON "
96 "RADIOBUTTON RCDATA RTEXT SCROLLBAR SEPARATOR SHIFT STATE3 "
97 "STRINGTABLE STYLE TEXTINCLUDE VALUE VERSION VERSIONINFO VIRTKEY";
100 //----------------------------------------------------------------------------
102 const LanguageInfo g_LanguagePrefs
[] = {
105 "*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma",
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
139 mySTC_FOLD_COMMENT
| mySTC_FOLD_COMPACT
| mySTC_FOLD_PREPROC
},
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
},
176 mySTC_FOLD_COMMENTPY
| mySTC_FOLD_QUOTESPY
},
178 {wxTRANSLATE(DEFAULT_LANGUAGE
),
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
},
216 const int g_LanguagePrefsSize
= WXSIZEOF(g_LanguagePrefs
);
218 //----------------------------------------------------------------------------
220 const StyleInfo g_StylePrefs
[] = {
221 // mySTC_TYPE_DEFAULT
223 wxT("BLACK"), wxT("WHITE"),
228 wxT("BLUE"), wxT("WHITE"),
229 wxT(""), 10, mySTC_STYLE_BOLD
, 0},
233 wxT("DARK BLUE"), wxT("WHITE"),
238 wxT("CORNFLOWER BLUE"), wxT("WHITE"),
243 wxT("CYAN"), wxT("WHITE"),
248 wxT("DARK GREY"), wxT("WHITE"),
253 wxT("GREY"), wxT("WHITE"),
256 // mySTC_TYPE_COMMENT
258 wxT("FOREST GREEN"), wxT("WHITE"),
261 // mySTC_TYPE_COMMENT_DOC
262 {wxT("Comment (Doc)"),
263 wxT("FOREST GREEN"), wxT("WHITE"),
266 // mySTC_TYPE_COMMENT_LINE
267 {wxT("Comment line"),
268 wxT("FOREST GREEN"), wxT("WHITE"),
271 // mySTC_TYPE_COMMENT_SPECIAL
272 {wxT("Special comment"),
273 wxT("FOREST GREEN"), wxT("WHITE"),
274 wxT(""), 10, mySTC_STYLE_ITALIC
, 0},
276 // mySTC_TYPE_CHARACTER
278 wxT("KHAKI"), wxT("WHITE"),
281 // mySTC_TYPE_CHARACTER_EOL
282 {wxT("Character (EOL)"),
283 wxT("KHAKI"), wxT("WHITE"),
288 wxT("BROWN"), wxT("WHITE"),
291 // mySTC_TYPE_STRING_EOL
292 {wxT("String (EOL)"),
293 wxT("BROWN"), wxT("WHITE"),
296 // mySTC_TYPE_DELIMITER
298 wxT("ORANGE"), wxT("WHITE"),
301 // mySTC_TYPE_PUNCTUATION
303 wxT("ORANGE"), wxT("WHITE"),
306 // mySTC_TYPE_OPERATOR
308 wxT("BLACK"), wxT("WHITE"),
309 wxT(""), 10, mySTC_STYLE_BOLD
, 0},
313 wxT("VIOLET"), wxT("WHITE"),
316 // mySTC_TYPE_COMMAND
318 wxT("BLUE"), wxT("WHITE"),
321 // mySTC_TYPE_IDENTIFIER
323 wxT("BLACK"), wxT("WHITE"),
328 wxT("VIOLET"), wxT("WHITE"),
333 wxT("SIENNA"), wxT("WHITE"),
336 // mySTC_TYPE_PARAMETER
338 wxT("VIOLET"), wxT("WHITE"),
339 wxT(""), 10, mySTC_STYLE_ITALIC
, 0},
342 {wxT("Regular expression"),
343 wxT("ORCHID"), wxT("WHITE"),
348 wxT("ORCHID"), wxT("WHITE"),
353 wxT("ORCHID"), wxT("WHITE"),
354 wxT(""), 10, mySTC_STYLE_ITALIC
, 0},
356 // mySTC_TYPE_PREPROCESSOR
357 {wxT("Preprocessor"),
358 wxT("GREY"), wxT("WHITE"),
363 wxT("DARK GREY"), wxT("WHITE"),
368 wxT("RED"), wxT("WHITE"),
371 // mySTC_TYPE_UNDEFINED
373 wxT("ORANGE"), wxT("WHITE"),
378 const int g_StylePrefsSize
= WXSIZEOF(g_StylePrefs
);