recursive tab processing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1354,27 +1354,25 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
|
|||||||
if ( handled && event.GetSkipped() )
|
if ( handled && event.GetSkipped() )
|
||||||
handled = false ;
|
handled = false ;
|
||||||
}
|
}
|
||||||
if ( !handled &&
|
if ( !handled && (keyval == WXK_TAB) )
|
||||||
(keyval == WXK_TAB) &&
|
|
||||||
// CS: copied the change below from wxGTK
|
|
||||||
// VZ: testing for wxTE_PROCESS_TAB shouldn't be done here the control may
|
|
||||||
// have this style, yet choose not to process this particular TAB in which
|
|
||||||
// case TAB must still work as a navigational character
|
|
||||||
#if 0
|
|
||||||
(!focus->HasFlag(wxTE_PROCESS_TAB)) &&
|
|
||||||
#endif
|
|
||||||
(focus->GetParent()) &&
|
|
||||||
(focus->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
|
|
||||||
{
|
{
|
||||||
wxNavigationKeyEvent new_event;
|
wxWindow* iter = focus->GetParent() ;
|
||||||
new_event.SetEventObject( focus );
|
while( iter && !handled )
|
||||||
new_event.SetDirection( !event.ShiftDown() );
|
{
|
||||||
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
|
if ( iter->HasFlag( wxTAB_TRAVERSAL ) )
|
||||||
new_event.SetWindowChange( event.ControlDown() );
|
{
|
||||||
new_event.SetCurrentFocus( focus );
|
wxNavigationKeyEvent new_event;
|
||||||
handled = focus->GetEventHandler()->ProcessEvent( new_event );
|
new_event.SetEventObject( focus );
|
||||||
if ( handled && new_event.GetSkipped() )
|
new_event.SetDirection( !event.ShiftDown() );
|
||||||
handled = false ;
|
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
|
||||||
|
new_event.SetWindowChange( event.ControlDown() );
|
||||||
|
new_event.SetCurrentFocus( focus );
|
||||||
|
handled = focus->GetParent()->GetEventHandler()->ProcessEvent( new_event );
|
||||||
|
if ( handled && new_event.GetSkipped() )
|
||||||
|
handled = false ;
|
||||||
|
}
|
||||||
|
iter = iter->GetParent() ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// backdoor handler for default return and command escape
|
// backdoor handler for default return and command escape
|
||||||
if ( !handled && (!focus->IsKindOf(CLASSINFO(wxControl) ) || !focus->MacCanFocus() ) )
|
if ( !handled && (!focus->IsKindOf(CLASSINFO(wxControl) ) || !focus->MacCanFocus() ) )
|
||||||
|
Reference in New Issue
Block a user