Counter Strike : Global Offensive Source Code
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.

82 lines
2.5 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef BASEANIMATIONSETEDITOR_H
  7. #define BASEANIMATIONSETEDITOR_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "vgui_controls/EditablePanel.h"
  12. #include "vgui_controls/ImageList.h"
  13. #include "dme_controls/RecordingState.h"
  14. #include "dme_controls/BaseAnimationSetEditorController.h"
  15. #include "tier1/utlvector.h"
  16. //-----------------------------------------------------------------------------
  17. // Forward declarations
  18. //-----------------------------------------------------------------------------
  19. struct LogPreview_t;
  20. class CDmeAnimationSet;
  21. class CDmeAnimationList;
  22. class CDmeChannelsClip;
  23. class CBaseAnimSetControlGroupPanel;
  24. class CBaseAnimSetPresetFaderPanel;
  25. class CBaseAnimSetAttributeSliderPanel;
  26. //-----------------------------------------------------------------------------
  27. // Base class for the panel for editing animation sets
  28. //-----------------------------------------------------------------------------
  29. class CBaseAnimationSetEditor : public vgui::EditablePanel
  30. {
  31. DECLARE_CLASS_SIMPLE( CBaseAnimationSetEditor, vgui::EditablePanel );
  32. public:
  33. enum EAnimSetLayout_t
  34. {
  35. LAYOUT_SPLIT = 0,
  36. LAYOUT_VERTICAL,
  37. LAYOUT_HORIZONTAL,
  38. };
  39. CBaseAnimationSetEditor( vgui::Panel *parent, char const *panelName, CBaseAnimationSetControl *pAnimationSetController );
  40. virtual ~CBaseAnimationSetEditor();
  41. virtual void CreateToolsSubPanels();
  42. virtual void ChangeLayout( EAnimSetLayout_t newLayout );
  43. virtual void OpenTreeViewContextMenu( KeyValues *pItemData );
  44. CBaseAnimationSetControl *GetController();
  45. CBaseAnimSetControlGroupPanel *GetControlGroup();
  46. CBaseAnimSetPresetFaderPanel *GetPresetFader();
  47. CBaseAnimSetAttributeSliderPanel *GetAttributeSlider();
  48. void ChangeAnimationSetClip( CDmeFilmClip *pFilmClip );
  49. void OnControlsAddedOrRemoved();
  50. protected:
  51. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  52. MESSAGE_FUNC_PARAMS( OnOpenContextMenu, "OpenContextMenu", params );
  53. MESSAGE_FUNC_INT( OnChangeLayout, "OnChangeLayout", value );
  54. protected:
  55. EAnimSetLayout_t m_Layout;
  56. vgui::DHANDLE< vgui::Splitter > m_Splitter;
  57. vgui::DHANDLE< CBaseAnimSetControlGroupPanel > m_hControlGroup;
  58. vgui::DHANDLE< CBaseAnimSetPresetFaderPanel > m_hPresetFader;
  59. vgui::DHANDLE< CBaseAnimSetAttributeSliderPanel > m_hAttributeSlider;
  60. vgui::DHANDLE< vgui::Menu > m_hContextMenu;
  61. CBaseAnimationSetControl *m_pController;
  62. };
  63. #endif // BASEANIMATIONSETEDITOR_H