From 37e364b2c6cc7487a1c888d256a73e5337bb7189 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 14 Jun 2023 00:50:34 +0100 Subject: initial commit --- src/T2DLL/T2ToolWindow.h | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src/T2DLL/T2ToolWindow.h (limited to 'src/T2DLL/T2ToolWindow.h') diff --git a/src/T2DLL/T2ToolWindow.h b/src/T2DLL/T2ToolWindow.h new file mode 100644 index 0000000..85c9bc8 --- /dev/null +++ b/src/T2DLL/T2ToolWindow.h @@ -0,0 +1,92 @@ +#pragma once +#include "common.h" + +class T2ToolWindow { +public: + static CObject* __stdcall CreateObject(); +protected: + static CRuntimeClass* __stdcall _GetBaseClass(); +public: + virtual CRuntimeClass* GetRuntimeClass() const; + T2ToolWindow(); + virtual ~T2ToolWindow(); + virtual void SetDocument(T2TowerDoc*); +protected: + static const AFX_MSGMAP* __stdcall _GetBaseMessageMap(); + virtual const AFX_MSGMAP* GetMessageMap() const; + int OnQueryNewPalette(); + int OnCreate(CREATESTRUCTA*); +public: + virtual int GetSel(); + virtual void SetSel(int); + virtual CString* GetIconName(int); + virtual T2TemplatePlugin* GetIconPlugin(int); + virtual unsigned long GetIconOption(int); + virtual unsigned int GetIconValiation(int); + virtual void AddIcon(const char*, char*, unsigned int, unsigned long, T2ToolDef*, int, unsigned short, T2ToolCallback*); + virtual void AddIcon(const char*, unsigned short, char*, T2ToolCallback*); + virtual void RemoveIcon(const char*, unsigned int); + virtual void RemoveAll(); + virtual int GetID(const char*, unsigned int); + virtual T2ToolIconItem* GetItem(const char*, unsigned int); + virtual T2ToolIconItem* GetItem(int); + virtual void Refresh(); +protected: + virtual int RefreshItem(T2ToolIconItem*); + virtual T2TemplatePlugin* SearchPlugin(T2TemplatePluginList*, CString&); + virtual POSITION SearchID(int); + virtual int AssignNewID(); + virtual void RemoveItem(POSITION); + virtual void SelChange(int); +public: + virtual int EnableIcon(const char*, unsigned int, int); + virtual void EnableIcon(int); + virtual T2ToolIconItem* EnableIcon(unsigned short); +protected: + virtual void RedrawButton(); + virtual void Updated(); + virtual void ListUpdated(); +public: + void StartTimer(unsigned int); + void StopTimer(); +protected: + int OnEraseBkgnd(CDC*); + void OnLButtonDown(unsigned int, CPoint); + void OnLButtonUp(unsigned int, CPoint); + void OnMouseMove(unsigned int, CPoint); + void OnLButtonDblClk(unsigned int, CPoint); + void OnTimer(unsigned int); + void OnSize(unsigned int, int, int); + void OnDestroy(); +public: + virtual int OnCreateProc(CREATESTRUCTA*); + virtual int OnEraseBkgndProc(CDC*); + virtual void OnLButtonDownProc(unsigned int, CPoint); + virtual void OnLButtonUpProc(unsigned int, CPoint); + virtual void OnMouseMoveProc(unsigned int, CPoint); + virtual void OnLButtonDblClkProc(unsigned int, CPoint); + virtual void OnTimerProc(unsigned int); + virtual void OnSizeProc(unsigned int, int, int); +protected: + void OnClose(); + virtual int OnNotify(unsigned int, long, long*); +public: + static const CRuntimeClass classT2ToolWindow; +protected: + static const AFX_MSGMAP messageMap; +private: + static const AFX_MSGMAP_ENTRY* const _messageEntries; +}; +class T2ToolIconItem { +public: + T2ToolIconItem(); + virtual ~T2ToolIconItem(); + + T2ToolIconItem(const T2ToolIconItem&) {} + T2ToolIconItem& operator=(const T2ToolIconItem&) {} +}; +class T2ToolIconList { +public: + T2ToolIconList(); + virtual ~T2ToolIconList(); +}; -- cgit v1.2.3