本文整理汇总了C++中wxNavigationKeyEvent::Skip方法的典型用法代码示例。如果您正苦于以下问题:C++ wxNavigationKeyEvent::Skip方法的具体用法?C++ wxNavigationKeyEvent::Skip怎么用?C++ wxNavigationKeyEvent::Skip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxNavigationKeyEvent
的用法示例。
在下文中一共展示了wxNavigationKeyEvent::Skip方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnNavigationKey
void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
{
if (event.IsWindowChange())
AdvanceSelection( event.GetDirection() );
else
event.Skip();
}
示例2: OnNavigationKey
void Notebook::OnNavigationKey(wxNavigationKeyEvent &e)
{
if ( e.IsWindowChange() ) {
if (DoNavigate())
return;
}
e.Skip();
}
示例3: OnNavigationKey
void wxAuiNotebookEx::OnNavigationKey(wxNavigationKeyEvent& event)
{
if (!event.IsWindowChange())
{
event.Skip();
return;
}
AdvanceTab(event.GetDirection());
}
示例4: OnKeyboardNavigation
void CQuickconnectBar::OnKeyboardNavigation(wxNavigationKeyEvent& event)
{
if (event.GetDirection() && event.GetEventObject() == XRCCTRL(*this, "ID_QUICKCONNECT_DROPDOWN", wxButton))
{
event.SetEventObject(this);
GetParent()->ProcessEvent(event);
}
else if (!event.GetDirection() && event.GetEventObject() == XRCCTRL(*this, "ID_QUICKCONNECT_HOST", wxTextCtrl))
{
event.SetEventObject(this);
GetParent()->ProcessEvent(event);
}
else
event.Skip();
}
示例5: OnNavigate
void wxTimeSpinCtrl::OnNavigate(wxNavigationKeyEvent &ev)
{
if (wxWindow::FindFocus() == m_txt)
{
int tp = GetTimePart();
if (ev.GetDirection())
tp++;
else
tp--;
if ((tp >= 0 && tp < 3) || (hasDay && tp == 3))
{
Highlight(tp);
return;
}
}
ev.Skip();
}
示例6: HandleOnNavigationKey
void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
{
// for a TLW we shouldn't involve the parent window, it has nothing to do
// with keyboard navigation inside this TLW
wxWindow *parent = m_winParent->IsTopLevel() ? NULL
: m_winParent->GetParent();
// the event is propagated downwards if the event emitter was our parent
bool goingDown = event.GetEventObject() == parent;
const wxWindowList& children = m_winParent->GetChildren();
// if we have exactly one notebook-like child window (actually it could be
// any window that returns true from its HasMultiplePages()), then
// [Shift-]Ctrl-Tab and Ctrl-PageUp/Down keys should iterate over its pages
// even if the focus is outside of the control because this is how the
// standard MSW properties dialogs behave and we do it under other platforms
// as well because it seems like a good idea -- but we can always put this
// block inside "#ifdef __WXMSW__" if it's not suitable there
if ( event.IsWindowChange() && !goingDown )
{
// check if we have a unique notebook-like child
wxWindow *bookctrl = NULL;
for ( wxWindowList::const_iterator i = children.begin(),
end = children.end();
i != end;
++i )
{
wxWindow * const window = *i;
if ( window->HasMultiplePages() )
{
if ( bookctrl )
{
// this is the second book-like control already so don't do
// anything as we don't know which one should have its page
// changed
bookctrl = NULL;
break;
}
bookctrl = window;
}
}
if ( bookctrl )
{
// make sure that we don't bubble up the event again from the book
// control resulting in infinite recursion
wxNavigationKeyEvent eventCopy(event);
eventCopy.SetEventObject(m_winParent);
if ( bookctrl->GetEventHandler()->ProcessEvent(eventCopy) )
return;
}
}
// there is not much to do if we don't have children and we're not
// interested in "notebook page change" events here
if ( !children.GetCount() || event.IsWindowChange() )
{
// let the parent process it unless it already comes from our parent
// of we don't have any
if ( goingDown ||
!parent || !parent->GetEventHandler()->ProcessEvent(event) )
{
event.Skip();
}
return;
}
// where are we going?
const bool forward = event.GetDirection();
// the node of the children list from which we should start looking for the
// next acceptable child
wxWindowList::compatibility_iterator node, start_node;
// we should start from the first/last control and not from the one which
// had focus the last time if we're propagating the event downwards because
// for our parent we look like a single control
if ( goingDown )
{
// just to be sure it's not used (normally this is not necessary, but
// doesn't hurt neither)
m_winLastFocused = NULL;
// start from first or last depending on where we're going
node = forward ? children.GetFirst() : children.GetLast();
}
else // going up
{
// try to find the child which has the focus currently
// the event emitter might have done this for us
wxWindow *winFocus = event.GetCurrentFocus();
// but if not, we might know where the focus was ourselves
if (!winFocus)
winFocus = m_winLastFocused;
//.........这里部分代码省略.........
示例7: OnNav
//------------------------------------------------------------------------------
void CIwUIEdFrame::OnNav(wxNavigationKeyEvent& e)
{
e.Skip();
}
示例8: OnNavigationKeyEvent
void CFilterConditionsDialog::OnNavigationKeyEvent(wxNavigationKeyEvent& event)
{
wxWindow* source = FindFocus();
if (!source)
{
event.Skip();
return;
}
wxWindow* target = 0;
if (event.GetDirection())
{
for (int i = 0; i < (int)m_filterControls.size(); i++)
{
if (m_filterControls[i].pType == source)
{
target = m_filterControls[i].pCondition;
break;
}
if (m_filterControls[i].pCondition == source)
{
target = m_filterControls[i].pValue;
if (!target)
m_filterControls[i].pSet;
break;
}
if (m_filterControls[i].pSet == source || m_filterControls[i].pValue == source)
{
target = m_filterControls[i].pRemove;
break;
}
if (m_filterControls[i].pRemove == source)
{
int j = i + 1;
if (j == (int)m_filterControls.size())
target = m_pAdd;
else
target = m_filterControls[j].pType;
break;
}
}
}
else
{
if (source == m_pAdd)
{
if (!m_filterControls.empty())
target = m_filterControls[m_filterControls.size() - 1].pRemove;
}
else
{
for (int i = 0; i < (int)m_filterControls.size(); i++)
{
if (m_filterControls[i].pType == source)
{
if (i > 0)
target = m_filterControls[i - 1].pRemove;
break;
}
if (m_filterControls[i].pCondition == source)
{
target = m_filterControls[i].pType;
break;
}
if (m_filterControls[i].pSet == source || m_filterControls[i].pValue == source)
{
target = m_filterControls[i].pCondition;
break;
}
if (m_filterControls[i].pRemove == source)
{
target = m_filterControls[i].pValue;
if (!target)
m_filterControls[i].pSet;
break;
}
}
}
}
if (target)
target->SetFocus();
else
event.Skip();
}