diff options
Diffstat (limited to 'editor/code_editor.h')
-rw-r--r-- | editor/code_editor.h | 67 |
1 files changed, 7 insertions, 60 deletions
diff --git a/editor/code_editor.h b/editor/code_editor.h index 6f4e45352b..db2e25b922 100644 --- a/editor/code_editor.h +++ b/editor/code_editor.h @@ -27,6 +27,7 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ + #ifndef CODE_EDITOR_H #define CODE_EDITOR_H @@ -62,12 +63,12 @@ class FindReplaceBar : public HBoxContainer { GDCLASS(FindReplaceBar, HBoxContainer); + Control *container; LineEdit *search_text; ToolButton *find_prev; ToolButton *find_next; CheckBox *case_sensitive; CheckBox *whole_words; - Label *error_label; TextureButton *hide_button; LineEdit *replace_text; @@ -75,9 +76,10 @@ class FindReplaceBar : public HBoxContainer { Button *replace_all; CheckBox *selection_only; - VBoxContainer *text_vbc; - HBoxContainer *replace_hbc; - HBoxContainer *replace_options_hbc; + HBoxContainer *hbc; + VBoxContainer *vbc_lineedit; + HBoxContainer *hbc_button_replace; + HBoxContainer *hbc_option_replace; TextEdit *text_edit; @@ -97,6 +99,7 @@ class FindReplaceBar : public HBoxContainer { 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 _update_size(); protected: void _notification(int p_what); @@ -130,62 +133,6 @@ public: FindReplaceBar(); }; -class FindReplaceDialog : public ConfirmationDialog { - - GDCLASS(FindReplaceDialog, ConfirmationDialog); - - LineEdit *search_text; - LineEdit *replace_text; - CheckButton *whole_words; - CheckButton *case_sensitive; - CheckButton *backwards; - CheckButton *prompt; - CheckButton *selection_only; - Button *skip; - Label *error_label; - MarginContainer *replace_mc; - Label *replace_label; - VBoxContainer *replace_vb; - - void _search_text_entered(const String &p_text); - void _replace_text_entered(const String &p_text); - void _prompt_changed(); - void _skip_pressed(); - - TextEdit *text_edit; - -protected: - void _search_callback(); - void _replace_skip_callback(); - - bool _search(); - void _replace(); - - virtual void ok_pressed(); - static void _bind_methods(); - -public: - String get_search_text() const; - String get_replace_text() const; - bool is_whole_words() const; - bool is_case_sensitive() const; - bool is_backwards() const; - bool is_replace_mode() const; - bool is_replace_all_mode() const; - bool is_replace_selection_only() const; - void set_replace_selection_only(bool p_enable); - - void set_error(const String &p_error); - - void popup_search(); - void popup_replace(); - - void set_text_edit(TextEdit *p_text_edit); - - void search_next(); - FindReplaceDialog(); -}; - typedef void (*CodeTextEditorCodeCompleteFunc)(void *p_ud, const String &p_code, List<String> *r_options, bool &r_forced); class CodeTextEditor : public VBoxContainer { |