00001 00038 // availlable groups: GUI, route, kernel, muwx, debug, docview 00039 00040 #ifndef MUWX_STCLANGUAGE_H_INCLUDED 00041 #define MUWX_STCLANGUAGE_H_INCLUDED 00042 00043 // --------------------------------------------------------------------------- 00044 // headers 00045 // --------------------------------------------------------------------------- 00046 00047 // For compilers that support precompilation, includes "wx/wx.h". 00048 #include "Defs.h" 00049 00051 #include "wx/stc/stc.h" // styled text control 00052 00054 00055 namespace mutaborGUI { 00056 //============================================================================ 00057 // declarations 00058 //============================================================================ 00059 00060 #define DEFAULT_LANGUAGE _("<default>") 00061 00062 #define PAGE_COMMON _("Common") 00063 #define PAGE_LANGUAGES _("Languages") 00064 #define PAGE_STYLE_TYPES _("Style types") 00065 00066 #define STYLE_TYPES_COUNT 32 00067 00069 #define MutSTC_TYPE_DEFAULT 0 00070 00071 #define MutSTC_TYPE_WORD1 1 00072 #define MutSTC_TYPE_WORD2 2 00073 #define MutSTC_TYPE_WORD3 3 00074 #define MutSTC_TYPE_WORD4 4 00075 #define MutSTC_TYPE_WORD5 5 00076 #define MutSTC_TYPE_WORD6 6 00077 00078 #define MutSTC_TYPE_COMMENT 7 00079 #define MutSTC_TYPE_COMMENT_DOC 8 00080 #define MutSTC_TYPE_COMMENT_LINE 9 00081 #define MutSTC_TYPE_COMMENT_SPECIAL 10 00082 00083 #define MutSTC_TYPE_CHARACTER 11 00084 #define MutSTC_TYPE_CHARACTER_EOL 12 00085 #define MutSTC_TYPE_STRING 13 00086 #define MutSTC_TYPE_STRING_EOL 14 00087 00088 #define MutSTC_TYPE_DELIMITER 15 00089 00090 #define MutSTC_TYPE_PUNCTUATION 16 00091 00092 #define MutSTC_TYPE_OPERATOR 17 00093 00094 #define MutSTC_TYPE_BRACE 18 00095 00096 #define MutSTC_TYPE_COMMAND 19 00097 #define MutSTC_TYPE_IDENTIFIER 20 00098 #define MutSTC_TYPE_LABEL 21 00099 #define MutSTC_TYPE_NUMBER 22 00100 #define MutSTC_TYPE_PARAMETER 23 00101 #define MutSTC_TYPE_REGEX 24 00102 #define MutSTC_TYPE_UUID 25 00103 #define MutSTC_TYPE_VALUE 26 00104 00105 #define MutSTC_TYPE_PREPROCESSOR 27 00106 #define MutSTC_TYPE_SCRIPT 28 00107 00108 #define MutSTC_TYPE_ERROR 29 00109 00110 //---------------------------------------------------------------------------- 00112 #define MutSTC_STYLE_BOLD 1 00113 #define MutSTC_STYLE_ITALIC 2 00114 #define MutSTC_STYLE_UNDERL 4 00115 #define MutSTC_STYLE_HIDDEN 8 00116 00117 //---------------------------------------------------------------------------- 00119 #define MutSTC_FOLD_COMMENT 1 00120 #define MutSTC_FOLD_COMPACT 2 00121 #define MutSTC_FOLD_PREPROC 4 00122 00123 #define MutSTC_FOLD_HTML 16 00124 #define MutSTC_FOLD_HTMLPREP 32 00125 00126 #define MutSTC_FOLD_COMMENTPY 64 00127 #define MutSTC_FOLD_QUOTESPY 128 00128 00129 //---------------------------------------------------------------------------- 00131 #define MutSTC_FLAG_WRAPMODE 16 00132 00133 //---------------------------------------------------------------------------- 00135 #define MutSTC_LEX_MUTABOR 900 00136 00137 //---------------------------------------------------------------------------- 00139 #define MutSTC_MUTABOR_DEFAULT 0 00140 #define MutSTC_MUTABOR_SECTION 1 00141 #define MutSTC_MUTABOR_PARAMETER 2 00142 #define MutSTC_MUTABOR_COMMENT 3 00143 #define MutSTC_MUTABOR_IDENTIFIER 4 00144 #define MutSTC_MUTABOR_DEFNAME 5 00145 #define MutSTC_MUTABOR_OPERATOR 6 00146 #define MutSTC_MUTABOR_PAREN 6 00147 #define MutSTC_MUTABOR_BRACKET 7 00148 #define MutSTC_MUTABOR_BRACE 8 00149 #define MutSTC_MUTABOR_NUMBER 9 00150 00151 //---------------------------------------------------------------------------- 00152 // CommonInfo 00153 00154 struct CommonInfo { 00155 // editor functionality prefs 00156 bool syntaxEnable; 00157 bool foldEnable; 00158 bool indentEnable; 00159 // display defaults prefs 00160 bool readOnlyInitial; 00161 bool overTypeInitial; 00162 bool wrapModeInitial; 00163 bool displayEOLEnable; 00164 bool indentGuideEnable; 00165 bool lineNumberEnable; 00166 bool longLineOnEnable; 00167 bool whiteSpaceEnable; 00168 }; 00169 extern const CommonInfo g_CommonPrefs; 00170 00171 //---------------------------------------------------------------------------- 00172 // LanguageInfo 00173 00174 struct LanguageInfo { 00175 const wxChar *name; 00176 const wxChar *filepattern; 00177 int lexer; 00178 struct { 00179 int type; 00180 const wxChar *words; 00181 } styles [STYLE_TYPES_COUNT]; 00182 int folds; 00183 }; 00184 00185 extern const LanguageInfo g_LanguagePrefs[]; 00186 extern const int g_LanguagePrefsSize; 00187 00188 //---------------------------------------------------------------------------- 00189 // StyleInfo 00190 struct StyleInfo { 00191 wxChar *name; 00192 wxChar *foreground; 00193 wxChar *background; 00194 wxChar *fontname; 00195 int fontsize; 00196 int fontstyle; 00197 int lettercase; 00198 }; 00199 00200 extern const StyleInfo g_StylePrefs[]; 00201 extern const int g_StylePrefsSize; 00202 00203 00204 } 00205 00206 00207 #endif 00208