1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-19 12:40:12 +02:00

Compensate for wxW 3 tab navigation deficiencies on Mac...

... using char hook event handlers.  We don't need to go the extreme length
of patching wxWidgets source.
This commit is contained in:
Paul Licameli
2016-06-25 14:18:23 -04:00
committed by Paul Licameli
parent ae14cb0dbc
commit 4739f3e27b
50 changed files with 231 additions and 144 deletions

View File

@@ -0,0 +1,37 @@
//
// wxPanelWrapper.cpp
// Audacity
//
// Created by Paul Licameli on 6/25/16.
//
//
#include "../Audacity.h"
#include "wxPanelWrapper.h"
IMPLEMENT_CLASS(wxPanelWrapper, wxPanel)
wxPanelWrapper::wxPanelWrapper(wxWindow * parent, wxWindowID id,
const wxPoint & pos,
const wxSize & size,
long style)
: wxPanel(parent, id, pos, size, style)
{}
void wxPanelWrapper::OnCharHook(wxKeyEvent &event)
{
if (event.GetKeyCode() == WXK_TAB) {
wxWindow::FindFocus()->Navigate(
event.ShiftDown()
? wxNavigationKeyEvent::IsBackward
: wxNavigationKeyEvent::IsForward
);
return;
}
event.Skip();
}
BEGIN_EVENT_TABLE(wxPanelWrapper, wxPanel)
EVT_CHAR_HOOK(wxPanelWrapper::OnCharHook)
END_EVENT_TABLE()