// File: mouseinputdata.h
// Created by: <Jörn Reimerdes>
// Created on: 22.03.2005

/**
 * mouseinputdata.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 __MOUSEINPUTDATA_H
#define __MOUSEINPUTDATA_H

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

#ifndef __INPUTDATA_H
#include <iwear_input/inputdata.h>
#endif

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

#include <map>
#include <bitset>

using namespace std;

namespace iwear {
namespace input {

    /** Stores all mouse information which are created by an event.
     */
class MouseInputData : public InputData
{
public:

    /** The x coordinate of the mouse cursor. */
    int32_t x;

    /** The y coordinate of the mouse cursor. */
    int32_t y;

    /** A bitset which stores the status of all mouse buttons.
     * Get the mouse button status with: 
     * - <code>mouse_button_status_set[MouseKey]</code>
     */
    bitset<num_MouseKey> mouse_button_status_set;

    /** Creates a new MouseInputData. 
     * Should be used as default since it is necessary that
     * input_module is set.
     * @param input_module The Module which created the data.
     * @param input_hardware_info Information of the hardware which
     *  created the device.
     * @param mouse_input_event_type The special type of the mouse
     *  input event.
     */
    MouseInputData(InputModule* input_module, 
		   InputHardwareInfo* input_hardware_info,
		   MouseInputEventType mouse_input_event_type);

    /** Creates a new MouseInputData. 
     * @note Do not forget to set input_module!
     */ 
    MouseInputData( void );

    /** Creates a new MouseInputData. 
     * Should be used as default since it is necessary that
     * input_module is set.
     * @param input_module The Module which created the data.
     * @param input_hardware_info Information of the hardware which
     *  created the device.
     */
    MouseInputData(InputModule* input_module, 
		   InputHardwareInfo* input_hardware_info);

    /** Destroys the MouseInputData. */
    ~MouseInputData( void );


    /** Gets the mouse input event type .
     * @return The mouse input event type. */
    inline MouseInputEventType get_mouse_input_event_type( void ){
	return this->mouse_input_event_type;
    }    

    /** The type of the MouseInputEvent which relates to this data.
     */
    MouseInputEventType mouse_input_event_type;

protected:


private:

};

} // input
} // iwear

#endif	//__MOUSEINPUTDATA_H

