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.

88 lines
2.4 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 <VGUI_KeyValues.h>
  10. #include <VGUI_Controls.h>
  11. #include <VGUI_PropertySheet.h>
  12. using namespace vgui;
  13. class SampleTabs2: public DemoPage
  14. {
  15. public:
  16. SampleTabs2(Panel *parent, const char *name);
  17. ~SampleTabs2();
  18. private:
  19. PropertySheet *m_pPropertySheet;
  20. };
  21. //-----------------------------------------------------------------------------
  22. // Purpose: Constructor
  23. //-----------------------------------------------------------------------------
  24. SampleTabs2::SampleTabs2(Panel *parent, const char *name) : DemoPage(parent, name)
  25. {
  26. m_pPropertySheet = new PropertySheet(this, "Tabs");
  27. m_pPropertySheet->SetBounds(90,25, 344, 200);
  28. m_pPropertySheet->SetTabWidth(75);
  29. Panel *testPanel = new PropertyPage (this, "tab1");
  30. testPanel->SetBounds(90,50, 375, 200);
  31. m_pPropertySheet->AddPage(testPanel, "Keyboard");
  32. Panel *testPanel2 = new PropertyPage (this, "tab2");
  33. testPanel->SetBounds(90,50,375,200);
  34. m_pPropertySheet->AddPage(testPanel2, "Mouse");
  35. Panel *testPanel3 = new PropertyPage (this, "tab3");
  36. testPanel->SetBounds(90,50,375,200);
  37. m_pPropertySheet->AddPage(testPanel3, "Audio");
  38. Panel *testPanel4 = new PropertyPage (this, "tab4");
  39. testPanel->SetBounds(90,50, 375,200);
  40. m_pPropertySheet->AddPage(testPanel4, "Video");
  41. Panel *testPanel5 = new PropertyPage (this, "tab5");
  42. testPanel->SetBounds(90,50, 375,200);
  43. m_pPropertySheet->AddPage(testPanel5, "Brother");
  44. Panel *testPanel6 = new PropertyPage (this, "tab6");
  45. testPanel->SetBounds(90,50, 375,200);
  46. m_pPropertySheet->AddPage(testPanel6, "Brother2");
  47. Panel *testPanel7 = new PropertyPage (this, "tab7");
  48. testPanel->SetBounds(90,50, 375,200);
  49. m_pPropertySheet->AddPage(testPanel7, "Brother3");
  50. Panel *testPanel8 = new PropertyPage (this, "tab8");
  51. testPanel->SetBounds(90,50, 375,200);
  52. m_pPropertySheet->AddPage(testPanel8, "Brother4");
  53. m_pPropertySheet->SetScrolling(true);
  54. }
  55. //-----------------------------------------------------------------------------
  56. // Purpose: Destructor
  57. //-----------------------------------------------------------------------------
  58. SampleTabs2::~SampleTabs2()
  59. {
  60. }
  61. Panel* SampleTabs2_Create(Panel *parent)
  62. {
  63. return new SampleTabs2(parent, "Scrolling Tabs");
  64. }