summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2DlgItemScr.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2DlgItemScr.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/T2DLL/T2DlgItemScr.h b/src/T2DLL/T2DlgItemScr.h
new file mode 100644
index 0000000..55698bb
--- /dev/null
+++ b/src/T2DLL/T2DlgItemScr.h
@@ -0,0 +1,45 @@
+#pragma once
+#include "common.h"
+#include "T2DlgItem.h"
+
+class DLL_EXPORT T2DlgItemScr : public T2DlgItem {
+public:
+ T2DlgItemScr(T2TowerDoc* towerDoc, T2ImageObj* imageObj, CPalette* palette);
+ virtual void SetValue(int);
+
+ virtual void SetPage(int);
+ virtual void SetRange(int);
+
+ enum {
+ Area_Up = 1,
+ Area_PageUp = 2,
+ Area_SetAbsolute = 3,
+ Area_PageDown = 4,
+ Area_Down = 5
+ };
+
+protected:
+ virtual void OnT2DlgItemLButtonDown(UINT nFlags, CPoint pt);
+ virtual void OnT2DlgItemLButtonUp(UINT nFlags, CPoint pt);
+ virtual void OnT2DlgItemMouseMove(UINT nFlags, CPoint pt);
+ virtual void OnT2Timer(UINT id);
+
+ virtual int ScrollBarHittest(CPoint) const = 0;
+ virtual void GetUpButtonRect(const CRect&, CRect&) const = 0;
+ virtual void GetDnButtonRect(const CRect&, CRect&) const = 0;
+ virtual int PositionToValue(const CPoint&) const = 0;
+ virtual int PositionToValue(const CRect&) const = 0;
+
+ void CalcScrollBarThumb(int*, int*) const;
+ void ScrollBarAction(int, int);
+ BOOL IsScrollable() const;
+
+ int mUpImage;
+ int mDownImage;
+ int mRange;
+ int mPage;
+ CPoint mMouseDownPoint;
+ int mMouseDownValue;
+ int mClickedArea;
+ UINT mTimerID;
+};