Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef LOGPREVIEW_H
  7. #define LOGPREVIEW_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "datamodel/dmehandle.h"
  12. class CDmElement;
  13. class CDmeClip;
  14. class CDmeFilmClip;
  15. class CDmeChannel;
  16. enum LogPreviewChannelType_t
  17. {
  18. LOG_PREVIEW_VALUE = 0,
  19. LOG_PREVIEW_BALANCE,
  20. LOG_PREVIEW_MULTILEVEL,
  21. LOG_PREVIEW_FLEX_CHANNEL_COUNT,
  22. LOG_PREVIEW_POSITION = 0,
  23. LOG_PREVIEW_ORIENTATION,
  24. LOG_PREVIEW_TRANSFORM_CHANNEL_COUNT,
  25. LOG_PREVIEW_MAX_CHANNEL_COUNT = 3,
  26. };
  27. struct LogPreview_t
  28. {
  29. LogPreview_t() :
  30. m_bDragging( false ),
  31. m_bActiveLog( false ),
  32. m_bSelected( false )
  33. {
  34. }
  35. bool IsEqual( const LogPreview_t& other )
  36. {
  37. if ( m_hControl != other.m_hControl )
  38. return false;
  39. for ( int i = 0; i < LOG_PREVIEW_MAX_CHANNEL_COUNT; ++i )
  40. {
  41. if ( m_hChannels[ i ] != other.m_hChannels[ i ] )
  42. return false;
  43. }
  44. if ( m_hOwner != other.m_hOwner )
  45. return false;
  46. if ( m_hShot != other.m_hShot )
  47. return false;
  48. if ( m_bDragging != other.m_bDragging )
  49. return false;
  50. if ( m_bActiveLog != other.m_bActiveLog )
  51. return false;
  52. if ( m_bSelected != other.m_bSelected )
  53. return false;
  54. return true;
  55. }
  56. CDmeHandle< CDmElement > m_hControl; // The animation set control
  57. CDmeHandle< CDmeChannel > m_hChannels[ LOG_PREVIEW_MAX_CHANNEL_COUNT ];
  58. CDmeHandle< CDmeClip > m_hOwner;
  59. CDmeHandle< CDmeFilmClip > m_hShot;
  60. bool m_bDragging : 1;
  61. bool m_bActiveLog : 1;
  62. bool m_bSelected : 1;
  63. };
  64. #endif // LOGPREVIEW_H