diff options
| author | Paulb23 <p_batty@hotmail.co.uk> | 2020-03-07 14:29:44 +0000 |
|---|---|---|
| committer | Paulb23 <p_batty@hotmail.co.uk> | 2020-07-11 15:40:00 +0100 |
| commit | 156daddaaf16e36eb932452d1e30f4f77d29aae6 (patch) | |
| tree | 942c5f0fe5bf8cbab99ca5534ecef4f76ea8d6b9 /editor/plugins/script_editor_plugin.h | |
| parent | 2f1080be9b032b1cf5086201e45057baa6b1a179 (diff) | |
| download | redot-engine-156daddaaf16e36eb932452d1e30f4f77d29aae6.tar.gz | |
Expose Syntax highlighter for editor plugins
Diffstat (limited to 'editor/plugins/script_editor_plugin.h')
| -rw-r--r-- | editor/plugins/script_editor_plugin.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 9f9f51de5d..4ce3b0e4ad 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -236,14 +236,12 @@ class ScriptEditor : public PanelContainer { enum { SCRIPT_EDITOR_FUNC_MAX = 32, - SYNTAX_HIGHLIGHTER_FUNC_MAX = 32 }; static int script_editor_func_count; static CreateScriptEditorFunc script_editor_funcs[SCRIPT_EDITOR_FUNC_MAX]; - static int syntax_highlighters_func_count; - static CreateSyntaxHighlighterFunc syntax_highlighters_funcs[SYNTAX_HIGHLIGHTER_FUNC_MAX]; + Vector<Ref<SyntaxHighlighter> > syntax_highlighters; struct ScriptHistory { Control *control; @@ -322,6 +320,7 @@ class ScriptEditor : public PanelContainer { void _script_created(Ref<Script> p_script); ScriptEditorBase *_get_current_editor() const; + Array _get_open_script_editors() const; void _save_layout(); void _editor_settings_changed(); @@ -441,7 +440,9 @@ public: void set_live_auto_reload_running_scripts(bool p_enabled); - static void register_create_syntax_highlighter_function(CreateSyntaxHighlighterFunc p_func); + void register_syntax_highlighter(const Ref<SyntaxHighlighter> &p_syntax_highlighter); + void unregister_syntax_highlighter(const Ref<SyntaxHighlighter> &p_syntax_highlighter); + static void register_create_script_editor_function(CreateScriptEditorFunc p_func); ScriptEditor(EditorNode *p_editor); |
