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.

69 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "DemoPage.h"
  8. #include <VGUI/IVGui.h>
  9. #include <Keyvalues.h>
  10. #include <vgui_controls/PropertySheet.h>
  11. using namespace vgui;
  12. class SampleTabs: public DemoPage
  13. {
  14. public:
  15. SampleTabs(Panel *parent, const char *name);
  16. ~SampleTabs();
  17. private:
  18. PropertySheet *m_pPropertySheet;
  19. };
  20. //-----------------------------------------------------------------------------
  21. // Purpose: Constructor
  22. //-----------------------------------------------------------------------------
  23. SampleTabs::SampleTabs(Panel *parent, const char *name) : DemoPage(parent, name)
  24. {
  25. m_pPropertySheet = new PropertySheet(this, "Tabs");
  26. m_pPropertySheet->SetBounds(90,25, 375, 200);
  27. m_pPropertySheet->SetTabWidth(75);
  28. Panel *testPanel = new PropertyPage (this, "tab1");
  29. testPanel->SetBounds(90,50, 375, 200);
  30. m_pPropertySheet->AddPage(testPanel, "Keyboard");
  31. Panel *testPanel2 = new PropertyPage (this, "tab2");
  32. testPanel->SetBounds(90,50,375,200);
  33. m_pPropertySheet->AddPage(testPanel2, "Mouse");
  34. Panel *testPanel3 = new PropertyPage (this, "tab3");
  35. testPanel->SetBounds(90,50,375,200);
  36. m_pPropertySheet->AddPage(testPanel3, "Audio");
  37. Panel *testPanel4 = new PropertyPage (this, "tab4");
  38. testPanel->SetBounds(90,50, 375,200);
  39. m_pPropertySheet->AddPage(testPanel4, "Video");
  40. }
  41. //-----------------------------------------------------------------------------
  42. // Purpose: Destructor
  43. //-----------------------------------------------------------------------------
  44. SampleTabs::~SampleTabs()
  45. {
  46. }
  47. Panel* SampleTabs_Create(Panel *parent)
  48. {
  49. return new SampleTabs(parent, "Tabs");
  50. }