summaryrefslogtreecommitdiff
path: root/editor/editor_file_dialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_file_dialog.h')
-rw-r--r--editor/editor_file_dialog.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h
index 4dc2947292..b1f8f1108c 100644
--- a/editor/editor_file_dialog.h
+++ b/editor/editor_file_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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 EDITORFILEDIALOG_H
#define EDITORFILEDIALOG_H
@@ -36,9 +37,13 @@
#include "scene/gui/item_list.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/option_button.h"
+#include "scene/gui/separator.h"
#include "scene/gui/split_container.h"
#include "scene/gui/texture_rect.h"
#include "scene/gui/tool_button.h"
+
+class DependencyRemoveDialog;
+
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
@@ -75,6 +80,14 @@ public:
static RegisterFunc unregister_func;
private:
+ enum ItemMenu {
+ ITEM_MENU_COPY_PATH,
+ ITEM_MENU_DELETE,
+ ITEM_MENU_REFRESH,
+ ITEM_MENU_NEW_FOLDER,
+ ITEM_MENU_SHOW_IN_EXPLORER
+ };
+
ConfirmationDialog *makedialog;
LineEdit *makedirname;
@@ -83,6 +96,7 @@ private:
//Button *action;
VBoxContainer *vbox;
Mode mode;
+ bool can_create_dir;
LineEdit *dir;
ToolButton *dir_prev;
@@ -91,6 +105,7 @@ private:
OptionButton *drives;
ItemList *item_list;
+ PopupMenu *item_menu;
TextureRect *preview;
VBoxContainer *preview_vb;
HSplitContainer *list_hb;
@@ -100,6 +115,7 @@ private:
OptionButton *filter;
DirAccess *dir_access;
ConfirmationDialog *confirm_save;
+ DependencyRemoveDialog *remove_dialog;
ToolButton *mode_thumbnails;
ToolButton *mode_list;
@@ -143,8 +159,14 @@ private:
void _recent_selected(int p_idx);
void _item_selected(int p_item);
+ void _multi_selected(int p_item, bool p_selected);
+ void _items_clear_selection();
void _item_dc_selected(int p_item);
+ void _item_list_item_rmb_selected(int p_item, const Vector2 &p_pos);
+ void _item_list_rmb_clicked(const Vector2 &p_pos);
+ void _item_menu_id_pressed(int p_option);
+
void _select_drive(int p_idx);
void _dir_entered(String p_dir);
void _file_entered(const String &p_file);
@@ -155,6 +177,8 @@ private:
void _make_dir();
void _make_dir_confirm();
+ void _delete_items();
+
void _update_drives();
void _go_up();
@@ -172,6 +196,8 @@ private:
void _unhandled_input(const Ref<InputEvent> &p_event);
+ bool _is_open_should_be_disabled();
+
protected:
void _notification(int p_what);
static void _bind_methods();