mouse.h

来自「VC++ DEMO, used for the beginners and th」· C头文件 代码 · 共 45 行

H
45
字号
#ifndef MOUSE_H
#define MOUSE_H

class Axis
{
public:
	Axis(){};
	virtual ~Axis(){};
protected:
	ISMouseButton          m_MouseButton[3];
	long                   m_AxisX;
	long                   m_AxisY;
};

class Axis_Event
{
public:
	virtual void ProcessEvent() = 0;
};
class Hot_Axis
{
public:
	Hot_Axis(long left,long top,long right,long bottom,
			 const string & Name,
			 const Axis & DefaultButton,
			 Axis_Event * JustPressedEvent = NULL,
			 Axis_Event * PressedEvent = NULL, 
			 Axis_Event * JustUnPressedEvent = NULL)
	{
		m_Name = Name;
		m_Button = DefaultButton;
		m_JustPressedEvent = JustPressedEvent;
		m_PressedEvent = PressedEvent;
		m_JustUnPressedEvent = JustUnPressedEvent;
	};
	virtual ~Hot_Axis(){};
	string                  m_Name;
	Axis                    m_Button;
	Axis_Event*				m_JustPressedEvent;		/* the event to fire when the hotkey is just pressed */
	Axis_Event*				m_PressedEvent;			/* the event to fire when the hotkey is being pressed */
	Axis_Event*				m_JustUnPressedEvent;	/* the event to fire when the hotkey is released */
};


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?