diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-07-11 17:52:00 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-07-11 17:52:00 +0100 |
commit | 024306ccab5f6d51f3fce269fb1984fd02f3bb02 (patch) | |
tree | 8d359495d72bf4e7295c7eab4cb220edc2d4b60c /src/Plugins/ToolPalette/DefaultToolPalette/ToolPaletteItem.h | |
parent | 0f3cba6fcea0ffd511dfe3275d57a5b9e69be5be (diff) | |
download | t2win-024306ccab5f6d51f3fce269fb1984fd02f3bb02.tar.gz t2win-024306ccab5f6d51f3fce269fb1984fd02f3bb02.zip |
add Floor, add DefaultToolPalettemain
Diffstat (limited to 'src/Plugins/ToolPalette/DefaultToolPalette/ToolPaletteItem.h')
-rw-r--r-- | src/Plugins/ToolPalette/DefaultToolPalette/ToolPaletteItem.h | 49 |
1 files changed, 47 insertions, 2 deletions
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() }; |