本文整理汇总了C++中BASE_SCREEN::ForceCloseManageCurseur方法的典型用法代码示例。如果您正苦于以下问题:C++ BASE_SCREEN::ForceCloseManageCurseur方法的具体用法?C++ BASE_SCREEN::ForceCloseManageCurseur怎么用?C++ BASE_SCREEN::ForceCloseManageCurseur使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BASE_SCREEN
的用法示例。
在下文中一共展示了BASE_SCREEN::ForceCloseManageCurseur方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnKeyEvent
void WinEDA_DrawPanel::OnKeyEvent(wxKeyEvent& event)
/****************************************************/
{
long key, localkey;
bool escape = FALSE;
key = localkey = event.m_keyCode;
switch( localkey )
{
case WXK_CONTROL:
case WXK_CAPITAL:
case WXK_SHIFT:
case WXK_NUMLOCK:
case WXK_LBUTTON:
case WXK_RBUTTON:
case 0x0135: /* Alt key */
return;
case WXK_ESCAPE:
escape = m_AbortRequest = TRUE;
break;
}
if( event.ControlDown() ) localkey |= GR_KB_CTRL;
if( event.AltDown() ) localkey |= GR_KB_ALT;
if( event.ShiftDown() && (key > 256) ) localkey |= GR_KB_SHIFT;
wxClientDC DC(this);
BASE_SCREEN * Screen = GetScreen();
PrepareGraphicContext(&DC);
g_KeyPressed = localkey;
if ( escape )
{
if( Screen->ManageCurseur && Screen->ForceCloseManageCurseur )
{
SetCursor(m_PanelCursor = m_PanelDefaultCursor);
Screen->ForceCloseManageCurseur(m_Parent, &DC);
SetCursor(m_PanelCursor = m_PanelDefaultCursor);
}
else m_Parent->SetToolID(0, m_PanelCursor = m_PanelDefaultCursor = wxCURSOR_ARROW, wxEmptyString);
}
m_Parent->GeneralControle(&DC, Screen->m_MousePosition);
}