blob: 46b820f6869be1fd88b6988b811d579110a9e384 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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
|