summaryrefslogtreecommitdiff
path: root/utils/scenemanager/workspacebrowser.h
blob: a99a311aae2758d684998cd458ec9679e5a8fb9c (plain) (blame)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

#ifndef WORKSPACEBROWSER_H
#define WORKSPACEBROWSER_H
#ifdef _WIN32
#pragma once
#endif

#include "mxtk/mxTreeView.h"
#include "commctrl.h"

class CWorkspace;
class CProject;
class CScene;
class CVCDFile;
class CSoundEntry;

class CBrowserTree;
class ITreeItem;
class CWorkspaceManager;

class CWorkspaceBrowser : public mxWindow
{
	typedef mxWindow BaseClass;
public:

	CWorkspaceBrowser( mxWindow *parent, CWorkspaceManager *manager, int id );

	CWorkspace	*GetWorkspace();
	void		SetWorkspace( CWorkspace *w );
	void		AddProject( CProject *project );

	virtual		int handleEvent( mxEvent *event );

	ITreeItem	*GetSelectedItem();

	void		PopulateTree();

	static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);


	void		JumpTo( ITreeItem *item );

private:

	CWorkspaceManager *GetManager();

	void		OnTreeItemSelected( int x, int y, bool rightmouse, bool doubleclick );

	CWorkspace	*m_pCurrentWorkspace;

	CBrowserTree *m_pTree;

	enum
	{
		NUM_BITMAPS = 12,
	};

	ITreeItem	*m_pLastSelected;
	CWorkspaceManager *m_pManager;
};

#endif // WORKSPACEBROWSER_H