
// ##########################################################################
// #                                                                        #
// #                             EventDispatcher                            #
// #                                                                        #
// #                            - Definitionen -                            #
// #                                                                        #
// ##########################################################################


#ifndef _EVENTDISPATCHER_H
#define _EVENTDISPATCHER_H


#include"ui/vobjcoll.h"
#include"ui/menu.h"
#include"gui/dspstrct.h"

template <class T> class EventDispatcher
{

  public:

	 EventDispatcher();
	 EventDispatcher(T*                    Owner,
						  DispatcherStruct0<T>* Dispatcher,
						  UI_VisualObject*      VObj);
	 EventDispatcher(T*                    Owner,
						  DispatcherStruct1<T>* Dispatcher,
						  UI_VisualObject*      VObj);
	 EventDispatcher(T*                    Owner,
						  DispatcherStruct2<T>* Dispatcher,
						  UI_VisualObject*      VObj);
	 EventDispatcher(T*                    Owner,
						  DispatcherStruct2<T>* Dispatcher,
						  UI_VObjCollection*    VObj);
    EventDispatcher(T*                    Owner,
						  DispatcherStruct2<T>* Dispatcher,
						  UI_Menu*              VObj);


	 bool dispatch (T*                    Owner,
						 DispatcherStruct0<T>* Dispatcher,
						 UI_VisualObject*      VObj);
	 bool dispatch (T*                    Owner,
						 DispatcherStruct1<T>* Dispatcher,
						 UI_VisualObject*      VObj);
	 bool dispatch (T*                    Owner,
						 DispatcherStruct2<T>* Dispatcher,
						 UI_VisualObject*      VObj);
	 bool dispatch (T*                    Owner,
						 DispatcherStruct2<T>* Dispatcher,
						 UI_VObjCollection*    VObj);
	 bool dispatch (T*                    Owner,
						 DispatcherStruct2<T>* Dispatcher,
						 UI_Menu*              VObj);
	 bool remove   (T*                    Owner,
						 DispatcherStruct0<T>* Dispatcher,
						 UI_VisualObject*      VObj);
	 bool remove   (T*                    Owner,
						 DispatcherStruct1<T>* Dispatcher,
						 UI_VisualObject*      VObj);
	 bool remove   (T*                    Owner,
						 DispatcherStruct2<T>* Dispatcher,
						 UI_VisualObject*      VObj);
	 bool remove   (T*                    Owner,
						 DispatcherStruct2<T>* Dispatcher,
						 UI_VObjCollection*    VObj);
	 bool remove   (T*                    Owner,
						 DispatcherStruct2<T>* Dispatcher,
						 UI_Menu*              VObj);
};


#endif _EVENTDISPATCHER_H


#include"gui/eventdsp.cpp"
