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:
committed by
Paul Licameli
parent
ae14cb0dbc
commit
4739f3e27b
37
src/widgets/wxPanelWrapper.cpp
Normal file
37
src/widgets/wxPanelWrapper.cpp
Normal 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()
|
||||
Reference in New Issue
Block a user