-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWorldTree.h
40 lines (35 loc) · 846 Bytes
/
WorldTree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include "Gwen/Controls/CollapsibleCategory.h"
#include "Gwen/Controls/TreeControl.h"
#include <map>
#include <string>
using namespace std;
// Forward declarations.
#pragma region Forward declarations.
namespace GLib {
class World;
}
class Editor;
#pragma endregion
struct WorldTreeNode
{
void* pData;
int type;
};
//! A TreeControl that contains all objects in World.
class WorldTree : public Gwen::Controls::CollapsibleCategory
{
public:
WorldTree(Gwen::Controls::Base* pParent);
~WorldTree();
void CreateTree();
void OnSelectChange(Gwen::Controls::Base* pControl);
void SetEditor(Editor* pEditor);
void SetWorld(GLib::World* pWorld);
private:
map<string, WorldTreeNode> mNodeMap;
Gwen::Controls::TreeControl* mTreeControl;
Gwen::Controls::CollapsibleCategory* mCategory;
Editor* mEditor;
GLib::World* mWorld;
};