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#include "wxPanelWrapper.h"
10
11#include <wx/grid.h>
12
14
15void wxTabTraversalWrapperCharHook(wxKeyEvent &event)
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}
46
48{
49 wxPanel::SetLabel( label.Translation() );
50}
51
53{
54 wxPanel::SetName( name.Translation() );
55}
56
58{
59 wxPanel::SetToolTip( toolTip.Stripped().Translation() );
60}
61
63{
64 wxPanel::SetName( GetLabel() );
65}
66
68{
69 wxDialog::SetTitle( title.Translation() );
70}
71
73{
74 wxDialog::SetLabel( label.Translation() );
75}
76
78{
79 wxDialog::SetName( name.Translation() );
80}
81
83{
84 wxDialog::SetName( wxDialog::GetTitle() );
85}
86
XO("Cut/Copy/Paste")
static const auto title
wxString name
Definition: TagsEditor.cpp:166
TranslatableString label
Definition: TagsEditor.cpp:165
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)
static const TranslatableString DefaultDialogPrompt
void SetToolTip(const TranslatableString &toolTip)
void SetLabel(const TranslatableString &label)
std::unique_ptr< WindowPlacement > FindFocus()
Find the window that is accepting keyboard input, if any.
Definition: BasicUI.h:383
void wxTabTraversalWrapperCharHook(wxKeyEvent &event)