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.

61 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef ATTRIBUTEELEMENTPANEL_H
  9. #define ATTRIBUTEELEMENTPANEL_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. // CAttributeElementPanel
  25. //-----------------------------------------------------------------------------
  26. class CAttributeElementPanel : public CBaseAttributePanel
  27. {
  28. DECLARE_CLASS_SIMPLE( CAttributeElementPanel, CBaseAttributePanel );
  29. public:
  30. CAttributeElementPanel( vgui::Panel *parent, const AttributeWidgetInfo_t &info );
  31. virtual void PostConstructor();
  32. virtual void Apply();
  33. protected:
  34. virtual vgui::Panel *GetDataPanel();
  35. virtual void OnCreateDragData( KeyValues *msg );
  36. MESSAGE_FUNC(OnTextChanged, "TextChanged")
  37. {
  38. SetDirty( true );
  39. }
  40. private:
  41. virtual void Refresh();
  42. CAttributeTextEntry *m_pData;
  43. bool m_bShowMemoryUsage;
  44. };
  45. #endif // ATTRIBUTEELEMENTPANEL_H