diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/panorama/controls/edgescroller.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'public/panorama/controls/edgescroller.h')
| -rw-r--r-- | public/panorama/controls/edgescroller.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/public/panorama/controls/edgescroller.h b/public/panorama/controls/edgescroller.h new file mode 100644 index 0000000..46b820f --- /dev/null +++ b/public/panorama/controls/edgescroller.h @@ -0,0 +1,63 @@ +//=========== Copyright Valve Corporation, All rights reserved. ===============// +// +// Purpose: +//=============================================================================// + +#ifndef EDGE_SCROLLER_H +#define EDGE_SCROLLER_H + +#ifdef _WIN32 +#pragma once +#endif + +#include "panorama/controls/panel2d.h" + +namespace panorama +{ + +class CEdgeScrollBar; +class CUIEdgeScrollBar; +class CButton; + +//----------------------------------------------------------------------------- +// Purpose: Control that shows buttons on the edges to scroll rather than a normal scroll bar +//----------------------------------------------------------------------------- +class CEdgeScroller : public CPanel2D +{ + DECLARE_PANEL2D( CEdgeScroller, CPanel2D ); + +public: + CEdgeScroller( CPanel2D *pParent, const char *pchID ); + virtual ~CEdgeScroller(); + + // Callback to client panel to create a scrollbar + virtual IUIScrollBar *CreateNewVerticalScrollBar( float flInitialScrollPos ) OVERRIDE; + virtual IUIScrollBar *CreateNewHorizontalScrollBar( float flInitialScrollPos ) OVERRIDE; +}; + + +//----------------------------------------------------------------------------- +// Purpose: Scrollbar that just shows buttons on the edges of the panel rather than an actual Scrollbar +//----------------------------------------------------------------------------- +class CEdgeScrollBar : public CBaseScrollBar +{ + DECLARE_PANEL2D( CEdgeScrollBar, CBaseScrollBar ); + +public: + CEdgeScrollBar( CPanel2D *pParent, const char *pchID, bool bHorizontal ); + virtual ~CEdgeScrollBar(); + +protected: + virtual void UpdateLayout( bool bImmediateMove ) OVERRIDE; + +private: + bool m_bHorizontal; + + CButton *m_pMinButton; + CButton *m_pMaxButton; +}; + + +} // namespace panorama + +#endif // EDGE_SCROLLER_H |