summaryrefslogtreecommitdiff
path: root/utils/hlfaceposer/choreoglobaleventwidget.h
blob: e1881cad9801799c1a4881326906450903c558e0 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//
#ifndef CHOREOGLOBALEVENTWIDGET_H
#define CHOREOGLOBALEVENTWIDGET_H
#ifdef _WIN32
#pragma once
#endif

#include "choreowidget.h"

class CChoreoEvent;

//-----------------------------------------------------------------------------
// Purpose: For section start/end
// FIXME: Finish this
//-----------------------------------------------------------------------------
class CChoreoGlobalEventWidget : public CChoreoWidget
{
public:
	typedef CChoreoWidget		BaseClass;

	// Construction/destruction
					CChoreoGlobalEventWidget( CChoreoWidget *parent );
	virtual			~CChoreoGlobalEventWidget( void );

	// Create children
	virtual void	Create( void );
	// Redo layout
	virtual void	Layout( RECT& rc );

	// Screen refresh
	virtual void	redraw(CChoreoWidgetDrawHelper& drawHelper);

	// Access underlying scene object
	CChoreoEvent	*GetEvent( void );
	void			SetEvent( CChoreoEvent *event );

	// Draw focus rect while mouse dragging is going on
	void			DrawFocusRect( void );
private:

	void			DrawLabel( CChoreoWidgetDrawHelper& drawHelper, COLORREF clr, int x, int y, bool right );

	// The underlying scene object
	CChoreoEvent	*m_pEvent;

	// For updating focus rect
	bool				m_bDragging;
	int					m_xStart;
	RECT				m_rcFocus;
	RECT				m_rcOrig;
	HCURSOR				m_hPrevCursor;
};

#endif // CHOREOGLOBALEVENTWIDGET_H