/* -----------------------------------------------------------------------------
	GSFramework
	Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */


#ifndef	__INPUT_MOUSE__
#define	__INPUT_MOUSE__


		#include "input/input_device.h"


namespace GS {
	namespace Input {

/*
	@short	Mouse input device.
	@author	Emmanuel Julien (ejulien@nworks.fr)
*/
class	Mouse : public Device
{
protected:

struct	State
{
		float		x, y, wheel, hwheel;
		bool		left_button, right_button, middle_button;
};

		State		state,
					last_state;

public:

virtual	Type		GetType() const { return Type_Mouse; }
virtual	const char	*GetName() const { return "mouse"; }

virtual	void		Update() = 0;

virtual	bool		IsDown(KeyCode) const;
virtual	bool		WasDown(KeyCode) const;

virtual	bool		GetInputRange(InputCode, float &min, float &max) const;

virtual	float		GetValue(InputCode) const;
virtual	float		GetLastValue(InputCode) const;

		Mouse();
};

	} // Input
} // GS


#endif	// __INPUT_MOUSE__
