Audacity 3.2.0
Functions
wxPanelWrapper.cpp File Reference
#include "wxPanelWrapper.h"
#include <wx/grid.h>
Include dependency graph for wxPanelWrapper.cpp:

Go to the source code of this file.

Functions

void wxTabTraversalWrapperCharHook (wxKeyEvent &event)
 

Function Documentation

◆ wxTabTraversalWrapperCharHook()

void wxTabTraversalWrapperCharHook ( wxKeyEvent &  event)

Definition at line 13 of file wxPanelWrapper.cpp.

14{
15//#ifdef __WXMAC__
16#if defined(__WXMAC__) || defined(__WXGTK__)
17 // Compensate for the regressions in TAB key navigation
18 // due to the switch to wxWidgets 3.0.2
19 if (event.GetKeyCode() == WXK_TAB) {
20 auto focus = wxWindow::FindFocus();
21 if (dynamic_cast<wxGrid*>(focus)
22 || (focus &&
23 focus->GetParent() &&
24 dynamic_cast<wxGrid*>(focus->GetParent()->GetParent()))) {
25 // Let wxGrid do its own TAB key handling
26 event.Skip();
27 return;
28 }
29 // Apparently, on wxGTK, FindFocus can return NULL
30 if (focus)
31 {
32 focus->Navigate(
33 event.ShiftDown()
34 ? wxNavigationKeyEvent::IsBackward
35 : wxNavigationKeyEvent::IsForward
36 );
37 return;
38 }
39 }
40#endif
41
42 event.Skip();
43}
std::unique_ptr< WindowPlacement > FindFocus()
Find the window that is accepting keyboard input, if any.
Definition: BasicUI.h:375

References BasicUI::FindFocus().

Referenced by wxTabTraversalWrapper< Base >::wxTabTraversalWrapper().

Here is the call graph for this function:
Here is the caller graph for this function: