GME
13
|
00001 //################################################################################################ 00002 // 00003 // Annotator decorator class 00004 // AnnotatorDecorator.h 00005 // 00006 //################################################################################################ 00007 00008 #ifndef __ANNOTATORDECORATOR_H_ 00009 #define __ANNOTATORDECORATOR_H_ 00010 00011 00012 #include "StdAfx.h" 00013 #include "DecoratorInterface.h" 00014 #include "PartInterface.h" 00015 00016 00017 namespace AnnotatorDecor { 00018 00019 //################################################################################################ 00020 // 00021 // CLASS : AnnotatorDecorator 00022 // 00023 //################################################################################################ 00024 00025 class AnnotatorDecorator: public DecoratorSDK::DecoratorInterface 00026 { 00027 protected: 00028 DecoratorSDK::PartInterface* m_part; 00029 CComPtr<IMgaCommonDecoratorEvents> m_eventSink; 00030 00031 CString m_strName; 00032 VARIANT m_vValue; 00033 00034 public: 00035 AnnotatorDecorator(CComPtr<IMgaCommonDecoratorEvents>& eventSink); 00036 virtual ~AnnotatorDecorator(); 00037 00038 // =============== resembles IMgaElementDecorator 00039 public: 00040 virtual void Initialize (CComPtr<IMgaProject>& pProject, CComPtr<IMgaMetaPart>& pPart, 00041 CComPtr<IMgaFCO>& pFCO); 00042 virtual void Destroy (void); 00043 virtual CString GetMnemonic (void) const; 00044 virtual feature_code GetFeatures (void) const; 00045 virtual void SetParam (const CString& strName, VARIANT vValue); 00046 virtual void GetParam (const CString& strName, VARIANT* pvValue); 00047 virtual void SetActive (bool bIsActive); 00048 virtual CSize GetPreferredSize (void) const; 00049 virtual void SetLocation (const CRect& location); 00050 virtual CRect GetLocation (void) const; 00051 virtual CRect GetLabelLocation (void) const; 00052 virtual CRect GetPortLocation (CComPtr<IMgaFCO>& fco) const; 00053 virtual void GetPorts (CComPtr<IMgaFCOs>& portFCOs) const; 00054 virtual void Draw (CDC* pDC, Gdiplus::Graphics* gdip); 00055 virtual void SaveState (void); 00056 00057 virtual void InitializeEx (CComPtr<IMgaProject>& pProject, CComPtr<IMgaMetaPart>& pPart, 00058 CComPtr<IMgaFCO>& pFCO, HWND parentWnd); 00059 virtual void SetSelected (bool bIsSelected); 00060 virtual bool MouseMoved (UINT nFlags, const CPoint& point, HDC transformHDC); 00061 virtual bool MouseLeftButtonDown (UINT nFlags, const CPoint& point, HDC transformHDC); 00062 virtual bool MouseLeftButtonUp (UINT nFlags, const CPoint& point, HDC transformHDC); 00063 virtual bool MouseLeftButtonDoubleClick (UINT nFlags, const CPoint& point, HDC transformHDC); 00064 virtual bool MouseRightButtonDown (HMENU hCtxMenu, UINT nFlags, const CPoint& point, HDC transformHDC); 00065 virtual bool MouseRightButtonUp (UINT nFlags, const CPoint& point, HDC transformHDC); 00066 virtual bool MouseRightButtonDoubleClick (UINT nFlags, const CPoint& point, HDC transformHDC); 00067 virtual bool MouseMiddleButtonDown (UINT nFlags, const CPoint& point, HDC transformHDC); 00068 virtual bool MouseMiddleButtonUp (UINT nFlags, const CPoint& point, HDC transformHDC); 00069 virtual bool MouseMiddleButtonDoubleClick(UINT nFlags, const CPoint& point, HDC transformHDC); 00070 virtual bool MouseWheelTurned (UINT nFlags, short distance, const CPoint& point, HDC transformHDC); 00071 virtual bool DragEnter (DROPEFFECT* dropEffect, COleDataObject* pDataObject, DWORD dwKeyState, const CPoint& point, HDC transformHDC); 00072 virtual bool DragOver (DROPEFFECT* dropEffect, COleDataObject* pDataObject, DWORD dwKeyState, const CPoint& point, HDC transformHDC); 00073 virtual bool Drop (COleDataObject* pDataObject, DROPEFFECT dropEffect, const CPoint& point, HDC transformHDC); 00074 virtual bool DropFile (HDROP p_hDropInfo, const CPoint& point, HDC transformHDC); 00075 virtual bool MenuItemSelected (UINT menuItemId, UINT nFlags, const CPoint& point, HDC transformHDC); 00076 virtual bool OperationCanceledByGME (void); 00077 }; 00078 00079 }; // namespace AnnotatorDecor 00080 00081 #endif //__ANNOTATORDECORATOR_H_