Game Develop Core: ObjectListDialogsHelper.h Source File

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
ObjectListDialogsHelper.h
Go to the documentation of this file.
1
5 #if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
6 #ifndef GDCORE_OBJECTLISTDIALOGSHELPER_H
7 #define GDCORE_OBJECTLISTDIALOGSHELPER_H
8
9 #include <string>
10 #include <vector>
11 namespace gd { class Project; }
12 namespace gd { class Layout; }
13 namespace gd { class ClassWithObjects; }
14 namespace gd { class ObjectGroup; }
15 class wxTreeCtrl;
16 class wxTreeItemId;
17
18 namespace gd
19 {
20
29 class GD_CORE_API ObjectListDialogsHelper
30 {
31 public:
37 ObjectListDialogsHelper(const gd::Project & project_, const gd::Layout & layout_) : project(project_), layout(layout_) {};
38 virtual ~ObjectListDialogsHelper() {};
39
40 void SetSearchText(std::string searchText_);
41 void SetAllowedObjectType(std::string allowedObjectType_) { objectTypeAllowed = allowedObjectType_; }
42 void SetGroupsAllowed(bool canSelectGroup) { groupsAllowed = canSelectGroup; }
43
53 void RefreshLists(wxTreeCtrl * sceneObjectsList,
54 wxTreeCtrl * sceneGroupsList,
55 wxTreeCtrl * globalObjectsList,
56 wxTreeCtrl * globalGroupsList);
57
66 void RefreshList(wxTreeCtrl * objectsList);
67
68
69 private:
70 wxTreeItemId AddObjectsToList(wxTreeCtrl * tree, const gd::ClassWithObjects & objects, bool globalObjects, bool substituteIfEmpty);
71 wxTreeItemId AddGroupsToList(wxTreeCtrl * tree, const std::vector <gd::ObjectGroup> & groups, bool globalGroup, bool substituteIfEmpty);
72
73 const Project & project;
74 const Layout & layout;
75 std::string objectTypeAllowed;
76 std::string searchText;
77 bool groupsAllowed;
78 };
79
80 }
81
82 #endif // GDCORE_OBJECTLISTDIALOGSHELPER_H
83 #endif