diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /sp/src/game/client/game_controls/vguitextwindow.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/game/client/game_controls/vguitextwindow.h')
| -rw-r--r-- | sp/src/game/client/game_controls/vguitextwindow.h | 208 |
1 files changed, 104 insertions, 104 deletions
diff --git a/sp/src/game/client/game_controls/vguitextwindow.h b/sp/src/game/client/game_controls/vguitextwindow.h index 213b241e..4557c7bf 100644 --- a/sp/src/game/client/game_controls/vguitextwindow.h +++ b/sp/src/game/client/game_controls/vguitextwindow.h @@ -1,104 +1,104 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//=============================================================================//
-
-#ifndef VGUITEXTWINDOW_H
-#define VGUITEXTWINDOW_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include <vgui_controls/Frame.h>
-#include <vgui_controls/Button.h>
-#include <vgui_controls/HTML.h>
-
-#include <game/client/iviewport.h>
-#include "shareddefs.h"
-
-namespace vgui
-{
- class TextEntry;
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: displays the MOTD
-//-----------------------------------------------------------------------------
-
-class CTextWindow : public vgui::Frame, public IViewPortPanel
-{
-private:
- DECLARE_CLASS_SIMPLE( CTextWindow, vgui::Frame );
-
-public:
- CTextWindow(IViewPort *pViewPort);
- virtual ~CTextWindow();
-
- virtual const char *GetName( void ) { return PANEL_INFO; }
- virtual void SetData(KeyValues *data);
- virtual void Reset();
- virtual void Update();
- virtual bool NeedsUpdate( void ) { return false; }
- virtual bool HasInputElements( void ) { return true; }
- virtual void ShowPanel( bool bShow );
-
- // both vgui::Frame and IViewPortPanel define these, so explicitly define them here as passthroughs to vgui
- vgui::VPANEL GetVPanel( void ) { return BaseClass::GetVPanel(); }
- virtual bool IsVisible() { return BaseClass::IsVisible(); }
- virtual void SetParent( vgui::VPANEL parent ) { BaseClass::SetParent( parent ); }
-
-public:
-
- virtual void SetData( int type, const char *title, const char *message, const char *message_fallback, int command, bool bUnload );
- virtual void ShowFile( const char *filename );
- virtual void ShowText( const char *text );
- virtual void ShowURL( const char *URL, bool bAllowUserToDisable = true );
- virtual void ShowIndex( const char *entry );
-
- virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
-
-protected:
- // vgui overrides
- virtual void OnCommand( const char *command );
-
- void OnKeyCodePressed( vgui::KeyCode code );
-
- IViewPort *m_pViewPort;
- char m_szTitle[255];
- char m_szMessage[2048];
- char m_szMessageFallback[2048];
- //=============================================================================
- // HPE_BEGIN:
- // [Forrest] Replaced text window command string with TEXTWINDOW_CMD enumeration
- // of options. Passing a command string is dangerous and allowed a server network
- // message to run arbitrary commands on the client.
- //=============================================================================
- int m_nExitCommand;
- //=============================================================================
- // HPE_END
- //=============================================================================
- int m_nContentType;
- bool m_bShownURL;
- bool m_bUnloadOnDismissal;
-
- vgui::TextEntry *m_pTextMessage;
-
- class CMOTDHTML : public vgui::HTML
- {
- private:
- DECLARE_CLASS_SIMPLE( CMOTDHTML, vgui::HTML );
-
- public:
- CMOTDHTML( Panel *parent, const char *pchName ) : vgui::HTML( parent, pchName ) {}
- virtual bool OnStartRequest( const char *url, const char *target, const char *pchPostData, bool bIsRedirect ) OVERRIDE;
- };
- CMOTDHTML *m_pHTMLMessage;
-
- vgui::Button *m_pOK;
- vgui::Label *m_pTitleLabel;
-};
-
-
-#endif // VGUITEXTWINDOW_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef VGUITEXTWINDOW_H +#define VGUITEXTWINDOW_H +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui_controls/Frame.h> +#include <vgui_controls/Button.h> +#include <vgui_controls/HTML.h> + +#include <game/client/iviewport.h> +#include "shareddefs.h" + +namespace vgui +{ + class TextEntry; +} + +//----------------------------------------------------------------------------- +// Purpose: displays the MOTD +//----------------------------------------------------------------------------- + +class CTextWindow : public vgui::Frame, public IViewPortPanel +{ +private: + DECLARE_CLASS_SIMPLE( CTextWindow, vgui::Frame ); + +public: + CTextWindow(IViewPort *pViewPort); + virtual ~CTextWindow(); + + virtual const char *GetName( void ) { return PANEL_INFO; } + virtual void SetData(KeyValues *data); + virtual void Reset(); + virtual void Update(); + virtual bool NeedsUpdate( void ) { return false; } + virtual bool HasInputElements( void ) { return true; } + virtual void ShowPanel( bool bShow ); + + // both vgui::Frame and IViewPortPanel define these, so explicitly define them here as passthroughs to vgui + vgui::VPANEL GetVPanel( void ) { return BaseClass::GetVPanel(); } + virtual bool IsVisible() { return BaseClass::IsVisible(); } + virtual void SetParent( vgui::VPANEL parent ) { BaseClass::SetParent( parent ); } + +public: + + virtual void SetData( int type, const char *title, const char *message, const char *message_fallback, int command, bool bUnload ); + virtual void ShowFile( const char *filename ); + virtual void ShowText( const char *text ); + virtual void ShowURL( const char *URL, bool bAllowUserToDisable = true ); + virtual void ShowIndex( const char *entry ); + + virtual void ApplySchemeSettings( vgui::IScheme *pScheme ); + +protected: + // vgui overrides + virtual void OnCommand( const char *command ); + + void OnKeyCodePressed( vgui::KeyCode code ); + + IViewPort *m_pViewPort; + char m_szTitle[255]; + char m_szMessage[2048]; + char m_szMessageFallback[2048]; + //============================================================================= + // HPE_BEGIN: + // [Forrest] Replaced text window command string with TEXTWINDOW_CMD enumeration + // of options. Passing a command string is dangerous and allowed a server network + // message to run arbitrary commands on the client. + //============================================================================= + int m_nExitCommand; + //============================================================================= + // HPE_END + //============================================================================= + int m_nContentType; + bool m_bShownURL; + bool m_bUnloadOnDismissal; + + vgui::TextEntry *m_pTextMessage; + + class CMOTDHTML : public vgui::HTML + { + private: + DECLARE_CLASS_SIMPLE( CMOTDHTML, vgui::HTML ); + + public: + CMOTDHTML( Panel *parent, const char *pchName ) : vgui::HTML( parent, pchName ) {} + virtual bool OnStartRequest( const char *url, const char *target, const char *pchPostData, bool bIsRedirect ) OVERRIDE; + }; + CMOTDHTML *m_pHTMLMessage; + + vgui::Button *m_pOK; + vgui::Label *m_pTitleLabel; +}; + + +#endif // VGUITEXTWINDOW_H |