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.

74 lines
2.5 KiB

  1. //=========== Copyright Valve Corporation, All rights reserved. ===============//
  2. //
  3. // Purpose:
  4. //=============================================================================//
  5. #ifndef PANORAMA_TEXTINPUT_SETTINGS_H
  6. #define PANORAMA_TEXTINPUT_SETTINGS_H
  7. #include "panorama/controls/panel2d.h"
  8. #include "panorama/input/iuiinput.h"
  9. #include "panorama/textinput/textinput.h"
  10. namespace panorama
  11. {
  12. //-----------------------------------------------------------------------------
  13. // Purpose: Handler settings that get passed in at construction time
  14. //-----------------------------------------------------------------------------
  15. class CTextInputHandlerSettings
  16. {
  17. public:
  18. CTextInputHandlerSettings();
  19. // Parses property from configuration
  20. bool BSetProperty( CPanoramaSymbol symName, const char *pchValue );
  21. // Convenient accessor methods
  22. void SetCancellable( bool bCancellable ) { m_bCancellable = bCancellable; }
  23. bool BCancellable() const { return m_bCancellable; }
  24. void SetHideSuggestions( bool bHideSuggestions ) { m_bHideSuggestions = bHideSuggestions; }
  25. bool BHideSuggestions() const { return m_bHideSuggestions; }
  26. void SetDoubleSpaceToDotSpace( bool bDoubleSpaceToDotSpace ) { m_bDoubleSpaceToDotSpace = bDoubleSpaceToDotSpace; }
  27. bool BDoubleSpaceToDotSpace() const { return m_bDoubleSpaceToDotSpace; }
  28. void SetAutoCaps( bool bAutoCaps ) { m_bAutoCaps = bAutoCaps; }
  29. bool BAutoCaps() const { return m_bAutoCaps; }
  30. void SetID( const char *pszID ) { m_strID = pszID; }
  31. const char *GetID() const { return m_strID; }
  32. void SetClasses( const char *pszClasses ) { m_strClasses = pszClasses; }
  33. const char *GetClasses() const { return m_strClasses; }
  34. void SetDoneActionString( const char *pszActionString ) { m_strDoneActionString = pszActionString; }
  35. const char *GetDoneActionString() const { return m_strDoneActionString; }
  36. void SetCancelActionString( const char *pszCancelActionString ) { m_strCancelActionString = pszCancelActionString; }
  37. const char *GetCancelActionString() const { return m_strCancelActionString; }
  38. void SetMode( ETextInputMode_t mode ) { m_mode = mode; }
  39. ETextInputMode_t GetMode() const { return m_mode; }
  40. #ifdef DBGFLAG_VALIDATE
  41. void Validate( CValidator &validator, const tchar *pchName );
  42. #endif
  43. public:
  44. bool m_bCancellable;
  45. bool m_bHideSuggestions;
  46. bool m_bDoubleSpaceToDotSpace;
  47. bool m_bAutoCaps;
  48. CUtlString m_strID;
  49. CUtlString m_strClasses;
  50. CUtlString m_strDoneActionString;
  51. CUtlString m_strCancelActionString;
  52. ETextInputMode_t m_mode;
  53. };
  54. } // namespace panorama
  55. #endif // PANORAMA_TEXTINPUT_SETTINGS_H