1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-04 17:49:45 +02:00
audacity/src/widgets/wxPanelWrapper.h

39 lines
719 B
C++

//
// wxPanelWrapper.h
// Audacity
//
// Created by Paul Licameli on 6/25/16.
//
//
#ifndef __AUDACITY_WXPANEL_WRAPPER__
#define __AUDACITY_WXPANEL_WRAPPER__
#include <MemoryX.h>
#include <wx/panel.h>
void wxTabTraversalWrapperCharHook(wxKeyEvent &event);
template <typename Base>
class wxTabTraversalWrapper : public Base
{
public:
template <typename... Args>
wxTabTraversalWrapper(Args&&... args)
: Base( std::forward<Args>(args)... )
{
this->Bind(wxEVT_CHAR_HOOK, wxTabTraversalWrapperCharHook);
}
~wxTabTraversalWrapper()
{
this->Unbind(wxEVT_CHAR_HOOK, wxTabTraversalWrapperCharHook);
}
};
class wxPanel;
using wxPanelWrapper = wxTabTraversalWrapper<wxPanel>;
#endif