Initial cleanup pass on the VanillaEditor.

This commit is contained in:
Relintai 2022-07-15 17:09:10 +02:00
parent d618980dc9
commit 477d6942fc
3 changed files with 469 additions and 857 deletions

View File

@ -1,12 +1,12 @@
#ifndef LASTOPENEDFILES_H
#define LASTOPENEDFILES_H
//This will not need EditorPlugin and EditorSettings, as now it can get them using singletons
class LastOpenedFiles : public Reference {
GDCLASS(LastOpenedFiles, Reference);
public:
EditorPlugin get_ *editor_plugin();
void set_ *editor_plugin(const EditorPlugin &val);
@ -30,5 +30,4 @@ class LastOpenedFiles : public Reference {
Ref<EditorSettings> editor_settings = null;
};
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,63 +1,26 @@
#ifndef VANILLAEDITOR_H
#define VANILLAEDITOR_H
#ifndef VANILLA_EDITOR_H
#define VANILLA_EDITOR_H
#include "core/reference.h"
#include "core/ustring.h"
#include "scene/gui/box_container.h"
class LastOpenedFiles;
class TextEdit;
class FileDialog;
class HBoxContainer;
class LineEdit;
class CheckBox;
class Button;
class TextureRect;
class Label;
class VanillaEditor : public VBoxContainer {
GDCLASS(VanillaEditor, VBoxContainer);
public:
Reference get_*LastOpenedFiles();
void set_*LastOpenedFiles(const Reference &val);
TextEdit get_*text_editor();
void set_*text_editor(const TextEdit &val);
FileDialog get_*file_list();
void set_*file_list(const FileDialog &val);
HBoxContainer get_*search_box();
void set_*search_box(const HBoxContainer &val);
LineEdit get_*search_box_line_edit();
void set_*search_box_line_edit(const LineEdit &val);
CheckBox get_*search_box_match_case_cb();
void set_*search_box_match_case_cb(const CheckBox &val);
CheckBox get_*search_box_whole_words_cb();
void set_*search_box_whole_words_cb(const CheckBox &val);
Button get_*search_box_close_button();
void set_*search_box_close_button(const Button &val);
HBoxContainer get_*replace_box();
void set_*replace_box(const HBoxContainer &val);
LineEdit get_*replace_box_replace_le();
void set_*replace_box_replace_le(const LineEdit &val);
LineEdit get_*replace_box_with();
void set_*replace_box_with(const LineEdit &val);
Button get_*replace_box_button();
void set_*replace_box_button(const Button &val);
Button get_*replace_box_close();
void set_*replace_box_close(const Button &val);
TextureRect get_*file_info_last_modified_icon();
void set_*file_info_last_modified_icon(const TextureRect &val);
Label get_*file_info_last_modified();
void set_*file_info_last_modified(const Label &val);
Label get_*file_info_c_counter();
void set_*file_info_c_counter(const Label &val);
CheckBox get_*file_info_read_only();
void set_*file_info_read_only(const CheckBox &val);
String get_current_path();
void set_current_path(const String &val);
@ -97,30 +60,32 @@ class VanillaEditor : public VBoxContainer {
protected:
static void _bind_methods();
//tool
Reference *LastOpenedFiles = null;
TextEdit *text_editor = null;
FileDialog *file_list = null;
HBoxContainer *search_box = null;
LineEdit *search_box_line_edit = null;
CheckBox *search_box_match_case_cb = null;
CheckBox *search_box_whole_words_cb = null;
Button *search_box_close_button = null;
HBoxContainer *replace_box = null;
LineEdit *replace_box_replace_le = null;
LineEdit *replace_box_with = null;
Button *replace_box_button = null;
Button *replace_box_close = null;
TextureRect *file_info_last_modified_icon = null;
Label *file_info_last_modified = null;
Label *file_info_c_counter = null;
CheckBox *file_info_read_only = null;
String current_path = "";
String current_filename = "";
int search_flag = 0;
signal text_changed();
//file_info_last_modified_icon.texture = IconLoader.load_icon_from_name(icon)
Ref<LastOpenedFiles> last_opened_files;
TextEdit *text_editor;
FileDialog *file_list;
HBoxContainer *search_box;
LineEdit *search_box_line_edit;
CheckBox *search_box_match_case_cb;
CheckBox *search_box_whole_words_cb;
Button *search_box_close_button;
HBoxContainer *replace_box;
LineEdit *replace_box_replace_le;
LineEdit *replace_box_with;
Button *replace_box_button;
Button *replace_box_close;
TextureRect *file_info_last_modified_icon;
Label *file_info_last_modified;
Label *file_info_c_counter;
CheckBox *file_info_read_only;
String current_path;
String current_filename;
int search_flag;
};
#endif