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.

62 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef ATTRIBUTETEXTPANEL_H
  9. #define ATTRIBUTETEXTPANEL_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "dme_controls/BaseAttributePanel.h"
  14. //-----------------------------------------------------------------------------
  15. // Forward declarations
  16. //-----------------------------------------------------------------------------
  17. class CDmElement;
  18. class CAttributeTextEntry;
  19. namespace vgui
  20. {
  21. class Label;
  22. }
  23. //-----------------------------------------------------------------------------
  24. // CAttributeTextPanel
  25. //-----------------------------------------------------------------------------
  26. class CAttributeTextPanel : public CBaseAttributePanel
  27. {
  28. DECLARE_CLASS_SIMPLE( CAttributeTextPanel, CBaseAttributePanel );
  29. public:
  30. CAttributeTextPanel( vgui::Panel *parent, const AttributeWidgetInfo_t &info );
  31. virtual void SetFont( HFont font );
  32. virtual void PostConstructor();
  33. virtual void Apply();
  34. virtual void Refresh();
  35. // Returns the text type
  36. const char *GetTextType();
  37. protected:
  38. virtual vgui::Panel *GetDataPanel();
  39. MESSAGE_FUNC(OnTextChanged, "TextChanged")
  40. {
  41. SetDirty( true );
  42. }
  43. protected:
  44. CAttributeTextEntry *m_pData;
  45. bool m_bShowMemoryUsage;
  46. };
  47. #endif // ATTRIBUTETEXTPANEL_H