summaryrefslogtreecommitdiff
path: root/utils/hlfaceposer/controlpanel.h
blob: 7382051f8a3a5ce87d23d53a2a988d369c0611fb (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

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

#ifndef INCLUDED_MXWINDOW
#include <mxtk/mxWindow.h>
#endif

#include "faceposertoolwindow.h"

#define IDC_TAB						1901
#define IDC_RENDERMODE				2001
#define IDC_GROUND					2003
#define IDC_MOVEMENT				2004
#define IDC_BACKGROUND				2005
#define IDC_HITBOXES				2006
#define IDC_BONES					2007
#define IDC_ATTACHMENTS				2008
#define IDC_PHYSICSMODEL			2009
#define IDC_PHYSICSHIGHLIGHT		2010
#define IDC_MODELSPACING			2011
#define IDC_TOOLSDRIVEMOUTH			2012

#define IDC_SEQUENCE				3001
#define IDC_SPEEDSCALE				3002
#define IDC_PRIMARYBLEND			3003
#define IDC_SECONDARYBLEND			3004

#define IDC_BODYPART				4001
#define IDC_SUBMODEL				4002
#define IDC_CONTROLLER				4003
#define IDC_CONTROLLERVALUE			4004
#define IDC_SKINS					4005

#define IDC_EXPRESSIONCLASS			5001
#define IDC_EXPRESSIONTRAY			5002
#define IDC_ANIMATIONBROWSER		5003

class mxTab;
class mxChoice;
class mxCheckBox;
class mxSlider;
class mxLineEdit;
class mxLabel;
class mxButton;
class MatSysWindow;
class TextureWindow;
class mxExpressionTray;
class FlexPanel;
class PhonemeEditor;
class mxExpressionTab;
class mxExpressionSlider;
class ExpressionTool;
class CChoreoView;


class ControlPanel : public mxWindow, public IFacePoserToolWindow
{
	typedef mxWindow BaseClass;

	mxTab *tab;
	mxChoice *cRenderMode;
	mxCheckBox *cbGround, *cbMovement, *cbBackground;
	mxChoice *cSequence;
	mxSlider *slSpeedScale;
	mxLabel *lSpeedScale;
	mxChoice *cBodypart, *cController, *cSubmodel;
	mxSlider *slController;
	mxChoice *cSkin;
	mxLabel *lModelInfo1, *lModelInfo2;

	mxLineEdit *leMeshScale, *leBoneScale;
	mxSlider *slModelGap;

	mxCheckBox *cbAllWindowsDriveSpeech;
	
public:
	// CREATORS
	ControlPanel (mxWindow *parent);
	virtual ~ControlPanel ();

	// MANIPULATORS

	virtual int handleEvent (mxEvent *event);
	virtual void redraw();

	virtual void		OnDelete();
	virtual bool		CanClose();

	virtual void		Think( float dt );

	void dumpModelInfo ();
	void ChangeModel( const char *filename );

	void setRenderMode (int mode);
	void setShowGround (bool b);
	void setShowMovement (bool b);
	void setShowBackground (bool b);
	void setHighlightBone( int index );

	void initSequenceChoices( );
	void setSequence (int index);

	void setSpeed( float value );

	void initPoseParameters ();
	void setBlend(int index, float value );

	void initBodypartChoices();
	void setBodypart (int index);
	void setSubmodel (int index);

	void initBoneControllerChoices();
	void setBoneController (int index);
	void setBoneControllerValue (int index, float value);

	void initSkinChoices();

	void setModelInfo ();

	void centerView ();

	void fullscreen ();

	void CenterOnFace( void );

	void PositionControls( int width, int height );

	bool CloseClass( int classindex );

	bool Close();
	bool Closeall();

	void Copy( void );
	void Paste( void );

	void Undo( void );
	void Redo( void );

	void UndoExpression( int index );
	void RedoExpression( int index );

	void DeleteExpression( int index );

	float GetModelGap( void );

	bool	AllToolsDriveSpeech( void );

};

extern ControlPanel		*g_pControlPanel;

#endif // CONTROLPANEL_H