From a4c804b49ec872b71bd5a0167c3ad45704a3cc30 Mon Sep 17 00:00:00 2001 From: adiblol Date: Thu, 8 Mar 2012 19:32:05 +0100 Subject: Initial commit, Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch --- src/scroll.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 src/scroll.h (limited to 'src/scroll.h') diff --git a/src/scroll.h b/src/scroll.h new file mode 100644 index 0000000..f8cbc7b --- /dev/null +++ b/src/scroll.h @@ -0,0 +1,67 @@ +// scroll.h + +#ifndef _SCROLL_H_ +#define _SCROLL_H_ + + +#include "control.h" + + +class CD3DEngine; +class CButton; + + +#define SCROLL_WIDTH (15.0f/640.0f) + + + +class CScroll : public CControl +{ +public: + CScroll(CInstanceManager* iMan); + ~CScroll(); + + BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); + + void SetPos(FPOINT pos); + void SetDim(FPOINT dim); + + BOOL SetState(int state, BOOL bState); + BOOL SetState(int state); + BOOL ClearState(int state); + + BOOL EventProcess(const Event &event); + void Draw(); + + void SetVisibleValue(float value); + float RetVisibleValue(); + + void SetVisibleRatio(float value); + float RetVisibleRatio(); + + void SetArrowStep(float step); + float RetArrowStep(); + +protected: + void MoveAdjust(); + void AdjustGlint(); + void DrawVertex(FPOINT pos, FPOINT dim, int icon); + +protected: + CButton* m_buttonUp; + CButton* m_buttonDown; + + float m_visibleValue; + float m_visibleRatio; + float m_step; + + BOOL m_bCapture; + FPOINT m_pressPos; + float m_pressValue; + + EventMsg m_eventUp; + EventMsg m_eventDown; +}; + + +#endif //_SCROLL_H_ -- cgit v1.2.3-1-g7c22