📄 control.cpp
字号:
#include "GKL.h"
using namespace GKL;
Control::Control(Window *pWnd, bool needKBEvent, bool needMouseEvent):
mpWnd(pWnd), mpPnl(NULL),
mNeedKBEvent(needKBEvent), mNeedMouseEvent(needMouseEvent)
{
alert(mpWnd == NULL);
}
Control::~Control(void)
{
if(mpPnl != NULL)
mpPnl->removeControl(this);
}
int Control::onTrigger(void *pParam)
{
EventParam *pEP = (EventParam*)pParam;
switch(pEP->eventKind)
{
case EVENT_KB:
if(mNeedKBEvent)
return onKBEvent(pEP->uMsg, pEP->wParam, pEP->lParam, pEP->lResult);
else
return 0;
break;
case EVENT_MOUSE:
if(mNeedMouseEvent)
return onMouseEvent(pEP->uMsg, pEP->wParam, pEP->lParam, pEP->lResult);
else
return 0;
break;
default:
alert(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -