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 15 of file wxPanelWrapper.cpp.

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

References BasicUI::FindFocus().

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

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