You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
@@ -30,19 +30,17 @@
|
||||
#define CODE_EDITOR_H
|
||||
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/gui/text_edit.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/main/timer.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/gui/check_button.h"
|
||||
#include "scene/gui/check_box.h"
|
||||
#include "scene/gui/check_button.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
|
||||
|
||||
#include "scene/gui/text_edit.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/main/timer.h"
|
||||
|
||||
class GotoLineDialog : public ConfirmationDialog {
|
||||
|
||||
OBJ_TYPE(GotoLineDialog,ConfirmationDialog);
|
||||
OBJ_TYPE(GotoLineDialog, ConfirmationDialog);
|
||||
|
||||
Label *line_label;
|
||||
LineEdit *line;
|
||||
@@ -50,19 +48,18 @@ class GotoLineDialog : public ConfirmationDialog {
|
||||
TextEdit *text_editor;
|
||||
|
||||
virtual void ok_pressed();
|
||||
public:
|
||||
|
||||
public:
|
||||
void popup_find_line(TextEdit *p_edit);
|
||||
int get_line() const;
|
||||
|
||||
|
||||
void set_text_editor(TextEdit *p_text_editor);
|
||||
GotoLineDialog();
|
||||
};
|
||||
|
||||
class FindReplaceBar : public HBoxContainer {
|
||||
|
||||
OBJ_TYPE(FindReplaceBar,HBoxContainer);
|
||||
OBJ_TYPE(FindReplaceBar, HBoxContainer);
|
||||
|
||||
LineEdit *search_text;
|
||||
ToolButton *find_prev;
|
||||
@@ -89,15 +86,15 @@ class FindReplaceBar : public HBoxContainer {
|
||||
bool replace_all_mode;
|
||||
bool preserve_cursor;
|
||||
|
||||
void _get_search_from(int& r_line, int& r_col);
|
||||
void _get_search_from(int &r_line, int &r_col);
|
||||
|
||||
void _show_search();
|
||||
void _hide_bar();
|
||||
|
||||
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 _search_text_changed(const String &p_text);
|
||||
void _search_text_entered(const String &p_text);
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
@@ -117,7 +114,7 @@ public:
|
||||
bool is_case_sensitive() const;
|
||||
bool is_whole_words() const;
|
||||
bool is_selection_only() const;
|
||||
void set_error(const String& p_label);
|
||||
void set_error(const String &p_label);
|
||||
|
||||
void set_text_edit(TextEdit *p_text_edit);
|
||||
|
||||
@@ -133,7 +130,7 @@ public:
|
||||
|
||||
class FindReplaceDialog : public ConfirmationDialog {
|
||||
|
||||
OBJ_TYPE(FindReplaceDialog,ConfirmationDialog);
|
||||
OBJ_TYPE(FindReplaceDialog, ConfirmationDialog);
|
||||
|
||||
LineEdit *search_text;
|
||||
LineEdit *replace_text;
|
||||
@@ -148,15 +145,14 @@ class FindReplaceDialog : public ConfirmationDialog {
|
||||
Label *replace_label;
|
||||
VBoxContainer *replace_vb;
|
||||
|
||||
void _search_text_entered(const String& p_text);
|
||||
void _replace_text_entered(const String& p_text);
|
||||
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:
|
||||
|
||||
protected:
|
||||
void _search_callback();
|
||||
void _replace_skip_callback();
|
||||
|
||||
@@ -165,8 +161,8 @@ protected:
|
||||
|
||||
virtual void ok_pressed();
|
||||
static void _bind_methods();
|
||||
public:
|
||||
|
||||
public:
|
||||
String get_search_text() const;
|
||||
String get_replace_text() const;
|
||||
bool is_whole_words() const;
|
||||
@@ -177,7 +173,7 @@ public:
|
||||
bool is_replace_selection_only() const;
|
||||
void set_replace_selection_only(bool p_enable);
|
||||
|
||||
void set_error(const String& p_error);
|
||||
void set_error(const String &p_error);
|
||||
|
||||
void popup_search();
|
||||
void popup_replace();
|
||||
@@ -188,10 +184,9 @@ public:
|
||||
FindReplaceDialog();
|
||||
};
|
||||
|
||||
|
||||
class CodeTextEditor : public VBoxContainer {
|
||||
|
||||
OBJ_TYPE(CodeTextEditor,VBoxContainer);
|
||||
OBJ_TYPE(CodeTextEditor, VBoxContainer);
|
||||
|
||||
TextEdit *text_editor;
|
||||
FindReplaceBar *find_replace_bar;
|
||||
@@ -214,18 +209,17 @@ class CodeTextEditor : public VBoxContainer {
|
||||
void _complete_request();
|
||||
void _font_resize_timeout();
|
||||
|
||||
void _text_editor_input_event(const InputEvent& p_event);
|
||||
void _text_editor_input_event(const InputEvent &p_event);
|
||||
void _zoom_in();
|
||||
void _zoom_out();
|
||||
void _reset_zoom();
|
||||
|
||||
protected:
|
||||
|
||||
void set_error(const String& p_error);
|
||||
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() = 0;
|
||||
virtual void _code_complete_script(const String &p_code, List<String> *r_options){};
|
||||
|
||||
void _text_changed_idle_timeout();
|
||||
void _code_complete_timer_timeout();
|
||||
@@ -235,7 +229,6 @@ protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
|
||||
void update_editor_settings();
|
||||
TextEdit *get_text_edit() { return text_editor; }
|
||||
FindReplaceBar *get_find_replace_bar() { return find_replace_bar; }
|
||||
@@ -244,6 +237,4 @@ public:
|
||||
CodeTextEditor();
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // CODE_EDITOR_H
|
||||
|
||||
Reference in New Issue
Block a user