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/public/vgui_controls/ImagePanel.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/public/vgui_controls/ImagePanel.h')
| -rw-r--r-- | sp/src/public/vgui_controls/ImagePanel.h | 182 |
1 files changed, 91 insertions, 91 deletions
diff --git a/sp/src/public/vgui_controls/ImagePanel.h b/sp/src/public/vgui_controls/ImagePanel.h index 9540d5bc..730cf38c 100644 --- a/sp/src/public/vgui_controls/ImagePanel.h +++ b/sp/src/public/vgui_controls/ImagePanel.h @@ -1,91 +1,91 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//=============================================================================//
-
-#ifndef IMAGEPANEL_H
-#define IMAGEPANEL_H
-
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include <vgui/VGUI.h>
-#include <vgui_controls/Panel.h>
-
-namespace vgui
-{
-
-class IImage;
-
-//-----------------------------------------------------------------------------
-// Purpose: Panel that holds a single image
-//-----------------------------------------------------------------------------
-class ImagePanel : public Panel
-{
- DECLARE_CLASS_SIMPLE( ImagePanel, Panel );
-public:
- ImagePanel(Panel *parent, const char *name);
- ~ImagePanel();
-
- virtual void SetImage(IImage *image);
- virtual void SetImage(const char *imageName);
- virtual IImage *GetImage();
- char *GetImageName();
-
- void SetShouldCenterImage( bool state ) { m_bCenterImage = state; }
- bool GetShouldCenterImage() const { return m_bCenterImage; }
-
- // sets whether or not the image should scale to fit the size of the ImagePanel (defaults to false)
- void SetShouldScaleImage( bool state );
- bool GetShouldScaleImage();
- void SetScaleAmount( float scale );
- float GetScaleAmount( void );
-
- void SetTileImage( bool bTile ) { m_bTileImage = bTile; }
-
- // set the color to fill with, if no image is specified
- void SetFillColor( Color col );
- Color GetFillColor();
-
- virtual Color GetDrawColor( void );
- virtual void SetDrawColor( Color drawColor );
-
- virtual void ApplySettings(KeyValues *inResourceData);
-
- // unhooks and evicts image if possible, caller must re-establish
- bool EvictImage();
-
- int GetNumFrames();
- void SetFrame( int nFrame );
-
- void SetRotation( int iRotation ) { m_iRotation = iRotation; }
-
-protected:
- virtual void PaintBackground();
- virtual void GetSettings(KeyValues *outResourceData);
- virtual const char *GetDescription();
- virtual void OnSizeChanged(int newWide, int newTall);
- virtual void ApplySchemeSettings( IScheme *pScheme );
-
-private:
- IImage *m_pImage;
- char *m_pszImageName;
- char *m_pszFillColorName;
- char *m_pszDrawColorName;
- bool m_bCenterImage;
- bool m_bScaleImage;
- bool m_bTileImage;
- bool m_bTileHorizontally;
- bool m_bTileVertically;
- float m_fScaleAmount;
- Color m_FillColor;
- Color m_DrawColor;
- int m_iRotation;
-};
-
-} // namespace vgui
-
-#endif // IMAGEPANEL_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef IMAGEPANEL_H +#define IMAGEPANEL_H + +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui/VGUI.h> +#include <vgui_controls/Panel.h> + +namespace vgui +{ + +class IImage; + +//----------------------------------------------------------------------------- +// Purpose: Panel that holds a single image +//----------------------------------------------------------------------------- +class ImagePanel : public Panel +{ + DECLARE_CLASS_SIMPLE( ImagePanel, Panel ); +public: + ImagePanel(Panel *parent, const char *name); + ~ImagePanel(); + + virtual void SetImage(IImage *image); + virtual void SetImage(const char *imageName); + virtual IImage *GetImage(); + char *GetImageName(); + + void SetShouldCenterImage( bool state ) { m_bCenterImage = state; } + bool GetShouldCenterImage() const { return m_bCenterImage; } + + // sets whether or not the image should scale to fit the size of the ImagePanel (defaults to false) + void SetShouldScaleImage( bool state ); + bool GetShouldScaleImage(); + void SetScaleAmount( float scale ); + float GetScaleAmount( void ); + + void SetTileImage( bool bTile ) { m_bTileImage = bTile; } + + // set the color to fill with, if no image is specified + void SetFillColor( Color col ); + Color GetFillColor(); + + virtual Color GetDrawColor( void ); + virtual void SetDrawColor( Color drawColor ); + + virtual void ApplySettings(KeyValues *inResourceData); + + // unhooks and evicts image if possible, caller must re-establish + bool EvictImage(); + + int GetNumFrames(); + void SetFrame( int nFrame ); + + void SetRotation( int iRotation ) { m_iRotation = iRotation; } + +protected: + virtual void PaintBackground(); + virtual void GetSettings(KeyValues *outResourceData); + virtual const char *GetDescription(); + virtual void OnSizeChanged(int newWide, int newTall); + virtual void ApplySchemeSettings( IScheme *pScheme ); + +private: + IImage *m_pImage; + char *m_pszImageName; + char *m_pszFillColorName; + char *m_pszDrawColorName; + bool m_bCenterImage; + bool m_bScaleImage; + bool m_bTileImage; + bool m_bTileHorizontally; + bool m_bTileVertically; + float m_fScaleAmount; + Color m_FillColor; + Color m_DrawColor; + int m_iRotation; +}; + +} // namespace vgui + +#endif // IMAGEPANEL_H |