summaryrefslogtreecommitdiff
path: root/editor/code_editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/code_editor.h')
-rw-r--r--editor/code_editor.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/editor/code_editor.h b/editor/code_editor.h
index e6dadbd6fa..f368305e85 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -57,6 +57,8 @@ public:
GotoLineDialog();
};
+class CodeTextEditor;
+
class FindReplaceBar : public HBoxContainer {
GDCLASS(FindReplaceBar, HBoxContainer);
@@ -77,6 +79,7 @@ class FindReplaceBar : public HBoxContainer {
HBoxContainer *hbc_button_replace;
HBoxContainer *hbc_option_replace;
+ CodeTextEditor *base_text_editor = nullptr;
CodeEdit *text_editor;
int result_line;
@@ -96,8 +99,8 @@ class FindReplaceBar : public HBoxContainer {
void _editor_text_changed();
void _search_options_changed(bool p_pressed);
void _search_text_changed(const String &p_text);
- void _search_text_entered(const String &p_text);
- void _replace_text_entered(const String &p_text);
+ void _search_text_submitted(const String &p_text);
+ void _replace_text_submitted(const String &p_text);
void _update_size();
protected:
@@ -120,7 +123,7 @@ public:
bool is_selection_only() const;
void set_error(const String &p_label);
- void set_text_edit(CodeEdit *p_text_edit);
+ void set_text_edit(CodeTextEditor *p_text_editor);
void popup_search(bool p_show_only = false);
void popup_replace();
@@ -138,7 +141,7 @@ class CodeTextEditor : public VBoxContainer {
GDCLASS(CodeTextEditor, VBoxContainer);
CodeEdit *text_editor;
- FindReplaceBar *find_replace_bar;
+ FindReplaceBar *find_replace_bar = nullptr;
HBoxContainer *status_bar;
Button *toggle_scripts_button;
@@ -243,6 +246,8 @@ public:
void update_line_and_column() { _line_col_changed(); }
CodeEdit *get_text_editor() { return text_editor; }
FindReplaceBar *get_find_replace_bar() { return find_replace_bar; }
+ void set_find_replace_bar(FindReplaceBar *p_bar);
+ void remove_find_replace_bar();
virtual void apply_code() {}
void goto_error();