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.

65 lines
1.8 KiB

  1. //========= Copyright 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. namespace vgui
  19. {
  20. class Panel;
  21. }
  22. //-----------------------------------------------------------------------------
  23. // Singleton interfaces
  24. //-----------------------------------------------------------------------------
  25. extern CDmeEditorTypeDictionary *g_pEditorTypeDict;
  26. //-----------------------------------------------------------------------------
  27. // Allows the doc to call back into the Foundry editor tool
  28. //-----------------------------------------------------------------------------
  29. abstract_class IFoundryDocCallback
  30. {
  31. public:
  32. // Called by the doc when the data changes
  33. virtual void OnDocChanged( const char *pReason, int nNotifySource, int nNotifyFlags ) = 0;
  34. };
  35. //-----------------------------------------------------------------------------
  36. // Global methods of the foundry tool
  37. //-----------------------------------------------------------------------------
  38. abstract_class IFoundryTool
  39. {
  40. public:
  41. // Gets at the rool panel (for modal dialogs)
  42. virtual vgui::Panel *GetRootPanel() = 0;
  43. // Gets the registry name (for saving settings)
  44. virtual const char *GetRegistryName() = 0;
  45. // Shows a particular entity in the entity properties dialog
  46. virtual void ShowEntityInEntityProperties( CDmeVMFEntity *pEntity ) = 0;
  47. };
  48. extern IFoundryTool *g_pFoundryTool;
  49. #endif // FOUNDRYTOOL_H