mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-12 13:51:10 +01:00
Initial cleanup pass on the VanillaEditor.
This commit is contained in:
parent
d618980dc9
commit
477d6942fc
@ -1,34 +1,33 @@
|
|||||||
#ifndef LASTOPENEDFILES_H
|
#ifndef LASTOPENEDFILES_H
|
||||||
#define LASTOPENEDFILES_H
|
#define LASTOPENEDFILES_H
|
||||||
|
|
||||||
|
//This will not need EditorPlugin and EditorSettings, as now it can get them using singletons
|
||||||
|
|
||||||
class LastOpenedFiles : public Reference {
|
class LastOpenedFiles : public Reference {
|
||||||
GDCLASS(LastOpenedFiles, Reference);
|
GDCLASS(LastOpenedFiles, Reference);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
EditorPlugin get_ *editor_plugin();
|
||||||
|
void set_ *editor_plugin(const EditorPlugin &val);
|
||||||
|
|
||||||
EditorPlugin get_*editor_plugin();
|
Ref<EditorSettings> get_editor_settings();
|
||||||
void set_*editor_plugin(const EditorPlugin &val);
|
void set_editor_settings(const Ref<EditorSettings> &val);
|
||||||
|
|
||||||
Ref<EditorSettings> get_editor_settings();
|
void store_opened_files(const Control &filecontainer);
|
||||||
void set_editor_settings(const Ref<EditorSettings> &val);
|
void remove_opened_file(const int index, const Control &filecontainer);
|
||||||
|
Array load_opened_files();
|
||||||
|
void store_editor_fonts(const String &file_name, const String &font_path);
|
||||||
|
String get_editor_font();
|
||||||
|
|
||||||
void store_opened_files(const Control &filecontainer);
|
LastOpenedFiles();
|
||||||
void remove_opened_file(const int index, const Control &filecontainer);
|
~LastOpenedFiles();
|
||||||
Array load_opened_files();
|
|
||||||
void store_editor_fonts(const String &file_name, const String &font_path);
|
|
||||||
String get_editor_font();
|
|
||||||
|
|
||||||
LastOpenedFiles();
|
protected:
|
||||||
~LastOpenedFiles();
|
static void _bind_methods();
|
||||||
|
|
||||||
protected:
|
//tool
|
||||||
static void _bind_methods();
|
EditorPlugin *editor_plugin = null;
|
||||||
|
Ref<EditorSettings> editor_settings = null;
|
||||||
//tool
|
|
||||||
EditorPlugin *editor_plugin = null;
|
|
||||||
Ref<EditorSettings> editor_settings = null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,126 +1,91 @@
|
|||||||
#ifndef VANILLAEDITOR_H
|
#ifndef VANILLA_EDITOR_H
|
||||||
#define VANILLAEDITOR_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 {
|
class VanillaEditor : public VBoxContainer {
|
||||||
GDCLASS(VanillaEditor, VBoxContainer);
|
GDCLASS(VanillaEditor, VBoxContainer);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
String get_current_path();
|
||||||
|
void set_current_path(const String &val);
|
||||||
|
|
||||||
Reference get_*LastOpenedFiles();
|
String get_current_filename();
|
||||||
void set_*LastOpenedFiles(const Reference &val);
|
void set_current_filename(const String &val);
|
||||||
|
|
||||||
TextEdit get_*text_editor();
|
int get_search_flag() const;
|
||||||
void set_*text_editor(const TextEdit &val);
|
void set_search_flag(const int val);
|
||||||
|
|
||||||
FileDialog get_*file_list();
|
void _init();
|
||||||
void set_*file_list(const FileDialog &val);
|
void _ready();
|
||||||
|
void set_font(const String &font_path);
|
||||||
|
void load_default_font();
|
||||||
|
void set_wrap_enabled(const bool enabled);
|
||||||
|
void draw_minimap(const bool value);
|
||||||
|
void color_region(const String &filextension);
|
||||||
|
void clean_editor();
|
||||||
|
void new_file_open(const String &file_content, const Dictionary &last_modified, const String ¤t_file_path);
|
||||||
|
void update_lastmodified(const Dictionary &last_modified, const String &icon);
|
||||||
|
void new_file_create(const String &file_name);
|
||||||
|
void _on_Readonly_toggled(const bool button_pressed);
|
||||||
|
void _on_text_editor_text_changed();
|
||||||
|
void count_characters();
|
||||||
|
void _on_LineEdit_text_changed(const String &new_text);
|
||||||
|
void _on_matchcase_toggled(const bool button_pressed);
|
||||||
|
void _on_wholewords_toggled(const bool button_pressed);
|
||||||
|
void _on_close_pressed();
|
||||||
|
void open_search_box();
|
||||||
|
void _on_Button_pressed();
|
||||||
|
void open_replace_box();
|
||||||
|
void _on_close2_pressed();
|
||||||
|
void _on_LineEdit_focus_entered();
|
||||||
|
|
||||||
HBoxContainer get_*search_box();
|
VanillaEditor();
|
||||||
void set_*search_box(const HBoxContainer &val);
|
~VanillaEditor();
|
||||||
|
|
||||||
LineEdit get_*search_box_line_edit();
|
protected:
|
||||||
void set_*search_box_line_edit(const LineEdit &val);
|
static void _bind_methods();
|
||||||
|
|
||||||
CheckBox get_*search_box_match_case_cb();
|
Ref<LastOpenedFiles> last_opened_files;
|
||||||
void set_*search_box_match_case_cb(const CheckBox &val);
|
|
||||||
|
|
||||||
CheckBox get_*search_box_whole_words_cb();
|
TextEdit *text_editor;
|
||||||
void set_*search_box_whole_words_cb(const CheckBox &val);
|
FileDialog *file_list;
|
||||||
|
|
||||||
Button get_*search_box_close_button();
|
HBoxContainer *search_box;
|
||||||
void set_*search_box_close_button(const Button &val);
|
LineEdit *search_box_line_edit;
|
||||||
|
CheckBox *search_box_match_case_cb;
|
||||||
|
CheckBox *search_box_whole_words_cb;
|
||||||
|
Button *search_box_close_button;
|
||||||
|
|
||||||
HBoxContainer get_*replace_box();
|
HBoxContainer *replace_box;
|
||||||
void set_*replace_box(const HBoxContainer &val);
|
LineEdit *replace_box_replace_le;
|
||||||
|
LineEdit *replace_box_with;
|
||||||
|
Button *replace_box_button;
|
||||||
|
Button *replace_box_close;
|
||||||
|
|
||||||
LineEdit get_*replace_box_replace_le();
|
TextureRect *file_info_last_modified_icon;
|
||||||
void set_*replace_box_replace_le(const LineEdit &val);
|
Label *file_info_last_modified;
|
||||||
|
Label *file_info_c_counter;
|
||||||
|
CheckBox *file_info_read_only;
|
||||||
|
|
||||||
LineEdit get_*replace_box_with();
|
String current_path;
|
||||||
void set_*replace_box_with(const LineEdit &val);
|
String current_filename;
|
||||||
|
|
||||||
Button get_*replace_box_button();
|
int search_flag;
|
||||||
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);
|
|
||||||
|
|
||||||
String get_current_filename();
|
|
||||||
void set_current_filename(const String &val);
|
|
||||||
|
|
||||||
int get_search_flag() const;
|
|
||||||
void set_search_flag(const int val);
|
|
||||||
|
|
||||||
void _init();
|
|
||||||
void _ready();
|
|
||||||
void set_font(const String &font_path);
|
|
||||||
void load_default_font();
|
|
||||||
void set_wrap_enabled(const bool enabled);
|
|
||||||
void draw_minimap(const bool value);
|
|
||||||
void color_region(const String &filextension);
|
|
||||||
void clean_editor();
|
|
||||||
void new_file_open(const String &file_content, const Dictionary &last_modified, const String ¤t_file_path);
|
|
||||||
void update_lastmodified(const Dictionary &last_modified, const String &icon);
|
|
||||||
void new_file_create(const String &file_name);
|
|
||||||
void _on_Readonly_toggled(const bool button_pressed);
|
|
||||||
void _on_text_editor_text_changed();
|
|
||||||
void count_characters();
|
|
||||||
void _on_LineEdit_text_changed(const String &new_text);
|
|
||||||
void _on_matchcase_toggled(const bool button_pressed);
|
|
||||||
void _on_wholewords_toggled(const bool button_pressed);
|
|
||||||
void _on_close_pressed();
|
|
||||||
void open_search_box();
|
|
||||||
void _on_Button_pressed();
|
|
||||||
void open_replace_box();
|
|
||||||
void _on_close2_pressed();
|
|
||||||
void _on_LineEdit_focus_entered();
|
|
||||||
|
|
||||||
VanillaEditor();
|
|
||||||
~VanillaEditor();
|
|
||||||
|
|
||||||
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)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user