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.

43 lines
1003 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef MINIVIEWPORT_H
  7. #define MINIVIEWPORT_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "vgui_controls/ToolWindow.h"
  12. class CMiniViewportPropertyPage;
  13. class CMiniViewport : public vgui::ToolWindow
  14. {
  15. DECLARE_CLASS_SIMPLE( CMiniViewport, vgui::ToolWindow );
  16. public:
  17. CMiniViewport( vgui::Panel *parent,
  18. bool contextLabel,
  19. vgui::IToolWindowFactory *factory = 0,
  20. vgui::Panel *page = NULL,
  21. char const *title = NULL,
  22. bool contextMenu = false );
  23. void GetViewport( bool& enabled, int& x, int& y, int& width, int& height );
  24. void GetEngineBounds( int& x, int& y, int& w, int& h );
  25. void RenderFrameBegin();
  26. // Sets text to draw over the window
  27. void SetOverlayText( const char *pText );
  28. void ReleaseLayoffTexture();
  29. private:
  30. vgui::DHANDLE< CMiniViewportPropertyPage > m_hPage;
  31. };
  32. #endif // MINIVIEWPORT_H