Team Fortress 2 Source Code as on 22/4/2020
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.

61 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. #pragma once
  3. #include "afxwin.h"
  4. #include "color.h"
  5. namespace vgui
  6. {
  7. class EditablePanel;
  8. typedef unsigned long HCursor;
  9. }
  10. class CVGuiWnd
  11. {
  12. public:
  13. CVGuiWnd(void);
  14. ~CVGuiWnd(void);
  15. public:
  16. void SetMainPanel( vgui::EditablePanel * pPanel );
  17. vgui::EditablePanel *GetMainPanel(); // returns VGUI main panel
  18. vgui::EditablePanel *CreateDefaultPanel();
  19. void SetParentWindow(CWnd *pParent);
  20. CWnd *GetParentWnd(); // return CWnd handle
  21. void SetCursor(vgui::HCursor cursor);
  22. void SetCursor(const char *filename);
  23. void SetRepaintInterval( int msecs );
  24. int GetVGuiContext();
  25. protected:
  26. void DrawVGuiPanel(); // overridden to draw this view
  27. long WindowProcVGui( UINT message, WPARAM wParam, LPARAM lParam ); //
  28. vgui::EditablePanel *m_pMainPanel;
  29. CWnd *m_pParentWnd;
  30. int m_hVGuiContext;
  31. bool m_bIsDrawing;
  32. Color m_ClearColor;
  33. bool m_bClearZBuffer;
  34. };
  35. class CVGuiPanelWnd: public CWnd, public CVGuiWnd
  36. {
  37. protected:
  38. DECLARE_DYNCREATE(CVGuiPanelWnd)
  39. public:
  40. // Generated message map functions
  41. //{{AFX_MSG(CVGuiViewModel)
  42. //}}AFX_MSG
  43. virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam );
  44. DECLARE_MESSAGE_MAP()
  45. };