summaryrefslogtreecommitdiff
path: root/tools/editor/code_editor.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-08-02 19:11:05 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-08-02 19:11:05 -0300
commitad313097ebcb2a0c02c956fdf74a6610c3f7c9a8 (patch)
tree2c02ecaaa80bfdcf01e4061f27b808e748cdc580 /tools/editor/code_editor.h
parent221cb58382ae34d4f91d9923fd979a328feabace (diff)
WIP visual scripting, not working yet but you can check out stuff
Diffstat (limited to 'tools/editor/code_editor.h')
-rw-r--r--tools/editor/code_editor.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/editor/code_editor.h b/tools/editor/code_editor.h
index 7983c46f7a..f6c3ac7564 100644
--- a/tools/editor/code_editor.h
+++ b/tools/editor/code_editor.h
@@ -189,6 +189,8 @@ public:
};
+typedef void (*CodeTextEditorCodeCompleteFunc)(void* p_ud,const String& p_code, List<String>* r_options);
+
class CodeTextEditor : public VBoxContainer {
OBJ_TYPE(CodeTextEditor,VBoxContainer);
@@ -218,13 +220,16 @@ class CodeTextEditor : public VBoxContainer {
void _zoom_out();
void _reset_zoom();
+
+ CodeTextEditorCodeCompleteFunc code_complete_func;
+ void *code_complete_ud;
+
protected:
- void set_error(const String& p_error);
virtual void _load_theme_settings() {}
- virtual void _validate_script()=0;
- virtual void _code_complete_script(const String& p_code, List<String>* r_options) {};
+ virtual void _validate_script() {}
+ virtual void _code_complete_script(const String& p_code, List<String>* r_options) {}
void _text_changed_idle_timeout();
void _code_complete_timer_timeout();
@@ -235,10 +240,16 @@ protected:
public:
+ void set_error(const String& p_error);
+ void update_line_and_column() { _line_col_changed(); }
TextEdit *get_text_edit() { return text_editor; }
FindReplaceBar *get_find_replace_bar() { return find_replace_bar; }
virtual void apply_code() {}
+
+ void set_code_complete_func(CodeTextEditorCodeCompleteFunc p_code_complete_func, void * p_ud);
+
+
CodeTextEditor();
};