diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2020-05-03 17:08:15 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2020-07-11 17:09:58 +0100 |
commit | bc4cee44582d2a90d0792d6b213f00be1043000b (patch) | |
tree | 001ab82ed2bd7c6b59a7cc06807cce988c484d66 /editor/plugins/text_editor.h | |
parent | 156daddaaf16e36eb932452d1e30f4f77d29aae6 (diff) | |
download | redot-engine-bc4cee44582d2a90d0792d6b213f00be1043000b.tar.gz |
Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighter
- Extacted all syntax highlighting code from text edit
- Removed enable syntax highlighting from text edit
- Added line_edited_from signal to text_edit
- Renamed get/set_syntax_highlighting to get/set_syntax_highlighter
- Added EditorSyntaxHighligher
Diffstat (limited to 'editor/plugins/text_editor.h')
-rw-r--r-- | editor/plugins/text_editor.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h index 0db8f70a85..5299776b56 100644 --- a/editor/plugins/text_editor.h +++ b/editor/plugins/text_editor.h @@ -50,16 +50,6 @@ private: GotoLineDialog *goto_line_dialog; - struct ColorsCache { - Color font_color; - Color symbol_color; - Color keyword_color; - Color basetype_color; - Color type_color; - Color comment_color; - Color string_color; - } colors_cache; - enum { EDIT_UNDO, EDIT_REDO, @@ -104,7 +94,7 @@ protected: void _make_context_menu(bool p_selection, bool p_can_fold, bool p_is_folded, Vector2 p_position); void _text_edit_gui_input(const Ref<InputEvent> &ev); - Map<String, Ref<SyntaxHighlighter> > highlighters; + Map<String, Ref<EditorSyntaxHighlighter>> highlighters; void _change_syntax_highlighter(int p_idx); void _load_theme_settings(); @@ -116,8 +106,8 @@ protected: void _bookmark_item_pressed(int p_idx); public: - virtual void add_syntax_highlighter(Ref<SyntaxHighlighter> p_highlighter) override; - virtual void set_syntax_highlighter(Ref<SyntaxHighlighter> p_highlighter) override; + virtual void add_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) override; + virtual void set_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) override; virtual String get_name() override; virtual Ref<Texture2D> get_theme_icon() override; |