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.

67 lines
2.2 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose: Interface for dealing with vgui focus issues across all plugins
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef IMAYAVGUI_H
  8. #define IMAYAVGUI_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "tier0/platform.h"
  13. #include "appframework/iappsystem.h"
  14. #include "vgui_controls/Frame.h"
  15. //-----------------------------------------------------------------------------
  16. // Forward declarations
  17. //-----------------------------------------------------------------------------
  18. namespace vgui
  19. {
  20. class EditablePanel;
  21. }
  22. class CVsVGuiWindowBase;
  23. //-----------------------------------------------------------------------------
  24. // Factory for creating vgui windows
  25. //-----------------------------------------------------------------------------
  26. abstract_class IMayaVguiWindowFactory
  27. {
  28. public:
  29. virtual void CreateVguiWindow( const char *pPanelName ) = 0;
  30. virtual void DestroyVguiWindow( const char *pPanelName ) = 0;
  31. virtual vgui::Frame *GetVGuiPanel( const char *pPanelName = NULL ) = 0;
  32. virtual CVsVGuiWindowBase *GetVGuiWindow( const char *pPanelName = NULL ) = 0;
  33. };
  34. //-----------------------------------------------------------------------------
  35. // Interface for dealing with vgui focus issues across all plugins
  36. //-----------------------------------------------------------------------------
  37. #define MAYA_VGUI_INTERFACE_VERSION "VMayaVGui001"
  38. abstract_class IMayaVGui : public IAppSystem
  39. {
  40. public:
  41. virtual void InstallVguiWindowFactory( const char *pWindowTypeName, IMayaVguiWindowFactory *pFactory ) = 0;
  42. virtual void RemoveVguiWindowFactory( const char *pWindowTypeName, IMayaVguiWindowFactory *pFactory ) = 0;
  43. virtual void SetFocus( void *hWnd, int hVGuiContext ) = 0;
  44. virtual bool HasFocus( void *hWnd ) = 0;
  45. // In this mode, maya's in a strange re-entrant mode waiting for a modal dialog
  46. // We still get WM_PAINT messages, but we're in the middle of a callstack
  47. // deep in the bowels of VGUI
  48. virtual void SetModalMode( bool bEnable ) = 0;
  49. virtual bool IsInModalMode( ) const = 0;
  50. };
  51. extern IMayaVGui* g_pMayaVGui;
  52. #endif // IMAYAVGUI_H