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 /mp/src/public/vgui_controls/Tooltip.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 'mp/src/public/vgui_controls/Tooltip.h')
| -rw-r--r-- | mp/src/public/vgui_controls/Tooltip.h | 152 |
1 files changed, 76 insertions, 76 deletions
diff --git a/mp/src/public/vgui_controls/Tooltip.h b/mp/src/public/vgui_controls/Tooltip.h index ec27fe76..2c7ec984 100644 --- a/mp/src/public/vgui_controls/Tooltip.h +++ b/mp/src/public/vgui_controls/Tooltip.h @@ -1,76 +1,76 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: Creates a Message box with a question in it and yes/no buttons
-//
-// $NoKeywords: $
-//=============================================================================//
-
-#ifndef TOOLTIP_H
-#define TOOLTIP_H
-
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include <vgui/VGUI.h>
-#include <vgui_controls/Controls.h>
-#include <utlvector.h>
-
-namespace vgui
-{
-
-//-----------------------------------------------------------------------------
-// Purpose: Tooltip for a panel - shows text when cursor hovers over a panel
-//-----------------------------------------------------------------------------
-class BaseTooltip
-{
-public:
- BaseTooltip(Panel *parent, const char *text = NULL);
-
- virtual void SetText(const char *text);
- virtual const char *GetText();
-
- virtual void ShowTooltip(Panel *currentPanel);
- virtual void HideTooltip();
-
- bool ShouldLayout( void );
- virtual void PerformLayout() { return; }
- virtual void PositionWindow( Panel *pTipPanel );
-
- void ResetDelay();
- void SetTooltipFormatToSingleLine();
- void SetTooltipFormatToMultiLine();
- void SetTooltipDelay(int tooltipDelayMilliseconds);
- int GetTooltipDelay();
- void SetEnabled( bool bState );
-
-private:
- Panel *m_pParent;
- virtual void ApplySchemeSettings(IScheme *pScheme) {};
-protected:
- CUtlVector<char> m_Text;
- int _delay; // delay that counts down
- int _tooltipDelay; // delay before tooltip comes up.
- bool _makeVisible : 1;
- bool _displayOnOneLine : 1;
- bool _isDirty : 1;
- bool _enabled : 1;
-};
-
-class TextTooltip : public BaseTooltip
-{
-public:
- TextTooltip(Panel *parent, const char *text = NULL);
- ~TextTooltip();
-
- virtual void SetText(const char *text);
- virtual void ShowTooltip(Panel *currentPanel);
- virtual void HideTooltip();
- virtual void SizeTextWindow();
- virtual void PerformLayout();
- virtual void ApplySchemeSettings(IScheme *pScheme);
-};
-
-};
-
-#endif // TOOLTIP_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Creates a Message box with a question in it and yes/no buttons +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef TOOLTIP_H +#define TOOLTIP_H + +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui/VGUI.h> +#include <vgui_controls/Controls.h> +#include <utlvector.h> + +namespace vgui +{ + +//----------------------------------------------------------------------------- +// Purpose: Tooltip for a panel - shows text when cursor hovers over a panel +//----------------------------------------------------------------------------- +class BaseTooltip +{ +public: + BaseTooltip(Panel *parent, const char *text = NULL); + + virtual void SetText(const char *text); + virtual const char *GetText(); + + virtual void ShowTooltip(Panel *currentPanel); + virtual void HideTooltip(); + + bool ShouldLayout( void ); + virtual void PerformLayout() { return; } + virtual void PositionWindow( Panel *pTipPanel ); + + void ResetDelay(); + void SetTooltipFormatToSingleLine(); + void SetTooltipFormatToMultiLine(); + void SetTooltipDelay(int tooltipDelayMilliseconds); + int GetTooltipDelay(); + void SetEnabled( bool bState ); + +private: + Panel *m_pParent; + virtual void ApplySchemeSettings(IScheme *pScheme) {}; +protected: + CUtlVector<char> m_Text; + int _delay; // delay that counts down + int _tooltipDelay; // delay before tooltip comes up. + bool _makeVisible : 1; + bool _displayOnOneLine : 1; + bool _isDirty : 1; + bool _enabled : 1; +}; + +class TextTooltip : public BaseTooltip +{ +public: + TextTooltip(Panel *parent, const char *text = NULL); + ~TextTooltip(); + + virtual void SetText(const char *text); + virtual void ShowTooltip(Panel *currentPanel); + virtual void HideTooltip(); + virtual void SizeTextWindow(); + virtual void PerformLayout(); + virtual void ApplySchemeSettings(IScheme *pScheme); +}; + +}; + +#endif // TOOLTIP_H |