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/ScrollBarSlider.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/ScrollBarSlider.h')
| -rw-r--r-- | mp/src/public/vgui_controls/ScrollBarSlider.h | 188 |
1 files changed, 94 insertions, 94 deletions
diff --git a/mp/src/public/vgui_controls/ScrollBarSlider.h b/mp/src/public/vgui_controls/ScrollBarSlider.h index 0acd3b7c..8769222f 100644 --- a/mp/src/public/vgui_controls/ScrollBarSlider.h +++ b/mp/src/public/vgui_controls/ScrollBarSlider.h @@ -1,94 +1,94 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//===========================================================================//
-
-#ifndef SCROLLBARSLIDER_H
-#define SCROLLBARSLIDER_H
-
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include <vgui/VGUI.h>
-#include <vgui_controls/Panel.h>
-
-namespace vgui
-{
-
-class IBorder;
-
-//-----------------------------------------------------------------------------
-// Purpose: ScrollBarSlider bar, as used in ScrollBar's
-//-----------------------------------------------------------------------------
-class ScrollBarSlider : public Panel
-{
- DECLARE_CLASS_SIMPLE( ScrollBarSlider, Panel );
-
-public:
- ScrollBarSlider(Panel *parent, const char *panelName, bool vertical);
-
- // Set the ScrollBarSlider value of the nob.
- virtual void SetValue(int value);
- virtual int GetValue();
-
- // Check whether the scroll bar is vertical or not
- virtual bool IsVertical();
-
- // Set max and min range of lines to display
- virtual void SetRange(int min, int max);
-
- virtual void GetRange(int &min, int &max);
-
- // Set number of rows that can be displayed in window
- virtual void SetRangeWindow(int rangeWindow);
-
- // Get number of rows that can be displayed in window
- virtual int GetRangeWindow();
-
- // Set the size of the ScrollBarSlider nob
- virtual void SetSize(int wide, int tall);
-
- // Get current ScrollBarSlider bounds
- virtual void GetNobPos(int &min, int &max);
-
- virtual bool HasFullRange();
- virtual void SetButtonOffset(int buttonOffset);
- virtual void OnCursorMoved(int x, int y);
- virtual void OnMousePressed(MouseCode code);
- virtual void OnMouseDoublePressed(MouseCode code);
- virtual void OnMouseReleased(MouseCode code);
-
- // Return true if this slider is actually drawing itself
- virtual bool IsSliderVisible( void );
-
- virtual void ApplySettings( KeyValues *pInResourceData );
-
-protected:
- virtual void Paint();
- virtual void PaintBackground();
- virtual void PerformLayout();
- virtual void ApplySchemeSettings(IScheme *pScheme);
-
-private:
- virtual void RecomputeNobPosFromValue();
- virtual void RecomputeValueFromNobPos();
- virtual void SendScrollBarSliderMovedMessage();
-
- bool _vertical;
- bool _dragging;
- int _nobPos[2];
- int _nobDragStartPos[2];
- int _dragStartPos[2];
- int _range[2];
- int _value; // the position of the ScrollBarSlider, in coordinates as specified by SetRange/SetRangeWindow
- int _rangeWindow;
- int _buttonOffset;
- IBorder *_ScrollBarSliderBorder;
-};
-
-} // namespace vgui
-
-#endif // SCROLLBARSLIDER_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//===========================================================================// + +#ifndef SCROLLBARSLIDER_H +#define SCROLLBARSLIDER_H + +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui/VGUI.h> +#include <vgui_controls/Panel.h> + +namespace vgui +{ + +class IBorder; + +//----------------------------------------------------------------------------- +// Purpose: ScrollBarSlider bar, as used in ScrollBar's +//----------------------------------------------------------------------------- +class ScrollBarSlider : public Panel +{ + DECLARE_CLASS_SIMPLE( ScrollBarSlider, Panel ); + +public: + ScrollBarSlider(Panel *parent, const char *panelName, bool vertical); + + // Set the ScrollBarSlider value of the nob. + virtual void SetValue(int value); + virtual int GetValue(); + + // Check whether the scroll bar is vertical or not + virtual bool IsVertical(); + + // Set max and min range of lines to display + virtual void SetRange(int min, int max); + + virtual void GetRange(int &min, int &max); + + // Set number of rows that can be displayed in window + virtual void SetRangeWindow(int rangeWindow); + + // Get number of rows that can be displayed in window + virtual int GetRangeWindow(); + + // Set the size of the ScrollBarSlider nob + virtual void SetSize(int wide, int tall); + + // Get current ScrollBarSlider bounds + virtual void GetNobPos(int &min, int &max); + + virtual bool HasFullRange(); + virtual void SetButtonOffset(int buttonOffset); + virtual void OnCursorMoved(int x, int y); + virtual void OnMousePressed(MouseCode code); + virtual void OnMouseDoublePressed(MouseCode code); + virtual void OnMouseReleased(MouseCode code); + + // Return true if this slider is actually drawing itself + virtual bool IsSliderVisible( void ); + + virtual void ApplySettings( KeyValues *pInResourceData ); + +protected: + virtual void Paint(); + virtual void PaintBackground(); + virtual void PerformLayout(); + virtual void ApplySchemeSettings(IScheme *pScheme); + +private: + virtual void RecomputeNobPosFromValue(); + virtual void RecomputeValueFromNobPos(); + virtual void SendScrollBarSliderMovedMessage(); + + bool _vertical; + bool _dragging; + int _nobPos[2]; + int _nobDragStartPos[2]; + int _dragStartPos[2]; + int _range[2]; + int _value; // the position of the ScrollBarSlider, in coordinates as specified by SetRange/SetRangeWindow + int _rangeWindow; + int _buttonOffset; + IBorder *_ScrollBarSliderBorder; +}; + +} // namespace vgui + +#endif // SCROLLBARSLIDER_H |