From 3bf9df6b2785fa6d951086978a3e66f49427166a Mon Sep 17 00:00:00 2001 From: FluorescentCIAAfricanAmerican <0934gj3049fk@protonmail.com> Date: Wed, 22 Apr 2020 12:56:21 -0400 Subject: 1 --- utils/vgui_panel_zoo/HTMLDemo2.cpp | 70 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 utils/vgui_panel_zoo/HTMLDemo2.cpp (limited to 'utils/vgui_panel_zoo/HTMLDemo2.cpp') diff --git a/utils/vgui_panel_zoo/HTMLDemo2.cpp b/utils/vgui_panel_zoo/HTMLDemo2.cpp new file mode 100644 index 0000000..59d7fa5 --- /dev/null +++ b/utils/vgui_panel_zoo/HTMLDemo2.cpp @@ -0,0 +1,70 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// +#include "DemoPage.h" + +#include + +#include + + +using namespace vgui; + +//----------------------------------------------------------------------------- +// HTML controls display HTML content, 2 side by side. +//----------------------------------------------------------------------------- +class HTMLDemo2: public DemoPage +{ + public: + HTMLDemo2(Panel *parent, const char *name); + ~HTMLDemo2(); + + private: + + HTML *m_pHTML1; + HTML *m_pHTML2; +}; + +//----------------------------------------------------------------------------- +// Purpose: Constructor +//----------------------------------------------------------------------------- +HTMLDemo2::HTMLDemo2(Panel *parent, const char *name) : DemoPage(parent, name) +{ + m_pHTML1 = new HTML(this, "AHTML1"); + m_pHTML2 = new HTML(this, "AHTML2"); + + // Position the window and make it nice and wide, but preserve the + // height to one line. + m_pHTML1->SetBounds(10, 10, 240, 300); + + m_pHTML2->SetBounds(20+250, 10, 240, 300); + + // now open a URL + m_pHTML1->OpenURL("http://www.valvesoftware.com", NULL); + m_pHTML2->OpenURL("http://www.valve-erc.com", NULL); + // the URL can be any valid URL accepted by Internet Explorer, use file:///c:/... for local filesystem files :) + + // this call causes the control to repaint itself every 1000msec or so, to allow animated gifs to work + // bdawson:TODO + //m_pHTML1->StartAnimate(1000); +} + + + +//----------------------------------------------------------------------------- +// Purpose: Destructor +//----------------------------------------------------------------------------- +HTMLDemo2::~HTMLDemo2() +{ +} + + +Panel* HTMLDemo2_Create(Panel *parent) +{ + return new HTMLDemo2(parent, "HTMLDemo2"); +} + + -- cgit v1.2.3