summaryrefslogtreecommitdiff
path: root/public/panorama/textinput/textinput_fullscreen.h
blob: 020e3d78851646dd721fc1010fcc72aa3f6a332e (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
44
45
46
47
48
49
50
//=========== Copyright Valve Corporation, All rights reserved. ===============//
//
// Purpose: 
//=============================================================================//

#ifndef PANORAMA_TEXTINPUT_FULLSCREEN_H
#define PANORAMA_TEXTINPUT_FULLSCREEN_H

#ifdef _WIN32
#pragma once
#endif

#include "panorama/controls/panel2d.h"
#include "panorama/controls/textentry.h"

namespace panorama
{

DECLARE_PANEL_EVENT2( TextInputFullscreenClosed, bool, const char * );

//-----------------------------------------------------------------------------
// Purpose: Full screen + daisy wheel
//-----------------------------------------------------------------------------
class CTextInputFullscreen : public panorama::CPanel2D
{
	DECLARE_PANEL2D( CTextInputFullscreen, panorama::CPanel2D );

public:
	CTextInputFullscreen( panorama::CPanel2D *pPanel, const char * pchPanelID, const CTextInputHandlerSettings &settings );
	~CTextInputFullscreen();

	void SetMultiline( bool bMultiline );
	void SetDescription( const char *pchDescription );
	void SetMaxChars( uint32 unCharMax );
	void SetEnteredText( const char *pchText );
	virtual panorama::IUIPanel *OnGetDefaultInputFocus();

private:
	bool EventTextInputHandlerStateChange( const panorama::CPanelPtr< panorama::IUIPanel > &ptrPanel, bool bActivating );
	bool EventTextInputFinished( const panorama::CPanelPtr< panorama::IUIPanel > &ptrPanel, bool bSubmitted, const char *pchText );

	panorama::CTextInputHandler *m_pTextInputHandler;
	panorama::CTextEntry *m_pEnteredText;
	panorama::CLabel *m_pInputDescription;
};

} // namespace panorama

#endif // PANORAMA_TEXTINPUT_FULLSCREEN_H