summaryrefslogtreecommitdiff
path: root/public/toolutils/miniviewport.h
blob: 5c93b8ecee3fc96cfaf173cd181dfa3dbd118d94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================

#ifndef MINIVIEWPORT_H
#define MINIVIEWPORT_H
#ifdef _WIN32
#pragma once
#endif

#include "vgui_controls/ToolWindow.h"

class CMiniViewportPropertyPage;

class CMiniViewport : public vgui::ToolWindow
{
	DECLARE_CLASS_SIMPLE( CMiniViewport, vgui::ToolWindow );
public:
	CMiniViewport( vgui::Panel *parent, 
		bool contextLabel, 
		vgui::IToolWindowFactory *factory = 0, 
		vgui::Panel *page = NULL, 
		char const *title = NULL, 
		bool contextMenu = false );

	void	GetViewport( bool& enabled, int& x, int& y, int& width, int& height );

	void	GetEngineBounds( int& x, int& y, int& w, int& h );

	void	RenderFrameBegin();

	// Sets text to draw over the window
	void	SetOverlayText( const char *pText );

	void	ReleaseLayoffTexture();

private:
	vgui::DHANDLE< CMiniViewportPropertyPage >	m_hPage;
};

#endif // MINIVIEWPORT_H