summaryrefslogtreecommitdiff
path: root/utils/hlfaceposer/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 /utils/hlfaceposer/VGuiWnd.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'utils/hlfaceposer/VGuiWnd.h')
-rw-r--r--utils/hlfaceposer/VGuiWnd.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/utils/hlfaceposer/VGuiWnd.h b/utils/hlfaceposer/VGuiWnd.h
new file mode 100644
index 0000000..0c8964a
--- /dev/null
+++ b/utils/hlfaceposer/VGuiWnd.h
@@ -0,0 +1,69 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+
+#ifndef VGUIWND_H
+#define VGUIWND_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "mxtk/mx.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(mxWindow *pParent);
+ mxWindow *GetParentWnd(); // return mxWindow 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
+ int HandeEventVGui( mxEvent *event );
+
+ vgui::EditablePanel *m_pMainPanel;
+ mxWindow *m_pParentWnd;
+ int m_hVGuiContext;
+ bool m_bIsDrawing;
+ Color m_ClearColor;
+ bool m_bClearZBuffer;
+};
+
+class CVGuiPanelWnd: public mxWindow, public CVGuiWnd
+{
+ typedef mxWindow BaseClass;
+
+public:
+
+ CVGuiPanelWnd( mxWindow *parent, int x, int y, int w, int h );
+
+ virtual int handleEvent( mxEvent *event );
+ virtual void redraw();
+};
+
+
+#endif // VGUIWND_H