summaryrefslogtreecommitdiff
path: root/public/dme_controls/LogPreview.h
blob: e70d684ed9c8ad361edc3aafb2471d9cba5bdb14 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================

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

#include "datamodel/dmehandle.h"

class CDmElement;
class CDmeClip;
class CDmeFilmClip;
class CDmeChannel;

enum LogPreviewChannelType_t
{
	LOG_PREVIEW_VALUE = 0,
	LOG_PREVIEW_BALANCE,
	LOG_PREVIEW_MULTILEVEL,
	LOG_PREVIEW_FLEX_CHANNEL_COUNT,

	LOG_PREVIEW_POSITION = 0,
	LOG_PREVIEW_ORIENTATION,
	LOG_PREVIEW_TRANSFORM_CHANNEL_COUNT,

	LOG_PREVIEW_MAX_CHANNEL_COUNT = 3,
};

struct LogPreview_t
{
	LogPreview_t() :
		m_bDragging( false ),
		m_bActiveLog( false ),
		m_bSelected( false )
	{
	}

	bool IsEqual( const LogPreview_t& other )
	{
		if ( m_hControl != other.m_hControl )
			return false;
		for ( int i = 0; i < LOG_PREVIEW_MAX_CHANNEL_COUNT; ++i )
		{
			if ( m_hChannels[ i ] != other.m_hChannels[ i ] )
				return false;
		}
		if ( m_hOwner != other.m_hOwner )
			return false;
		if ( m_hShot != other.m_hShot )
			return false;
		if ( m_bDragging != other.m_bDragging )
			return false;
		if ( m_bActiveLog != other.m_bActiveLog )
			return false;
		if ( m_bSelected != other.m_bSelected )
			return false;

		return true;
	}

	CDmeHandle< CDmElement >		m_hControl;  // The animation set control
	CDmeHandle< CDmeChannel >		m_hChannels[ LOG_PREVIEW_MAX_CHANNEL_COUNT ];
	CDmeHandle< CDmeClip >			m_hOwner;
	CDmeHandle< CDmeFilmClip >		m_hShot;

	bool							m_bDragging : 1;
	bool							m_bActiveLog : 1;
	bool							m_bSelected : 1;
};
#endif // LOGPREVIEW_H