diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /mp/src/public/maya/IMayaVGui.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/public/maya/IMayaVGui.h')
| -rw-r--r-- | mp/src/public/maya/IMayaVGui.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/mp/src/public/maya/IMayaVGui.h b/mp/src/public/maya/IMayaVGui.h new file mode 100644 index 00000000..7c0d77f6 --- /dev/null +++ b/mp/src/public/maya/IMayaVGui.h @@ -0,0 +1,67 @@ +//===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
+//
+// Purpose: Interface for dealing with vgui focus issues across all plugins
+//
+// $NoKeywords: $
+//===========================================================================//
+
+#ifndef IMAYAVGUI_H
+#define IMAYAVGUI_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#include "tier0/platform.h"
+#include "appframework/iappsystem.h"
+#include "vgui_controls/Frame.h"
+
+
+//-----------------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------------
+namespace vgui
+{
+ class EditablePanel;
+}
+
+class CVsVGuiWindowBase;
+
+
+//-----------------------------------------------------------------------------
+// Factory for creating vgui windows
+//-----------------------------------------------------------------------------
+abstract_class IMayaVguiWindowFactory
+{
+public:
+ virtual void CreateVguiWindow( const char *pPanelName ) = 0;
+ virtual void DestroyVguiWindow( const char *pPanelName ) = 0;
+ virtual vgui::Frame *GetVGuiPanel( const char *pPanelName = NULL ) = 0;
+ virtual CVsVGuiWindowBase *GetVGuiWindow( const char *pPanelName = NULL ) = 0;
+};
+
+
+//-----------------------------------------------------------------------------
+// Interface for dealing with vgui focus issues across all plugins
+//-----------------------------------------------------------------------------
+#define MAYA_VGUI_INTERFACE_VERSION "VMayaVGui001"
+abstract_class IMayaVGui : public IAppSystem
+{
+public:
+ virtual void InstallVguiWindowFactory( const char *pWindowTypeName, IMayaVguiWindowFactory *pFactory ) = 0;
+ virtual void RemoveVguiWindowFactory( const char *pWindowTypeName, IMayaVguiWindowFactory *pFactory ) = 0;
+ virtual void SetFocus( void *hWnd, int hVGuiContext ) = 0;
+ virtual bool HasFocus( void *hWnd ) = 0;
+
+ // In this mode, maya's in a strange re-entrant mode waiting for a modal dialog
+ // We still get WM_PAINT messages, but we're in the middle of a callstack
+ // deep in the bowels of VGUI
+ virtual void SetModalMode( bool bEnable ) = 0;
+ virtual bool IsInModalMode( ) const = 0;
+};
+
+extern IMayaVGui* g_pMayaVGui;
+
+
+#endif // IMAYAVGUI_H
|