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.

58 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef PROPERTYPAGE_H
  8. #define PROPERTYPAGE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/EditablePanel.h>
  13. #include <vgui_controls/PHandle.h>
  14. namespace vgui
  15. {
  16. //-----------------------------------------------------------------------------
  17. // Purpose: Property page, as held by a set of property sheets
  18. //-----------------------------------------------------------------------------
  19. class PropertyPage : public EditablePanel
  20. {
  21. DECLARE_CLASS_SIMPLE( PropertyPage, EditablePanel );
  22. public:
  23. PropertyPage(Panel *parent, const char *panelName);
  24. ~PropertyPage();
  25. // Called when page is loaded. Data should be reloaded from document into controls.
  26. MESSAGE_FUNC( OnResetData, "ResetData" );
  27. // Called when the OK / Apply button is pressed. Changed data should be written into document.
  28. MESSAGE_FUNC( OnApplyChanges, "ApplyChanges" );
  29. // called when the page is shown/hidden
  30. MESSAGE_FUNC( OnPageShow, "PageShow" );
  31. MESSAGE_FUNC( OnPageHide, "PageHide" );
  32. virtual void OnKeyCodeTyped(KeyCode code);
  33. virtual bool HasUserConfigSettings() { return true; }
  34. virtual void SetVisible(bool state);
  35. protected:
  36. // called to be notified of the tab button used to Activate this page
  37. // if overridden this must be chained back to
  38. MESSAGE_FUNC_PTR( OnPageTabActivated, "PageTabActivated", panel );
  39. private:
  40. PHandle _pageTab;
  41. };
  42. } // namespace vgui
  43. #endif // PROPERTYPAGE_H