123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- /***************************************************************************
- * 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
|