summaryrefslogtreecommitdiff
path: root/hammer/VGuiWnd.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/VGuiWnd.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'hammer/VGuiWnd.h')
-rw-r--r--hammer/VGuiWnd.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/hammer/VGuiWnd.h b/hammer/VGuiWnd.h
new file mode 100644
index 0000000..a0f4d03
--- /dev/null
+++ b/hammer/VGuiWnd.h
@@ -0,0 +1,61 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+#pragma once
+#include "afxwin.h"
+#include "color.h"
+
+namespace vgui
+{
+ class EditablePanel;
+ typedef unsigned long HCursor;
+}
+
+class CVGuiWnd
+{
+
+public:
+ CVGuiWnd(void);
+ ~CVGuiWnd(void);
+
+public:
+
+ void SetMainPanel( vgui::EditablePanel * pPanel );
+ vgui::EditablePanel *GetMainPanel(); // returns VGUI main panel
+ vgui::EditablePanel *CreateDefaultPanel();
+
+ void SetParentWindow(CWnd *pParent);
+ CWnd *GetParentWnd(); // return CWnd handle
+
+ void SetCursor(vgui::HCursor cursor);
+ void SetCursor(const char *filename);
+
+ void SetRepaintInterval( int msecs );
+ int GetVGuiContext();
+
+protected:
+ void DrawVGuiPanel(); // overridden to draw this view
+ long WindowProcVGui( UINT message, WPARAM wParam, LPARAM lParam ); //
+
+ vgui::EditablePanel *m_pMainPanel;
+ CWnd *m_pParentWnd;
+ int m_hVGuiContext;
+ bool m_bIsDrawing;
+ Color m_ClearColor;
+ bool m_bClearZBuffer;
+};
+
+class CVGuiPanelWnd: public CWnd, public CVGuiWnd
+{
+protected:
+ DECLARE_DYNCREATE(CVGuiPanelWnd)
+
+public:
+
+ // Generated message map functions
+ //{{AFX_MSG(CVGuiViewModel)
+ //}}AFX_MSG
+
+ virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam );
+
+ DECLARE_MESSAGE_MAP()
+};
+