Audacity 3.2.0
wxPanelWrapper.cpp
Go to the documentation of this file.
1//
2// wxPanelWrapper.cpp
3// Audacity
4//
5// Created by Paul Licameli on 6/25/16.
6//
7//
8
9
10#include "wxPanelWrapper.h"
11
12#include <wx/grid.h>
13
14void wxTabTraversalWrapperCharHook(wxKeyEvent &event)
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}
45
47{
48 wxPanel::SetLabel( label.Translation() );
49}
50
52{
53 wxPanel::SetName( name.Translation() );
54}
55
57{
58 wxPanel::SetToolTip( toolTip.Stripped().Translation() );
59}
60
62{
63 wxPanel::SetName( GetLabel() );
64}
65
67{
68 wxDialog::SetTitle( title.Translation() );
69}
70
72{
73 wxDialog::SetLabel( label.Translation() );
74}
75
77{
78 wxDialog::SetName( name.Translation() );
79}
80
82{
83 wxDialog::SetName( wxDialog::GetTitle() );
84}
const TranslatableString name
Definition: Distortion.cpp:82
static const auto title
TranslatableString label
Definition: TagsEditor.cpp:163
Holds a msgid for the translation catalog; may also bind format arguments.
wxString Translation() const
TranslatableString Stripped(unsigned options=MenuCodes) const
non-mutating, constructs another TranslatableString object
void SetTitle(const TranslatableString &title)
void SetLabel(const TranslatableString &title)
void SetToolTip(const TranslatableString &toolTip)
void SetLabel(const TranslatableString &label)
void wxTabTraversalWrapperCharHook(wxKeyEvent &event)