本文整理汇总了C++中wxTreeEvent::GetKeyEvent方法的典型用法代码示例。如果您正苦于以下问题:C++ wxTreeEvent::GetKeyEvent方法的具体用法?C++ wxTreeEvent::GetKeyEvent怎么用?C++ wxTreeEvent::GetKeyEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxTreeEvent
的用法示例。
在下文中一共展示了wxTreeEvent::GetKeyEvent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
void
DeckLibraryTab::OnTreeKeyDown (wxTreeEvent &event)
{
wxKeyEvent oKeyEvent = event.GetKeyEvent ();
if (m_bNoEvents || !m_pTree) return;
switch (oKeyEvent.GetKeyCode ()) {
// Keys to delete cards
case WXK_BACK: // backspace
case WXK_DELETE: // delete
DeleteBranch (m_pTree->GetSelection ());
break;
case WXK_F5:
LessOfAnItem (m_pTree->GetSelection (), 5);
break;
case WXK_F6:
LessOfAnItem (m_pTree->GetSelection (), 1);
break;
case WXK_F7:
MoreOfAnItem (m_pTree->GetSelection (), 1);
break;
case WXK_F8:
MoreOfAnItem (m_pTree->GetSelection (), 5);
break;
default:
// wxString sMessage = "Pressed key #";
// sMessage << oKeyEvent.GetKeyCode ();
// wxLogMessage (sMessage);
// event.Skip ();
break;
}
}
示例2: OnTreeKeyDown
void MyTreeCtrl::OnTreeKeyDown(wxTreeEvent& event)
{
LogKeyEvent(wxT("Tree key down "), event.GetKeyEvent());
event.Skip();
}