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