summaryrefslogtreecommitdiff
path: root/public/dme_controls/dmedageditpanel.h
blob: f5cb1f3ba9bd188329b3b97a6b58f86364f9be25 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================

#ifndef DMEDAGEDITPANEL_H
#define DMEDAGEDITPANEL_H

#ifdef _WIN32
#pragma once
#endif

#include "tier1/utlvector.h"
#include "vgui_controls/EditablePanel.h"
#include "datamodel/dmehandle.h"


//-----------------------------------------------------------------------------
// Forward declarations
//-----------------------------------------------------------------------------
class CDmeDagRenderPanel;
class CDmeAnimationList;
class CDmeChannelsClip;
class CDmeSourceSkin;
class CDmeSourceAnimation;
class CDmeDCCMakefile;
class CDmeCombinationOperatorPanel;
class CDmeCombinationOperator;
class CDmeAnimationListPanel;
class CBaseAnimationSetEditor;
class CDmeAnimationSet;
class CDmeDag;

namespace vgui
{
	class Splitter;
	class PropertySheet;
	class PropertyPage;
	class ScrollableEditablePanel;
}



//-----------------------------------------------------------------------------
// Dag editor panel
//-----------------------------------------------------------------------------
class CDmeDagEditPanel : public vgui::EditablePanel
{
	DECLARE_CLASS_SIMPLE( CDmeDagEditPanel, vgui::EditablePanel );

public:
	// constructor, destructor
	CDmeDagEditPanel( vgui::Panel *pParent, const char *pName );
	virtual ~CDmeDagEditPanel();

	// Overriden methods of vgui::Panel
	virtual void Paint();

	// Sets the current scene + animation list
	void SetDmeElement( CDmeDag *pScene );
	void SetAnimationList( CDmeAnimationList *pAnimationList );
	void SetVertexAnimationList( CDmeAnimationList *pAnimationList );
	void SetCombinationOperator( CDmeCombinationOperator *pComboOp );
	void RefreshCombinationOperator();

	CDmeDag *GetDmeElement();

	// Other methods which hook into DmePanel
	void SetDmeElement( CDmeSourceSkin *pSkin );
	void SetDmeElement( CDmeSourceAnimation *pAnimation );
	void SetDmeElement( CDmeDCCMakefile *pDCCMakefile );

private:
	// Called when the selection changes moves
	MESSAGE_FUNC( OnPageChanged, "PageChanged" );
	MESSAGE_FUNC_PARAMS( OnAnimationSelected, "AnimationSelected", kv );
	MESSAGE_FUNC_PARAMS( OnAnimationDeselected, "AnimationDeselected", kv );

	// Sets up the various panels in the dag editor
	void SetMakefileRootElement( CDmElement *pRoot );

	vgui::PropertySheet *m_pEditorSheet;
	vgui::PropertyPage *m_pAnimationPage;
	vgui::PropertyPage *m_pVertexAnimationPage;
	vgui::PropertyPage *m_pCombinationPage;
	vgui::Splitter *m_pPropertiesSplitter;
	CDmeDagRenderPanel *m_pDagRenderPanel;
	CDmeAnimationListPanel *m_pAnimationListPanel;
	CDmeAnimationListPanel *m_pVertexAnimationListPanel;
	CDmeCombinationOperatorPanel *m_pCombinationPanel;
};


#endif // DMEDAGEDITPANEL_H