Added auto-complete toggle and some minor improvements to the Code Editor.

This commit is contained in:
Martín Lucas Golini
2020-07-02 05:06:07 -03:00
parent 916e7b42ce
commit f07acb13a0
8 changed files with 162 additions and 84 deletions

View File

@@ -46,9 +46,32 @@ struct WindowConfig {
bool maximized{false};
};
struct CodeEditorConfig {
std::string colorScheme{"lite"};
StyleSheetLength fontSize{12, StyleSheetLength::Dp};
bool showLineNumbers{true};
bool showWhiteSpaces{true};
bool highlightMatchingBracket{true};
bool horizontalScrollbar{false};
bool highlightCurrentLine{true};
bool trimTrailingWhitespaces{false};
bool forceNewLineAtEndOfFile{false};
bool autoDetectIndentType{true};
bool writeUnicodeBOM{false};
bool indentSpaces{false};
bool windowsLineEndings{false};
bool highlightSelectionMatch{true};
bool colorPickerSelection{false};
bool colorPreview{false};
bool autoComplete{true};
int indentWidth{4};
int tabWidth{4};
int lineBreakingColumn{100};
};
struct AppConfig {
WindowConfig window;
UICodeEditorSplitter::CodeEditorConfig editor;
CodeEditorConfig editor;
UIConfig ui;
};
@@ -191,13 +214,15 @@ class App : public UICodeEditorSplitter::Client {
void onDocumentLoaded( UICodeEditor* codeEditor, const std::string& path );
const UICodeEditorSplitter::CodeEditorConfig& getCodeEditorConfig() const;
const CodeEditorConfig& getCodeEditorConfig() const;
void onCodeEditorCreated( UICodeEditor*, TextDocument& doc );
void onDocumentSelectionChange( UICodeEditor* editor, TextDocument& );
void onCodeEditorFocusChange( UICodeEditor* editor );
bool setAutoComplete( bool enable );
};
#endif // EE_TOOLS_CODEEDITOR_HPP