Audacity  3.0.3
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 14 of file wxPanelWrapper.cpp.

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

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

Here is the caller graph for this function: