GME
13
|
00001 //################################################################################################ 00002 // 00003 // Annotator Decorator COM side Implementation 00004 // AnnotatorDecoratorImpl.h 00005 // 00006 //################################################################################################ 00007 00008 #ifndef __ANNOTATORDECORATORIMPL_H_ 00009 #define __ANNOTATORDECORATORIMPL_H_ 00010 00011 00012 00013 #include "StdAfx.h" 00014 #include "Gme.h" 00015 #include "resource.h" // main symbols 00016 #include "DecoratorInterface.h" 00017 00018 00019 class DecoratorInterface; 00020 00021 //################################################################################################ 00022 // 00023 // CLASS : CAnnotatorDecoratorImpl 00024 // 00025 //################################################################################################ 00026 00027 class ATL_NO_VTABLE CAnnotatorDecoratorImpl : 00028 public CComObjectRootEx<CComSingleThreadModel>, 00029 public IMgaElementDecorator, 00030 public CComCoClass<CAnnotatorDecoratorImpl, &CLSID_AnnotatorDecorator> 00031 { 00032 protected: 00033 DecoratorSDK::DecoratorInterface* m_pElementDecorator; 00034 bool m_bLocationSet; 00035 bool m_bInitCallFromEx; 00036 00037 BSTR m_bstrName; 00038 VARIANT m_vValue; 00039 00040 public: 00041 CAnnotatorDecoratorImpl(); 00042 ~CAnnotatorDecoratorImpl(); 00043 00044 DECLARE_REGISTRY_RESOURCEID( IDR_DECORATOR ) 00045 DECLARE_PROTECT_FINAL_CONSTRUCT() 00046 00047 BEGIN_COM_MAP( CAnnotatorDecoratorImpl ) 00048 COM_INTERFACE_ENTRY( IMgaElementDecorator ) 00049 COM_INTERFACE_ENTRY( IMgaDecoratorCommon ) 00050 COM_INTERFACE_ENTRY( IMgaDecorator ) 00051 END_COM_MAP() 00052 00053 public: 00054 // =============== inherited from IMgaDecorator 00055 STDMETHOD( Initialize ) ( /*[in]*/ IMgaProject* pProject, /*[in]*/ IMgaMetaPart* pPart, /*[in]*/ IMgaFCO* pFCO ); 00056 STDMETHOD( Destroy ) ( void ); 00057 STDMETHOD( GetMnemonic ) ( /*[out]*/ BSTR* bstrMnemonic ); 00058 STDMETHOD( GetFeatures ) ( /*[out]*/ feature_code* pFeatureCodes ); 00059 STDMETHOD( SetParam ) ( /*[in]*/ BSTR bstrName, /*[in]*/ VARIANT vValue ); 00060 STDMETHOD( GetParam ) ( /*[in]*/ BSTR bstrName, /*[out]*/ VARIANT* pvValue ); 00061 STDMETHOD( SetActive ) ( /*[in]*/ VARIANT_BOOL bIsActive ); 00062 STDMETHOD( GetPreferredSize ) ( /*[out]*/ LONG* plWidth, /*[out]*/ LONG* plHeight ); 00063 STDMETHOD( SetLocation ) ( /*[in]*/ LONG sx, /*[in]*/ LONG sy, /*[in]*/ LONG ex, /*[in]*/ LONG ey ); 00064 STDMETHOD( GetLocation ) ( /*[out]*/ LONG* sx, /*[out]*/ LONG* sy, /*[out]*/ LONG* ex, /*[out]*/ LONG* ey ); 00065 STDMETHOD( GetLabelLocation ) ( /*[out]*/ LONG* sx, /*[out]*/ LONG* sy, /*[out]*/ LONG* ex, /*[out]*/ LONG* ey ); 00066 STDMETHOD( GetPortLocation ) ( /*[in]*/ IMgaFCO* fco, /*[out]*/ LONG* sx, /*[out]*/ LONG* sy, /*[out]*/ LONG* ex, /*[out]*/ LONG* ey ); 00067 STDMETHOD( GetPorts ) ( /*[out, retval]*/ IMgaFCOs** portFCOs ); 00068 STDMETHOD( Draw ) ( /*[in]*/ ULONG hdc ); 00069 STDMETHOD( SaveState ) ( void ); 00070 00071 // =============== IMgaElementDecorator 00072 STDMETHOD( InitializeEx ) ( /*[in]*/ IMgaProject* pProject, /*[in]*/ IMgaMetaPart* pPart, /*[in]*/ IMgaFCO* pFCO, /*[in]*/ IMgaCommonDecoratorEvents* eventSink, /*[in]*/ ULONGLONG parentWnd ); 00073 STDMETHOD( DrawEx ) ( /*[in]*/ ULONG hdc, /*[in]*/ ULONGLONG gdipGraphics ); 00074 STDMETHOD( SetSelected ) ( /*[in]*/ VARIANT_BOOL bIsSelected ); 00075 STDMETHOD( MouseMoved ) ( /*[in]*/ ULONG nFlags, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00076 STDMETHOD( MouseLeftButtonDown ) ( /*[in]*/ ULONG nFlags, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00077 STDMETHOD( MouseLeftButtonUp ) ( /*[in]*/ ULONG nFlags, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00078 STDMETHOD( MouseLeftButtonDoubleClick ) ( /*[in]*/ ULONG nFlags, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00079 STDMETHOD( MouseRightButtonDown ) ( /*[in]*/ ULONGLONG hCtxMenu, /*[in]*/ ULONG nFlags, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00080 STDMETHOD( MouseRightButtonUp ) ( /*[in]*/ ULONG nFlags, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00081 STDMETHOD( MouseRightButtonDoubleClick ) ( /*[in]*/ ULONG nFlags, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00082 STDMETHOD( MouseMiddleButtonDown ) ( /*[in]*/ ULONG nFlags, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00083 STDMETHOD( MouseMiddleButtonUp ) ( /*[in]*/ ULONG nFlags, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00084 STDMETHOD( MouseMiddleButtonDoubleClick ) ( /*[in]*/ ULONG nFlags, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00085 STDMETHOD( MouseWheelTurned ) ( /*[in]*/ ULONG nFlags, /*[in]*/ LONG distance, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00086 STDMETHOD( DragEnter ) ( /*[out]*/ ULONG* dropEffect, /*[in]*/ ULONGLONG pCOleDataObject, /*[in]*/ ULONG keyState, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00087 STDMETHOD( DragOver ) ( /*[out]*/ ULONG* dropEffect, /*[in]*/ ULONGLONG pCOleDataObject, /*[in]*/ ULONG keyState, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00088 STDMETHOD( Drop ) ( /*[in]*/ ULONGLONG pCOleDataObject, /*[in]*/ ULONG dropEffect, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00089 STDMETHOD( DropFile ) ( /*[in]*/ ULONGLONG hDropInfo, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00090 STDMETHOD( MenuItemSelected ) ( /*[in]*/ ULONG menuItemId, /*[in]*/ ULONG nFlags, /*[in]*/ LONG pointx, /*[in]*/ LONG pointy, /*[in]*/ ULONGLONG transformHDC ); 00091 STDMETHOD( OperationCanceled ) ( void ); 00092 }; 00093 00094 #endif //__ANNOTATORDECORATORIMPL_H_