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.

93 lines
2.7 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. //===========================================================================//
  6. #ifndef PARTICLESYSTEMDEFINITIONBROWSER_H
  7. #define PARTICLESYSTEMDEFINITIONBROWSER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "vgui_controls/editablepanel.h"
  12. #include "tier1/utlstring.h"
  13. //-----------------------------------------------------------------------------
  14. // Forward declarations
  15. //-----------------------------------------------------------------------------
  16. class CPetDoc;
  17. class CPetTool;
  18. class CDmeParticleSystemDefinition;
  19. class CUndoScopeGuard;
  20. class CParticleSnapshotGrid;
  21. namespace vgui
  22. {
  23. class ComboBox;
  24. class Button;
  25. class TextEntry;
  26. class ListPanel;
  27. class CheckButton;
  28. class RadioButton;
  29. }
  30. //-----------------------------------------------------------------------------
  31. // Panel that shows all entities in the level
  32. //-----------------------------------------------------------------------------
  33. class CParticleSystemDefinitionBrowser : public vgui::EditablePanel
  34. {
  35. DECLARE_CLASS_SIMPLE( CParticleSystemDefinitionBrowser, vgui::EditablePanel );
  36. public:
  37. CParticleSystemDefinitionBrowser( CPetDoc *pDoc, vgui::Panel* pParent, const char *pName ); // standard constructor
  38. virtual ~CParticleSystemDefinitionBrowser();
  39. // Inherited from Panel
  40. virtual void OnCommand( const char *pCommand );
  41. virtual void OnKeyCodeTyped( vgui::KeyCode code );
  42. // Methods related to updating the listpanel
  43. void UpdateParticleSystemList( bool bRetainSelection = true );
  44. // Select a particular node
  45. void SelectParticleSystem( CDmeParticleSystemDefinition *pParticleSystem );
  46. // paste.
  47. void PasteFromClipboard();
  48. private:
  49. MESSAGE_FUNC( OnCopy, "OnCopy" );
  50. KEYBINDING_FUNC_NODECLARE( edit_copy, KEY_C, vgui::MODIFIER_CONTROL, OnCopy, "#edit_copy_help", 0 );
  51. MESSAGE_FUNC_PARAMS( OnInputCompleted, "InputCompleted", kv );
  52. MESSAGE_FUNC( OnParticleSystemSelectionChanged, "ParticleSystemSelectionChanged" );
  53. void ReplaceDef_r( CUndoScopeGuard& guard, CDmeParticleSystemDefinition *pDef );
  54. void PasteOperator( CUndoScopeGuard& guard, class CDmeParticleFunction *pDef );
  55. void PasteDefinitionBody( CUndoScopeGuard& guard, CDmeParticleSystemDefinition *pDef );
  56. // Gets the selected particle system
  57. CDmeParticleSystemDefinition* GetSelectedParticleSystem( int nIdx );
  58. // Called when the selection changes
  59. void UpdateParticleSystemSelection();
  60. // Deletes selected particle systems
  61. void DeleteParticleSystems();
  62. // Shows the most recent selected object in properties window
  63. void OnProperties();
  64. CPetDoc *m_pDoc;
  65. CParticleSnapshotGrid *m_pSystemGrid;
  66. vgui::Button *m_pCreateButton;
  67. vgui::Button *m_pDeleteButton;
  68. vgui::Button *m_pCopyButton;
  69. };
  70. #endif // PARTICLESYSTEMDEFINITIONBROWSER_H