/*************************************************************************** * E-Com Technology Ltd. * * ECOMPACS DICOM Utility Libraries ***************************************************************************/ #ifndef _INCLUDE_EVENT_CENTER #define _INCLUDE_EVENT_CENTER #ifndef _IMAGE_VIEWER_DLL #define IMAGE_VIEWER_API _declspec(dllimport) #else #define IMAGE_VIEWER_API _declspec(dllexport) #endif #include "Delegate.hpp" //#include "MultiDelegate.hpp" //#include "UnsafeDelegate.hpp" //#include "UnsafeNotifyDelegate.hpp" //#include "TimerDelegate.hpp" class ImageShow; //----------------------------------------------------------------------------- // A general DelegateArg of DateTime //----------------------------------------------------------------------------- class EventArgsDateTime : public DelegateArgs { public: inline EventArgsDateTime (DDateTime * Now) { m_pNow = Now; } public: const DDateTime * m_pNow; }; //----------------------------------------------------------------------------- // A general DelegateArg of EventArgs_CDC //----------------------------------------------------------------------------- class EventArgs_CDC : public DelegateArgs { public: inline EventArgs_CDC (CDC * pDC) { m_pDC = pDC; } public: CDC * m_pDC; }; //----------------------------------------------------------------------------- // A general DelegateArg of int //----------------------------------------------------------------------------- class EventArgs_Int : public DelegateArgs { public: inline EventArgs_Int (int i) { m_int = i; } public: int m_int; }; class EventArgs_2Int : public DelegateArgs { public: inline EventArgs_2Int (int i1, int i2) { m_int1 = i1; m_int2 = i2; } public: int m_int1; int m_int2; }; class EventArgs_3Int : public DelegateArgs { public: inline EventArgs_3Int (int i1, int i2, int i3) { m_int1 = i1; m_int2 = i2; m_int3 = i3; } public: int m_int1; int m_int2; int m_int3; }; class EventArgs_Double : public DelegateArgs { public: inline EventArgs_Double (double d) { m_double = d; } public: double m_double; }; class EventArgs_String : public DelegateArgs { public: inline EventArgs_String (DString s) { m_String = s; } public: DString m_String; }; class EventArgs_4String : public DelegateArgs { public: DString m_String [4]; }; class EventArgs_8String : public DelegateArgs { public: EventArgs_8String () { } EventArgs_8String (const EventArgs_8String & from) { from.CopyTo (*this); } public: DString m_String [8]; public: EventArgs_8String & CopyTo (EventArgs_8String & to) const { for (int Index=0; Index<8; Index++) { to.m_String [Index] = m_String [Index]; } } bool IsEqual (const EventArgs_8String & to) const { for (int Index=0; Index<8; Index++) { if (to.m_String [Index] != m_String [Index]) return false; } return true; } EventArgs_8String & operator = (const EventArgs_8String & from) { from.CopyTo (*this); } }; inline bool __stdcall operator == (const EventArgs_8String& s1, const EventArgs_8String& s2) { return s1.IsEqual (s2); } class EventArgsDICOMDataSet : public DelegateArgs { public: inline EventArgsDICOMDataSet (DICOMDataSet * dds) { m_DDS = dds; } public: DICOMDataSet * m_DDS; }; /* class EventSourceWindowLevel { public: void FireWindowLevel (const void * sender, int width, int center) { EventArgs_2Int e (width, center); OnWindowLevel (sender, &e); } void FireFinalWindowLevel (const void * sender, int width, int center) { EventArgs_2Int e (width, center); OnFinalWindowLevel (sender, &e); } public: static Delegate OnWindowLevel; static Delegate OnFinalWindowLevel; }; */ //----------------------------------------------------------------------------- // A general DelegateArg of ImageShow //----------------------------------------------------------------------------- class EventArgsImageShow: public DelegateArgs { public: inline EventArgsImageShow (ImageShow * show) { m_pShow = show; m_pPrevShow = NULL; } inline EventArgsImageShow (ImageShow * show, ImageShow * old) { m_pShow = show; m_pPrevShow = old; } public: ImageShow * m_pShow; ImageShow * m_pPrevShow; }; //----------------------------------------------------------------------------- // A general DelegateArg of ImageShow //----------------------------------------------------------------------------- class EventArgsSeriesShow: public DelegateArgs { public: inline EventArgsSeriesShow (ImageShow * show, long SeriesID, DString SeriesInstanceUID) { m_pShow = show; m_SeriesID = SeriesID; m_SeriesInstanceUID = SeriesInstanceUID; } public: ImageShow * m_pShow; unsigned long m_SeriesID; DString m_SeriesInstanceUID; }; #endif