#ifndef _EVENT_EXPOSE_H_
#define _EVENT_EXPOSE_H_

#include "ebase.h"

namespace event
{

/**
 * \brief Listener for Expose event.
 * \date 01-12-2006
 *
 * \author Ondrej Svejdar
 *
 * \todo 
 *
 * \bug 
 *
 */
class ExposeListener:public TObject
{
public:
	virtual void onExpose(EHeader& header,int count,int height,int width)=0;
};

/**
 * \brief Handler for Expose event.
 * \date 01-12-2006
 *
 * \author Ondrej Svejdar
 *
 * \todo 
 *
 * \bug 
 *
 */
class EExpose:public EBase
{
	typedef vector<Ptr<ExposeListener> >  t_listeners;
	t_listeners listeners;
	static const char* eventType;
	static const EField* eventFields[];
	
	int preprocessEvent(EHeader& header,Tcl_Interp* interp,int objc,Tcl_Obj* CONST objv[]);
public:
	inline EExpose():EBase(eventType,eventFields) {}
	void addExposeListener(ExposeListener* listener)
	{
		listeners.push_back(listener);
		afterListenerRegistred();
	}
};

};

#endif/*_EVENT_EXPOSE_H_*/
