📄 eventlistener.h
字号:
#pragma once
#include "Graphics.h"
class IEventListener
{
};
class IClickEventListener
{
public:
virtual BOOL OnClick(void* owner) = 0;
};
class IPaintEventListener
{
public:
virtual void OnPaint(void* owner, CGraphics* g, const RECT* pRect) = 0;
};
class IMouseMoveEventListener
{
public:
virtual void OnMouseMove(void* owner, int x, int y) = 0;
};
class IKeyboardEventListener : public IClickEventListener
{
public:
virtual void OnKeyDown(void* owner, int nKeyCode) = 0;
virtual void OnKeyUp(void* owner, int nKeyCode) = 0;
};
class IMouseKeyEventListener : public IClickEventListener
{
public:
typedef enum { LBUTTON, CBUTTON, RBUTTON } MouseKeyType;
public:
virtual void OnMouseKeyDown(void* owner, MouseKeyType nMkt, int x, int y) = 0;
virtual void OnMouseKeyUp(void* owner, MouseKeyType nMkt, int x, int y) = 0;
};
class ITimerEventListener
{
public:
virtual void OnTimer(void* owner, int nTimerId) = 0;
};
class ICommandEventListener
{
public:
virtual void OnCommand(void* owner, int nCommId) = 0;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -