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.

87 lines
2.6 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: Foundry tool; main UI smarts class
  4. //
  5. //=============================================================================
  6. #ifndef FOUNDRYTOOL_H
  7. #define FOUNDRYTOOL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tier0/platform.h"
  12. #include "datamodel/idatamodel.h"
  13. //-----------------------------------------------------------------------------
  14. // Forward declarations
  15. //-----------------------------------------------------------------------------
  16. class CDmeEditorTypeDictionary;
  17. class CDmeVMFEntity;
  18. class CMapDoc;
  19. namespace vgui
  20. {
  21. class Panel;
  22. }
  23. //-----------------------------------------------------------------------------
  24. // Singleton interfaces
  25. //-----------------------------------------------------------------------------
  26. extern CDmeEditorTypeDictionary *g_pEditorTypeDict;
  27. //-----------------------------------------------------------------------------
  28. // Allows the doc to call back into the Foundry editor tool
  29. //-----------------------------------------------------------------------------
  30. abstract_class IFoundryDocCallback
  31. {
  32. public:
  33. // Called by the doc when the data changes
  34. virtual void OnDocChanged( const char *pReason, int nNotifySource, int nNotifyFlags ) = 0;
  35. };
  36. //-----------------------------------------------------------------------------
  37. // Global methods of the foundry tool
  38. //-----------------------------------------------------------------------------
  39. abstract_class IFoundryTool
  40. {
  41. public:
  42. // Gets at the rool panel (for modal dialogs)
  43. virtual vgui::Panel *GetRootPanel() = 0;
  44. // Gets the registry name (for saving settings)
  45. virtual const char *GetRegistryName() = 0;
  46. // Updates live entity in game with the given properties
  47. virtual bool UpdateEntity( int iHammerID, CUtlVector<char*> &keys, CUtlVector<char*> &values ) = 0;
  48. // Destroys live entity and creates a new one with the given properties
  49. virtual void RespawnEntitiesWithEdits( CMapClass **ppEntities, int nEntities ) = 0;
  50. // Destroy a live entity
  51. virtual void DestroyEntity( int iHammerID ) = 0;
  52. // Switch to the engine's window with the engine driving input.
  53. virtual void SwitchToEngine() = 0;
  54. // Move the engine's view to this place.
  55. virtual void MoveEngineViewTo( const Vector &vPos, const QAngle &vAngles ) = 0;
  56. // Run a console command.
  57. virtual void ConsoleCommand( const char *pConCommand ) = 0;
  58. // Hooked to foundry_draw_hammer_models.
  59. virtual bool ShouldRender3DModels() = 0;
  60. // Called when a CMapDoc goes away.
  61. virtual void OnMapDocDestroy( CMapDoc *pDoc ) = 0;
  62. };
  63. extern IFoundryTool *g_pFoundryTool;
  64. #endif // FOUNDRYTOOL_H