/*
 * Key.h
 *
 *  Created on: 2009-07-07
 *      Author: wasyl
 */

#ifndef KEY_H_
#define KEY_H_

#include "Switch.h"

/**
 * Represents a single key on the keyboard.
 */
class Key: public Switch
{
private:
	int mKey;
	bool mState;

public:
	Key(int mKey);

	bool on() { return mState; }
	void update();
};

/**
 * Represents a mouse button.
 */
class MouseKey : public Switch
{
public:
	enum MouseKeyType {LEFT = 1, MIDDLE = 3, RIGHT = 2};

private:
	MouseKeyType mWhich;
	bool mState;

public:
	MouseKey(MouseKeyType which);
	bool on() { return mState; }
	void update();
};

#endif /* KEY_H_ */
