summaryrefslogtreecommitdiff
path: root/tools/editor/scenes_dock.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/scenes_dock.h')
-rw-r--r--tools/editor/scenes_dock.h37
1 files changed, 30 insertions, 7 deletions
diff --git a/tools/editor/scenes_dock.h b/tools/editor/scenes_dock.h
index 86196b7ccd..327e5a25f0 100644
--- a/tools/editor/scenes_dock.h
+++ b/tools/editor/scenes_dock.h
@@ -39,6 +39,7 @@
#include "scene/gui/menu_button.h"
#include "scene/gui/item_list.h"
#include "scene/gui/progress_bar.h"
+#include "scene/gui/split_container.h"
#include "os/dir_access.h"
#include "os/thread.h"
@@ -54,6 +55,8 @@ class ScenesDock : public VBoxContainer {
OBJ_TYPE( ScenesDock, VBoxContainer );
enum FileMenu {
+ FILE_OPEN,
+ FILE_INSTANCE,
FILE_DEPENDENCIES,
FILE_OWNERS,
FILE_MOVE,
@@ -65,25 +68,28 @@ class ScenesDock : public VBoxContainer {
VBoxContainer *scanning_vb;
ProgressBar *scanning_progress;
+ VSplitContainer *split_box;
+ VBoxContainer *file_list_vb;
EditorNode *editor;
Set<String> favorites;
Button *button_reload;
- Button *button_instance;
Button *button_favorite;
Button *button_fav_up;
Button *button_fav_down;
- Button *button_open;
Button *button_back;
Button *display_mode;
Button *button_hist_next;
Button *button_hist_prev;
LineEdit *current_path;
+ LineEdit *search_box;
+ Button *search_button;
HBoxContainer *path_hb;
- MenuButton *file_options;
+ bool split_mode;
+ PopupMenu *file_options;
DependencyEditor *deps_editor;
DependencyEditorOwners *owners_editor;
@@ -107,8 +113,6 @@ class ScenesDock : public VBoxContainer {
Tree * tree; //directories
ItemList *files;
- bool tree_mode;
-
void _go_to_tree();
void _go_to_dir(const String& p_dir);
void _select_file(int p_idx);
@@ -131,6 +135,7 @@ class ScenesDock : public VBoxContainer {
void _bw_history();
void _push_to_history();
+
void _fav_up_pressed();
void _fav_down_pressed();
void _dir_selected();
@@ -138,9 +143,27 @@ class ScenesDock : public VBoxContainer {
void _rescan();
void _set_scannig_mode();
+
void _favorites_pressed();
- void _instance_pressed();
void _open_pressed();
+ void _search_toggled();
+ void _search_changed(const String& p_text);
+
+
+ void _files_list_rmb_select(int p_item,const Vector2& p_pos);
+
+
+ struct FileInfo {
+ String name;
+ String path;
+ StringName type;
+
+ bool operator<(const FileInfo& fi) const {
+ return name < fi.name;
+ }
+ };
+
+ void _search(EditorFileSystemDirectory *p_path, List<FileInfo>* matches, int p_max_items);
Variant get_drag_data_fw(const Point2& p_point,Control* p_from);
bool can_drop_data_fw(const Point2& p_point,const Variant& p_data,Control* p_from) const;
@@ -152,7 +175,7 @@ protected:
public:
String get_selected_path() const;
- void open(const String& p_path);
+ void focus_on_filter();
void fix_dependencies(const String& p_for_file);