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.h39
1 files changed, 37 insertions, 2 deletions
diff --git a/tools/editor/scenes_dock.h b/tools/editor/scenes_dock.h
index eab31a5a4d..cf48e2885f 100644
--- a/tools/editor/scenes_dock.h
+++ b/tools/editor/scenes_dock.h
@@ -34,6 +34,8 @@
#include "scene/gui/tree.h"
#include "scene/gui/label.h"
#include "scene/gui/button.h"
+#include "scene/gui/option_button.h"
+#include "scene/gui/box_container.h"
#include "os/dir_access.h"
#include "os/thread.h"
@@ -42,8 +44,9 @@
class EditorNode;
-class ScenesDock : public Control {
- OBJ_TYPE( ScenesDock, Control );
+class ScenesDockFilter;
+class ScenesDock : public VBoxContainer {
+ OBJ_TYPE( ScenesDock, VBoxContainer );
EditorNode *editor;
Set<String> favorites;
@@ -54,6 +57,8 @@ class ScenesDock : public Control {
Button *button_open;
Timer *timer;
+ ScenesDockFilter *tree_filter;
+
bool updating_tree;
Tree * tree;
bool _create_tree(TreeItem *p_parent,EditorFileSystemDirectory *p_dir);
@@ -77,4 +82,34 @@ public:
~ScenesDock();
};
+class ScenesDockFilter : public HBoxContainer {
+
+ OBJ_TYPE( ScenesDockFilter, HBoxContainer );
+
+ enum Command {
+ CMD_CLEAR_FILTER,
+ };
+
+ Tree *tree;
+ OptionButton *file_filter;
+ LineEdit *search_box;
+ Button *clear_search_button;
+
+ String _current_filter;
+ Vector<String> filters;
+
+ void _command(int p_command);
+ void _search_text_changed(const String& p_newtext);
+ void _setup_filters();
+ void _file_filter_selected(int p_idx);
+
+protected:
+ static void _bind_methods();
+
+public:
+ String get_search_term();
+ String get_file_filter();
+ ScenesDockFilter(Tree *p_tree);
+};
+
#endif // SCENES_DOCK_H