stclanguage.cpp
gehe zur Dokumentation dieser Datei
00001 
00038 #include "muwx/stclanguage.h"       // Preferences
00039 
00040 namespace mutaborGUI {
00041 //============================================================================
00042 // declarations
00043 //============================================================================
00044 
00045 //----------------------------------------------------------------------------
00047         const CommonInfo g_CommonPrefs = {
00048                 // editor functionality prefs
00049                 true,  // syntaxEnable
00050                 true,  // foldEnable
00051                 true,  // indentEnable
00052                 // display defaults prefs
00053                 false, // overTypeInitial
00054                 false, // readOnlyInitial
00055                 false,  // wrapModeInitial
00056                 false, // displayEOLEnable
00057                 false, // IndentGuideEnable
00058                 true,  // lineNumberEnable
00059                 false, // longLineOnEnable
00060                 false, // whiteSpaceEnable
00061         };
00062 
00063 //----------------------------------------------------------------------------
00064 // keywordlists
00065 // Mutabor
00066         wxChar* MutWordlist1 =
00067                 _T("interval intervall logic logik midiin midiout tonsystem tonesystem ")
00068                 _T("tone ton retuning umstimmung pattern harmonie ");
00069         wxChar* MutWordlist2 =
00070                 _T("shifted form key taste root wurzel");
00071         wxChar* MutWordlist3 =
00072                 _T("distance abstand ");
00073 //----------------------------------------------------------------------------
00074 // keywordlists
00075 // C++
00076         wxChar* CppWordlist1 =
00077                 _T("asm auto bool break case catch char class const const_cast ")
00078                 _T("continue default delete do double dynamic_cast else enum explicit ")
00079                 _T("export extern false float for friend goto if inline int long ")
00080                 _T("mutable namespace new operator private protected public register ")
00081                 _T("reinterpret_cast return short signed sizeof static static_cast ")
00082                 _T("struct switch template this throw true try typedef typeid ")
00083                 _T("typename union unsigned using virtual void volatile wchar_t ")
00084                 _T("while");
00085         wxChar* CppWordlist2 =
00086                 _T("file");
00087         wxChar* CppWordlist3 =
00088                 _T("a addindex addtogroup anchor arg attention author b brief bug c ")
00089                 _T("class code date def defgroup deprecated dontinclude e em endcode ")
00090                 _T("endhtmlonly endif endlatexonly endlink endverbatim enum example ")
00091                 _T("exception f$ f[ f] file fn hideinitializer htmlinclude ")
00092                 _T("htmlonly if image include ingroup internal invariant interface ")
00093                 _T("latexonly li line link mainpage name namespace nosubgrouping note ")
00094                 _T("overload p page par param post pre ref relates remarks return ")
00095                 _T("retval sa section see showinitializer since skip skipline struct ")
00096                 _T("subsection test throw todo typedef union until var verbatim ")
00097                 _T("verbinclude version warning weakgroup $ @ \"\" & < > # { }");
00098 
00099 // Python
00100         wxChar* PythonWordlist1 =
00101                 _T("and assert break class continue def del elif else except exec ")
00102                 _T("finally for from global if import in is lambda None not or pass ")
00103                 _T("print raise return try while yield");
00104         wxChar* PythonWordlist2 =
00105                 _T("ACCELERATORS ALT AUTO3STATE AUTOCHECKBOX AUTORADIOBUTTON BEGIN ")
00106                 _T("BITMAP BLOCK BUTTON CAPTION CHARACTERISTICS CHECKBOX CLASS ")
00107                 _T("COMBOBOX CONTROL CTEXT CURSOR DEFPUSHBUTTON DIALOG DIALOGEX ")
00108                 _T("DISCARDABLE EDITTEXT END EXSTYLE FONT GROUPBOX ICON LANGUAGE ")
00109                 _T("LISTBOX LTEXT MENU MENUEX MENUITEM MESSAGETABLE POPUP PUSHBUTTON ")
00110                 _T("RADIOBUTTON RCDATA RTEXT SCROLLBAR SEPARATOR SHIFT STATE3 ")
00111                 _T("STRINGTABLE STYLE TEXTINCLUDE VALUE VERSION VERSIONINFO VIRTKEY");
00112 
00113 
00114 //----------------------------------------------------------------------------
00116         const LanguageInfo g_LanguagePrefs [] = {
00117                 // Mutabor
00118                 {_T("Mutabor"),
00119                  _T("*.mut;*.mus"),
00120                  wxSTC_LEX_PROPERTIES,
00121                  {{MutSTC_TYPE_DEFAULT, NULL},
00122                   {MutSTC_TYPE_COMMENT, NULL},
00123                   {MutSTC_TYPE_COMMENT_LINE, NULL},
00124                   {MutSTC_TYPE_COMMENT_DOC, NULL},
00125                   {MutSTC_TYPE_NUMBER, NULL},
00126                   {MutSTC_TYPE_WORD1, CppWordlist1}, // KEYWORDS
00127                   {MutSTC_TYPE_STRING, NULL},
00128                   {MutSTC_TYPE_CHARACTER, NULL},
00129                   {MutSTC_TYPE_UUID, NULL},
00130                   {MutSTC_TYPE_PREPROCESSOR, NULL},
00131                   {MutSTC_TYPE_OPERATOR, NULL},
00132                   {MutSTC_TYPE_IDENTIFIER, NULL},
00133                   {MutSTC_TYPE_STRING_EOL, NULL},
00134                   {MutSTC_TYPE_DEFAULT, NULL}, // VERBATIM
00135                   {MutSTC_TYPE_REGEX, NULL},
00136                   {MutSTC_TYPE_COMMENT_SPECIAL, NULL}, // DOXY
00137                   {MutSTC_TYPE_WORD2, CppWordlist2}, // EXTRA WORDS
00138                   {MutSTC_TYPE_WORD3, CppWordlist3}, // DOXY KEYWORDS
00139                   {MutSTC_TYPE_ERROR, NULL}, // KEYWORDS ERROR
00140                   {-1, NULL},
00141                   {-1, NULL},
00142                   {-1, NULL},
00143                   {-1, NULL},
00144                   {-1, NULL},
00145                   {-1, NULL},
00146                   {-1, NULL},
00147                   {-1, NULL},
00148                   {-1, NULL},
00149                   {-1, NULL},
00150                   {-1, NULL},
00151                   {-1, NULL},
00152                   {-1, NULL}},
00153                  MutSTC_FOLD_COMMENT | MutSTC_FOLD_COMPACT | MutSTC_FOLD_PREPROC},
00154                 // C++
00155                 {_T("C++"),
00156                  _T("*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma"),
00157                  wxSTC_LEX_CPP,
00158                  {{MutSTC_TYPE_DEFAULT, NULL},
00159                   {MutSTC_TYPE_COMMENT, NULL},
00160                   {MutSTC_TYPE_COMMENT_LINE, NULL},
00161                   {MutSTC_TYPE_COMMENT_DOC, NULL},
00162                   {MutSTC_TYPE_NUMBER, NULL},
00163                   {MutSTC_TYPE_WORD1, CppWordlist1}, // KEYWORDS
00164                   {MutSTC_TYPE_STRING, NULL},
00165                   {MutSTC_TYPE_CHARACTER, NULL},
00166                   {MutSTC_TYPE_UUID, NULL},
00167                   {MutSTC_TYPE_PREPROCESSOR, NULL},
00168                   {MutSTC_TYPE_OPERATOR, NULL},
00169                   {MutSTC_TYPE_IDENTIFIER, NULL},
00170                   {MutSTC_TYPE_STRING_EOL, NULL},
00171                   {MutSTC_TYPE_DEFAULT, NULL}, // VERBATIM
00172                   {MutSTC_TYPE_REGEX, NULL},
00173                   {MutSTC_TYPE_COMMENT_SPECIAL, NULL}, // DOXY
00174                   {MutSTC_TYPE_WORD2, CppWordlist2}, // EXTRA WORDS
00175                   {MutSTC_TYPE_WORD3, CppWordlist3}, // DOXY KEYWORDS
00176                   {MutSTC_TYPE_ERROR, NULL}, // KEYWORDS ERROR
00177                   {-1, NULL},
00178                   {-1, NULL},
00179                   {-1, NULL},
00180                   {-1, NULL},
00181                   {-1, NULL},
00182                   {-1, NULL},
00183                   {-1, NULL},
00184                   {-1, NULL},
00185                   {-1, NULL},
00186                   {-1, NULL},
00187                   {-1, NULL},
00188                   {-1, NULL},
00189                   {-1, NULL}},
00190                  MutSTC_FOLD_COMMENT | MutSTC_FOLD_COMPACT | MutSTC_FOLD_PREPROC},
00191                 // Python
00192                 {_T("Python"),
00193                  _T("*.py;*.pyw"),
00194                  wxSTC_LEX_PYTHON,
00195                  {{MutSTC_TYPE_DEFAULT, NULL},
00196                   {MutSTC_TYPE_COMMENT_LINE, NULL},
00197                   {MutSTC_TYPE_NUMBER, NULL},
00198                   {MutSTC_TYPE_STRING, NULL},
00199                   {MutSTC_TYPE_CHARACTER, NULL},
00200                   {MutSTC_TYPE_WORD1, PythonWordlist1}, // KEYWORDS
00201                   {MutSTC_TYPE_DEFAULT, NULL}, // TRIPLE
00202                   {MutSTC_TYPE_DEFAULT, NULL}, // TRIPLEDOUBLE
00203                   {MutSTC_TYPE_DEFAULT, NULL}, // CLASSNAME
00204                   {MutSTC_TYPE_DEFAULT, PythonWordlist2}, // DEFNAME
00205                   {MutSTC_TYPE_OPERATOR, NULL},
00206                   {MutSTC_TYPE_IDENTIFIER, NULL},
00207                   {MutSTC_TYPE_DEFAULT, NULL}, // COMMENT_BLOCK
00208                   {MutSTC_TYPE_STRING_EOL, NULL},
00209                   {-1, NULL},
00210                   {-1, NULL},
00211                   {-1, NULL},
00212                   {-1, NULL},
00213                   {-1, NULL},
00214                   {-1, NULL},
00215                   {-1, NULL},
00216                   {-1, NULL},
00217                   {-1, NULL},
00218                   {-1, NULL},
00219                   {-1, NULL},
00220                   {-1, NULL},
00221                   {-1, NULL},
00222                   {-1, NULL},
00223                   {-1, NULL},
00224                   {-1, NULL},
00225                   {-1, NULL},
00226                   {-1, NULL}},
00227                  MutSTC_FOLD_COMMENTPY | MutSTC_FOLD_QUOTESPY},
00228                 // * (any)
00229                 {(wxChar *)DEFAULT_LANGUAGE,
00230                  _T("*.*"),
00231                  wxSTC_LEX_PROPERTIES,
00232                  {{MutSTC_TYPE_DEFAULT, NULL},
00233                   {MutSTC_TYPE_DEFAULT, NULL},
00234                   {MutSTC_TYPE_DEFAULT, NULL},
00235                   {MutSTC_TYPE_DEFAULT, NULL},
00236                   {MutSTC_TYPE_DEFAULT, NULL},
00237                   {-1, NULL},
00238                   {-1, NULL},
00239                   {-1, NULL},
00240                   {-1, NULL},
00241                   {-1, NULL},
00242                   {-1, NULL},
00243                   {-1, NULL},
00244                   {-1, NULL},
00245                   {-1, NULL},
00246                   {-1, NULL},
00247                   {-1, NULL},
00248                   {-1, NULL},
00249                   {-1, NULL},
00250                   {-1, NULL},
00251                   {-1, NULL},
00252                   {-1, NULL},
00253                   {-1, NULL},
00254                   {-1, NULL},
00255                   {-1, NULL},
00256                   {-1, NULL},
00257                   {-1, NULL},
00258                   {-1, NULL},
00259                   {-1, NULL},
00260                   {-1, NULL},
00261                   {-1, NULL},
00262                   {-1, NULL},
00263                   {-1, NULL}},
00264                  0},
00265         };
00266 
00267         const int g_LanguagePrefsSize = WXSIZEOF(g_LanguagePrefs);
00268 
00269 //----------------------------------------------------------------------------
00271         const StyleInfo g_StylePrefs [] = {
00272                 // mySTC_TYPE_DEFAULT
00273                 {_T("Default"),
00274                  _T("BLACK"), _T("WHITE"),
00275                  _T(""), 10, 0, 0},
00276 
00277                 // MutSTC_TYPE_WORD1
00278                 {_T("Keyword1"),
00279                  _T("BLUE"), _T("WHITE"),
00280                  _T(""), 10, MutSTC_STYLE_BOLD, 0},
00281 
00282                 // MutSTC_TYPE_WORD2
00283                 {_T("Keyword2"),
00284                  _T("DARK BLUE"), _T("WHITE"),
00285                  _T(""), 10, 0, 0},
00286 
00287                 // MutSTC_TYPE_WORD3
00288                 {_T("Keyword3"),
00289                  _T("CORNFLOWER BLUE"), _T("WHITE"),
00290                  _T(""), 10, 0, 0},
00291 
00292                 // MutSTC_TYPE_WORD4
00293                 {_T("Keyword4"),
00294                  _T("CYAN"), _T("WHITE"),
00295                  _T(""), 10, 0, 0},
00296 
00297                 // MutSTC_TYPE_WORD5
00298                 {_T("Keyword5"),
00299                  _T("DARK GREY"), _T("WHITE"),
00300                  _T(""), 10, 0, 0},
00301 
00302                 // MutSTC_TYPE_WORD6
00303                 {_T("Keyword6"),
00304                  _T("GREY"), _T("WHITE"),
00305                  _T(""), 10, 0, 0},
00306 
00307                 // MutSTC_TYPE_COMMENT
00308                 {_T("Comment"),
00309                  _T("FOREST GREEN"), _T("WHITE"),
00310                  _T(""), 10, 0, 0},
00311 
00312                 // MutSTC_TYPE_COMMENT_DOC
00313                 {_T("Comment (Doc)"),
00314                  _T("FOREST GREEN"), _T("WHITE"),
00315                  _T(""), 10, 0, 0},
00316 
00317                 // MutSTC_TYPE_COMMENT_LINE
00318                 {_T("Comment line"),
00319                  _T("FOREST GREEN"), _T("WHITE"),
00320                  _T(""), 10, 0, 0},
00321 
00322                 // MutSTC_TYPE_COMMENT_SPECIAL
00323                 {_T("Special comment"),
00324                  _T("FOREST GREEN"), _T("WHITE"),
00325                  _T(""), 10, MutSTC_STYLE_ITALIC, 0},
00326 
00327                 // MutSTC_TYPE_CHARACTER
00328                 {_T("Character"),
00329                  _T("KHAKI"), _T("WHITE"),
00330                  _T(""), 10, 0, 0},
00331 
00332                 // MutSTC_TYPE_CHARACTER_EOL
00333                 {_T("Character (EOL)"),
00334                  _T("KHAKI"), _T("WHITE"),
00335                  _T(""), 10, 0, 0},
00336 
00337                 // MutSTC_TYPE_STRING
00338                 {_T("String"),
00339                  _T("BROWN"), _T("WHITE"),
00340                  _T(""), 10, 0, 0},
00341 
00342                 // MutSTC_TYPE_STRING_EOL
00343                 {_T("String (EOL)"),
00344                  _T("BROWN"), _T("WHITE"),
00345                  _T(""), 10, 0, 0},
00346 
00347                 // MutSTC_TYPE_DELIMITER
00348                 {_T("Delimiter"),
00349                  _T("ORANGE"), _T("WHITE"),
00350                  _T(""), 10, 0, 0},
00351 
00352                 // MutSTC_TYPE_PUNCTUATION
00353                 {_T("Punctuation"),
00354                  _T("ORANGE"), _T("WHITE"),
00355                  _T(""), 10, 0, 0},
00356 
00357                 // MutSTC_TYPE_OPERATOR
00358                 {_T("Operator"),
00359                  _T("BLACK"), _T("WHITE"),
00360                  _T(""), 10, MutSTC_STYLE_BOLD, 0},
00361 
00362                 // MutSTC_TYPE_BRACE
00363                 {_T("Label"),
00364                  _T("VIOLET"), _T("WHITE"),
00365                  _T(""), 10, 0, 0},
00366 
00367                 // MutSTC_TYPE_COMMAND
00368                 {_T("Command"),
00369                  _T("BLUE"), _T("WHITE"),
00370                  _T(""), 10, 0, 0},
00371 
00372                 // MutSTC_TYPE_IDENTIFIER
00373                 {_T("Identifier"),
00374                  _T("BLACK"), _T("WHITE"),
00375                  _T(""), 10, 0, 0},
00376 
00377                 // MutSTC_TYPE_LABEL
00378                 {_T("Label"),
00379                  _T("VIOLET"), _T("WHITE"),
00380                  _T(""), 10, 0, 0},
00381 
00382                 // MutSTC_TYPE_NUMBER
00383                 {_T("Number"),
00384                  _T("SIENNA"), _T("WHITE"),
00385                  _T(""), 10, 0, 0},
00386 
00387                 // MutSTC_TYPE_PARAMETER
00388                 {_T("Parameter"),
00389                  _T("VIOLET"), _T("WHITE"),
00390                  _T(""), 10, MutSTC_STYLE_ITALIC, 0},
00391 
00392                 // MutSTC_TYPE_REGEX
00393                 {_T("Regular expression"),
00394                  _T("ORCHID"), _T("WHITE"),
00395                  _T(""), 10, 0, 0},
00396 
00397                 // MutSTC_TYPE_UUID
00398                 {_T("UUID"),
00399                  _T("ORCHID"), _T("WHITE"),
00400                  _T(""), 10, 0, 0},
00401 
00402                 // MutSTC_TYPE_VALUE
00403                 {_T("Value"),
00404                  _T("ORCHID"), _T("WHITE"),
00405                  _T(""), 10, MutSTC_STYLE_ITALIC, 0},
00406 
00407                 // MutSTC_TYPE_PREPROCESSOR
00408                 {_T("Preprocessor"),
00409                  _T("GREY"), _T("WHITE"),
00410                  _T(""), 10, 0, 0},
00411 
00412                 // MutSTC_TYPE_SCRIPT
00413                 {_T("Script"),
00414                  _T("DARK GREY"), _T("WHITE"),
00415                  _T(""), 10, 0, 0},
00416 
00417                 // MutSTC_TYPE_ERROR
00418                 {_T("Error"),
00419                  _T("RED"), _T("WHITE"),
00420                  _T(""), 10, 0, 0},
00421 
00422                 // MutSTC_TYPE_UNDEFINED
00423                 {_T("Undefined"),
00424                  _T("ORANGE"), _T("WHITE"),
00425                  _T(""), 10, 0, 0}
00426 
00427         };
00428 
00429         const int g_StylePrefsSize = WXSIZEOF(g_StylePrefs);
00430 
00431 
00432 }
00433 

Erzeugt am Sun Aug 21 2011 10:51:55 für Mutabor von doxygen 1.7.4