| 1239 | } |
| 1240 | |
| 1241 | std::string UICodeEditor::getCodeEditorFlags( bool enabled ) const { |
| 1242 | std::string flags; |
| 1243 | if ( mShowLineNumber == enabled ) |
| 1244 | flags += "linenumber|"; |
| 1245 | if ( mShowFoldingRegion == enabled ) |
| 1246 | flags += "foldingregion|"; |
| 1247 | if ( mShowWhitespaces == enabled ) |
| 1248 | flags += "whitespaces|"; |
| 1249 | if ( mShowLineEndings == enabled ) |
| 1250 | flags += "lineendings|"; |
| 1251 | if ( mHighlightCurrentLine == enabled ) |
| 1252 | flags += "highlightcurrentline|"; |
| 1253 | if ( mHighlightMatchingBracket == enabled ) |
| 1254 | flags += "highlightmatchingbracket|"; |
| 1255 | if ( mHighlightSelectionMatch == enabled ) |
| 1256 | flags += "highlightselectionmatch|"; |
| 1257 | if ( mEnableColorPickerOnSelection == enabled ) |
| 1258 | flags += "colorpickeronselection|"; |
| 1259 | if ( mEnableInlineColorBoxes == enabled ) |
| 1260 | flags += "inlinecolorboxes|"; |
| 1261 | if ( getVerticalScrollBarEnabled() == enabled ) |
| 1262 | flags += "verticalscrollbar|"; |
| 1263 | if ( mColorPreview == enabled ) |
| 1264 | flags += "colorpreview|"; |
| 1265 | if ( mInteractiveLinks == enabled ) |
| 1266 | flags += "interactivelinks|"; |
| 1267 | if ( mDisplayLoaderIfDocumentLoading == enabled ) |
| 1268 | flags += "displayloader|"; |
| 1269 | if ( mCreateDefaultContextMenuOptions == enabled ) |
| 1270 | flags += "defaultcontextmenu|"; |
| 1271 | if ( mMinimapEnabled == enabled ) |
| 1272 | flags += "minimap|"; |
| 1273 | if ( mAutoCloseXMLTags == enabled ) |
| 1274 | flags += "autoclosexmltags|"; |
| 1275 | if ( mFindReplaceEnabled == enabled ) |
| 1276 | flags += "findreplace|"; |
| 1277 | if ( mShowIndentationGuides == enabled ) |
| 1278 | flags += "showindentationguides|"; |
| 1279 | if ( mShowLinesRelativePosition == enabled ) |
| 1280 | flags += "linesrelativeposition|"; |
| 1281 | if ( mDisplayLockedIcon == enabled ) |
| 1282 | flags += "lockedicon|"; |
| 1283 | if ( mFoldsAlwaysVisible == enabled ) |
| 1284 | flags += "foldsalwaysvisible|"; |
| 1285 | if ( mFoldsVisible == enabled ) |
| 1286 | flags += "foldsvisible|"; |
| 1287 | if ( mUseDefaultStyle == enabled ) |
| 1288 | flags += "defaultstyle|"; |
| 1289 | |
| 1290 | if ( !flags.empty() ) |
| 1291 | flags.pop_back(); |
| 1292 | return flags; |
| 1293 | } |
| 1294 | |
| 1295 | Uint32 UICodeEditor::onKeyDown( const KeyEvent& event ) { |
| 1296 | if ( getUISceneNode()->getWindow()->getIME().isEditing() ) |