aboutsummaryrefslogtreecommitdiff
path: root/sp/src/public/game/client/iviewport.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /sp/src/public/game/client/iviewport.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/public/game/client/iviewport.h')
-rw-r--r--sp/src/public/game/client/iviewport.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/sp/src/public/game/client/iviewport.h b/sp/src/public/game/client/iviewport.h
new file mode 100644
index 00000000..8d24f0eb
--- /dev/null
+++ b/sp/src/public/game/client/iviewport.h
@@ -0,0 +1,61 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+//
+//-----------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+#if !defined( IVIEWPORT_H )
+#define IVIEWPORT_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui/VGUI.h>
+
+#include "viewport_panel_names.h"
+
+class KeyValues;
+
+abstract_class IViewPortPanel
+{
+
+public:
+ virtual ~IViewPortPanel() {};
+
+ virtual const char *GetName( void ) = 0;// return identifer name
+ virtual void SetData(KeyValues *data) = 0; // set ViewPortPanel data
+ virtual void Reset( void ) = 0; // clears internal state, deactivates it
+ virtual void Update( void ) = 0; // updates all (size, position, content, etc)
+ virtual bool NeedsUpdate( void ) = 0; // query panel if content needs to be updated
+ virtual bool HasInputElements( void ) = 0; // true if panel contains elments which accepts input
+
+ virtual void ShowPanel( bool state ) = 0; // activate VGUI Frame
+
+ // VGUI functions:
+ virtual vgui::VPANEL GetVPanel( void ) = 0; // returns VGUI panel handle
+ virtual bool IsVisible() = 0; // true if panel is visible
+ virtual void SetParent( vgui::VPANEL parent ) = 0;
+};
+
+abstract_class IViewPort
+{
+public:
+ virtual void UpdateAllPanels( void ) = 0;
+ virtual void ShowPanel( const char *pName, bool state ) = 0;
+ virtual void ShowPanel( IViewPortPanel* pPanel, bool state ) = 0;
+ virtual void ShowBackGround(bool bShow) = 0;
+ virtual IViewPortPanel* FindPanelByName(const char *szPanelName) = 0;
+ virtual IViewPortPanel* GetActivePanel( void ) = 0;
+ virtual void PostMessageToPanel( const char *pName, KeyValues *pKeyValues ) = 0;
+};
+
+extern IViewPort *gViewPortInterface;
+
+
+#endif // IVIEWPORT_H \ No newline at end of file