diff options
Diffstat (limited to 'scene/gui/text_edit.h')
-rw-r--r-- | scene/gui/text_edit.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 15c289a87e..1d57aef416 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -63,6 +63,7 @@ class TextEdit : public Control { int from_line,from_column; int to_line,to_column; + bool shiftclick_left; } selection; @@ -79,6 +80,7 @@ class TextEdit : public Control { Color mark_color; Color breakpoint_color; Color current_line_color; + Color brace_mismatch_color; int row_height; int line_spacing; @@ -138,7 +140,7 @@ class TextEdit : public Control { int size() const { return text.size(); } void clear(); void clear_caches(); - _FORCE_INLINE_ const String& operator[](int p_line) const { return text[p_line].data; } + _FORCE_INLINE_ const String& operator[](int p_line) const { return text[p_line].data; } Text() { tab_size=4; } }; @@ -185,6 +187,8 @@ class TextEdit : public Control { int completion_index; Rect2i completion_rect; int completion_line_ofs; + String completion_hint; + int completion_hint_offset; bool setting_text; @@ -208,6 +212,7 @@ class TextEdit : public Control { bool line_numbers; bool auto_brace_completion_enabled; + bool brace_matching_enabled; bool cut_copy_line; uint64_t last_dblclk; @@ -261,6 +266,7 @@ class TextEdit : public Control { void _clear(); void _cancel_completion(); + void _cancel_code_hint(); void _confirm_completion(); void _update_completion_candidates(); @@ -299,6 +305,7 @@ public: void set_text(String p_text); void insert_text_at_cursor(const String& p_text); + void insert_at(const String& p_text, int at); int get_line_count() const; void set_line_as_marked(int p_line,bool p_marked); void set_line_as_breakpoint(int p_line,bool p_breakpoint); @@ -306,12 +313,17 @@ public: void get_breakpoints(List<int> *p_breakpoints) const; String get_text(); String get_line(int line) const; + void set_line(int line, String new_text); void backspace_at_cursor(); inline void set_auto_brace_completion(bool p_enabled) { auto_brace_completion_enabled = p_enabled; } - + inline void set_brace_matching(bool p_enabled) { + brace_matching_enabled=p_enabled; + update(); + } + void cursor_set_column(int p_col); void cursor_set_line(int p_row); @@ -348,7 +360,7 @@ public: void undo(); void redo(); - void clear_undo_history(); + void clear_undo_history(); void set_draw_tabs(bool p_draw); @@ -374,10 +386,13 @@ public: void set_tooltip_request_func(Object *p_obj, const StringName& p_function, const Variant& p_udata); - void set_completion(bool p_enabled,const Vector<String>& p_prefixes); + void set_completion(bool p_enabled,const Vector<String>& p_prefixes); void code_complete(const Vector<String> &p_strings); + void set_code_hint(const String& p_hint); void query_code_comple(); + String get_text_for_completion(); + TextEdit(); ~TextEdit(); }; |