From 024306ccab5f6d51f3fce269fb1984fd02f3bb02 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Tue, 11 Jul 2023 17:52:00 +0100 Subject: add Floor, add DefaultToolPalette --- .../DefaultToolPalette/ToolPaletteItem.h | 49 +++++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) (limited to 'src/Plugins/ToolPalette/DefaultToolPalette/ToolPaletteItem.h') diff --git a/src/Plugins/ToolPalette/DefaultToolPalette/ToolPaletteItem.h b/src/Plugins/ToolPalette/DefaultToolPalette/ToolPaletteItem.h index bee9108..b119b17 100644 --- a/src/Plugins/ToolPalette/DefaultToolPalette/ToolPaletteItem.h +++ b/src/Plugins/ToolPalette/DefaultToolPalette/ToolPaletteItem.h @@ -1,5 +1,50 @@ #pragma once -#include "common.h" +#include "../../../common.h" -class ToolPaletteItem { +enum { + kTPIMode0 = 0, + kTPIMode1 = 1, + kTPIMode2 = 2 +}; + +class AFX_CLASS_EXPORT ToolPaletteItem : public CWnd { +protected: + ToolPaletteItem(); +public: + ToolPaletteItem(T2TowerDoc *inDoc, int inMode); + virtual ~ToolPaletteItem(); + + virtual void SetIcon(T2ToolIconItem *inItem); + virtual void SetText(const char *inText); + virtual void SetScrollRange(int inRange); + virtual void SetScrollPos(int inPos); + virtual void SetStatus(int inStatus); + virtual int GetOption(); + virtual void SetOption(int inOption); + virtual int GetScrollPos(); + virtual int GetMode(); + virtual T2ToolIconItem *GetIcon(); + + int mMode; + T2TowerDoc *mDocument; + CPalette *mPalette; + T2ToolIconItem *mIcon; + int mStatus; + int mOption; + int mScrollPos; + int mScrollRange; + + //{{AFX_VIRTUAL(ToolPaletteItem) + //}}AFX_VIRTUAL + +protected: + void SetScrollStatus(BOOL inLeftPressed, BOOL inRightPressed); + + //{{AFX_MSG(ToolPaletteItem) + afx_msg BOOL OnEraseBkgnd(CDC *pDC); + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() }; -- cgit v1.2.3