GME
13
|
00001 //################################################################################################ 00002 // 00003 // Annotator Event Sink implementation 00004 // AnnotatorEventSink.h 00005 // 00006 //################################################################################################ 00007 00008 #if !defined(AFX_ANNOTATOREVENTSINK_H__2709B864_A353_4C26_9AF8_40948D2CBC1A__INCLUDED_) 00009 #define AFX_ANNOTATOREVENTSINK_H__2709B864_A353_4C26_9AF8_40948D2CBC1A__INCLUDED_ 00010 00011 #if _MSC_VER > 1000 00012 #pragma once 00013 #endif // _MSC_VER > 1000 00014 00015 #include "StdAfx.h" 00016 #include "mga.h" 00017 #include "GmeLib.h" 00018 #include "resource.h" 00019 00020 00021 class CGMEView; 00022 class CGuiAnnotator; 00023 00024 //################################################################################################ 00025 // 00026 // CLASS : CAnnotatorEventSink 00027 // 00028 //################################################################################################ 00029 00030 class ATL_NO_VTABLE CAnnotatorEventSink : 00031 public CComObjectRootEx<CComSingleThreadModel>, 00032 public CComCoClass<CAnnotatorEventSink, &__uuidof(AnnotatorEventSink)>, 00033 public ISupportErrorInfoImpl<&__uuidof(IMgaElementDecoratorEvents)>, 00034 public IMgaElementDecoratorEvents 00035 { 00036 protected: 00037 CAnnotatorEventSink(); // protected constructor used by dynamic creation 00038 00039 public: 00040 DECLARE_REGISTRY_RESOURCEID(IDR_ANNOTATOREVENTSINK) 00041 DECLARE_NOT_AGGREGATABLE(CAnnotatorEventSink) 00042 00043 BEGIN_COM_MAP(CAnnotatorEventSink) 00044 COM_INTERFACE_ENTRY(IMgaElementDecoratorEvents) 00045 COM_INTERFACE_ENTRY(ISupportErrorInfo) 00046 END_COM_MAP() 00047 00048 // Attributes 00049 public: 00050 00051 // Operations 00052 public: 00053 void SetView(CGMEView* view); 00054 void SetGuiAnnotator(CGuiAnnotator* guiAnnotator); 00055 00056 // Overrides 00057 public: 00058 // Implementation 00059 00060 public: 00061 ~CAnnotatorEventSink(); 00062 00063 protected: 00064 CGMEView* m_view; 00065 CGuiAnnotator* m_guiAnnotator; 00066 void* m_operationData; 00067 00068 public: 00069 STDMETHOD( Refresh ) ( /*[in]*/ refresh_mode_enum refreshMode ); 00070 STDMETHOD( OperationCanceled ) ( void ); 00071 STDMETHOD( CursorChanged ) ( /*[in]*/ LONG newCursorID ); 00072 STDMETHOD( CursorRestored ) ( void ); 00073 00074 STDMETHOD( LabelEditingStarted ) ( /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00075 STDMETHOD( LabelEditingFinished ) ( /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00076 STDMETHOD( LabelChanged ) ( /*[in]*/ BSTR newLabel ); 00077 STDMETHOD( LabelMovingStarted ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00078 STDMETHOD( LabelMoving ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00079 STDMETHOD( LabelMovingFinished ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00080 STDMETHOD( LabelMoved ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG x, /*[in]*/ LONG y ); 00081 STDMETHOD( LabelResizingStarted ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00082 STDMETHOD( LabelResizing ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00083 STDMETHOD( LabelResizingFinished ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00084 STDMETHOD( LabelResized ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG cx, /*[in]*/ LONG cy ); 00085 00086 STDMETHOD( GeneralOperationStarted ) ( /*[in]*/ ULONGLONG operationData ); 00087 STDMETHOD( GeneralOperationFinished ) ( /*[out]*/ ULONGLONG* operationData ); 00088 00089 STDMETHOD( WindowMovingStarted ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00090 STDMETHOD( WindowMoving ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00091 STDMETHOD( WindowMovingFinished ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00092 STDMETHOD( WindowMoved ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG x, /*[in]*/ LONG y ); 00093 00094 STDMETHOD( WindowResizingStarted ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00095 STDMETHOD( WindowResizing ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00096 STDMETHOD( WindowResizingFinished ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG left, /*[in]*/ LONG top, /*[in]*/ LONG right, /*[in]*/ LONG bottom ); 00097 STDMETHOD( WindowResized ) ( /*[in]*/ LONG nFlags, /*[in]*/ LONG cx, /*[in]*/ LONG cy ); 00098 }; 00099 00100 OBJECT_ENTRY_AUTO(__uuidof(AnnotatorEventSink), CAnnotatorEventSink) 00101 00102 00103 00104 //{{AFX_INSERT_LOCATION}} 00105 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 00106 00107 #endif // !defined(AFX_ANNOTATOREVENTSINK_H__2709B864_A353_4C26_9AF8_40948D2CBC1A__INCLUDED_)