// File: mouseinputevent.h
// Created by: <Joern Reimerdes>
// Created on: 25.02.1005

/**
 * inputmodule.h - is part of the iwear-framework
 * @file
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is part of The iWear Framework.
 * In particular this file is part of the Framework Input Library
 *
 * The iWear Framework is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation as in version 2 of the License.

 * 
 * The iWear Framework is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * The iWear Framework; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __MOUSEINPUTEVENT_H
#define __MOUSEINPUTEVENT_H

#ifndef __MOUSEINPUTDATA_H
#include <iwear_input/mouseinputdata.h>
#endif

#ifndef __INPUTENUMS_H
#include <iwear_input/inputenums.h>
#endif

#ifndef __INPUTMODULE_H
#include <iwear_input/inputmodule.h>
#endif

#ifndef __DEBUGSTREAM_H
#include <iwear/debugstream.h>
#endif

#ifndef __EVENTBASE_H
#include <iwear/eventbase.h>
#endif 

#ifndef __FUNCTOR_H
#include <iwear/functor.h>
#endif

#ifndef __UID_H
#include <iwear/uid.h>
#endif

#include <stdint.h>

using namespace iwear;
using namespace iwear::input;

namespace iwear { 
namespace input {
    /** Forward declatation of InputModule. */
    class InputModule;

    /** The MouseInputEvent will encapsulate all Functor Objects which
     * should be called by the EventDispatcher.
     * @author: Jörn Reimerdes
     * @note: The Functor<MouseInputData> must be implemented in the
     *  service which should use a mouse input.
     * @inherits The class inhertis from the template class Event
     *  which ist typed with the MouseInputFunctor class.
     */
    class MouseInputEvent : public Event<Functor<MouseInputData> > {

    public:

	/** Creates a new MouseInputEvent.
	 * @param mouse_input_functor The functor which should be called.
	 * @param mouse_input_data The parameter which will be passed
	 *  to the functor.
	 */
	MouseInputEvent(Functor<MouseInputData>& mouse_input_functor, 
			 MouseInputData& mouse_input_data);

	/** Destroys the MouseInputEvent */
	virtual ~MouseInputEvent(void){
	}
	
	/* see Event */
	virtual void dispatch( void );

	/* see Event */
	virtual bool is_triggered( void );

    protected:
	
	/**
	 * Reference of the functor which should be called.
	 */
	Functor<MouseInputData>& mouse_input_functor;

	/** The MouseInputData reference which contains all data. */
	MouseInputData mouse_input_data;

    private:
        
    };
} // namespace input
} //namespace iwear

#endif	// __MOUSEINPUTEVENT_H

