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.

50 lines
1.6 KiB

  1. //=========== Copyright Valve Corporation, All rights reserved. ===============//
  2. //
  3. // Purpose:
  4. //=============================================================================//
  5. #ifndef PANORAMA_TEXTINPUT_FULLSCREEN_H
  6. #define PANORAMA_TEXTINPUT_FULLSCREEN_H
  7. #ifdef _WIN32
  8. #pragma once
  9. #endif
  10. #include "panorama/controls/panel2d.h"
  11. #include "panorama/controls/textentry.h"
  12. namespace panorama
  13. {
  14. DECLARE_PANEL_EVENT2( TextInputFullscreenClosed, bool, const char * );
  15. //-----------------------------------------------------------------------------
  16. // Purpose: Full screen + daisy wheel
  17. //-----------------------------------------------------------------------------
  18. class CTextInputFullscreen : public panorama::CPanel2D
  19. {
  20. DECLARE_PANEL2D( CTextInputFullscreen, panorama::CPanel2D );
  21. public:
  22. CTextInputFullscreen( panorama::CPanel2D *pPanel, const char * pchPanelID, const CTextInputHandlerSettings &settings );
  23. ~CTextInputFullscreen();
  24. void SetMultiline( bool bMultiline );
  25. void SetDescription( const char *pchDescription );
  26. void SetMaxChars( uint32 unCharMax );
  27. void SetEnteredText( const char *pchText );
  28. virtual panorama::IUIPanel *OnGetDefaultInputFocus();
  29. private:
  30. bool EventTextInputHandlerStateChange( const panorama::CPanelPtr< panorama::IUIPanel > &ptrPanel, bool bActivating );
  31. bool EventTextInputFinished( const panorama::CPanelPtr< panorama::IUIPanel > &ptrPanel, bool bSubmitted, const char *pchText );
  32. panorama::CTextInputHandler *m_pTextInputHandler;
  33. panorama::CTextEntry *m_pEnteredText;
  34. panorama::CLabel *m_pInputDescription;
  35. };
  36. } // namespace panorama
  37. #endif // PANORAMA_TEXTINPUT_FULLSCREEN_H