MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / set_text_edit

Method set_text_edit

editor/gui/code_editor.cpp:730–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

728}
729
730void FindReplaceBar::set_text_edit(CodeTextEditor *p_text_editor) {
731 if (p_text_editor == base_text_editor) {
732 return;
733 }
734
735 if (base_text_editor) {
736 text_editor->set_search_text(String());
737 base_text_editor->remove_find_replace_bar();
738 base_text_editor = nullptr;
739 text_editor->disconnect(SceneStringName(text_changed), callable_mp(this, &FindReplaceBar::_editor_text_changed));
740 text_editor = nullptr;
741 }
742
743 if (!p_text_editor) {
744 return;
745 }
746
747 results_count = -1;
748 results_count_to_current = -1;
749 needs_to_count_results = true;
750 base_text_editor = p_text_editor;
751 text_editor = base_text_editor->get_text_editor();
752 text_editor->connect(SceneStringName(text_changed), callable_mp(this, &FindReplaceBar::_editor_text_changed));
753
754 _editor_text_changed();
755}
756
757void FindReplaceBar::_bind_methods() {
758 ClassDB::bind_method("_search_current", &FindReplaceBar::search_current);

Callers 5

_update_cacheMethod · 0.45
set_find_replace_barMethod · 0.45
_notificationMethod · 0.45
EditorHelpHighlighterMethod · 0.45

Calls 6

get_text_editorMethod · 0.80
disconnectMethod · 0.65
connectMethod · 0.65
StringClass · 0.50
set_search_textMethod · 0.45

Tested by

no test coverage detected