Audacity 3.2.0
Classes | Functions
KeyboardCapture Namespace Reference

Classes

struct  PostFilter
 Post-filter is conditionally called after passing the event to the window. More...
 
struct  PreFilter
 Pre-filter is called before passing the event to the captured window. More...
 

Functions

bool IsHandler (const wxWindow *handler)
 
wxWindow * GetHandler ()
 
void Capture (wxWindow *handler)
 
void Release (wxWindow *handler)
 
void OnFocus (wxWindow &window, wxFocusEvent &event)
 a function useful to implement a focus event handler The window releases the keyboard if the event is for killing focus, otherwise the window captures the keyboard; then refresh the window and skip the event More...
 

Function Documentation

◆ Capture()

AUDACITY_DLL_API void KeyboardCapture::Capture ( wxWindow *  handler)

Definition at line 61 of file KeyboardCapture.cpp.

References audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, and anonymous_namespace{KeyboardCapture.cpp}::sHandler().

Referenced by OnFocus(), SetActiveProject(), and TrackPanel::SetFocusedCell().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetHandler()

AUDACITY_DLL_API wxWindow * KeyboardCapture::GetHandler ( )

Definition at line 56 of file KeyboardCapture.cpp.

57{
58 return sHandler();
59}

References anonymous_namespace{KeyboardCapture.cpp}::sHandler().

Referenced by EventMonitor::FilterEvent(), and IsHandler().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsHandler()

AUDACITY_DLL_API bool KeyboardCapture::IsHandler ( const wxWindow *  handler)

Definition at line 51 of file KeyboardCapture.cpp.

52{
53 return GetHandler() == handler;
54}
wxWindow * GetHandler()

References GetHandler(), and audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler.

Referenced by CellularPanel::OnKillFocus().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnFocus()

AUDACITY_DLL_API void KeyboardCapture::OnFocus ( wxWindow &  window,
wxFocusEvent &  event 
)

a function useful to implement a focus event handler The window releases the keyboard if the event is for killing focus, otherwise the window captures the keyboard; then refresh the window and skip the event

Definition at line 72 of file KeyboardCapture.cpp.

73{
74 if (event.GetEventType() == wxEVT_KILL_FOCUS)
75 KeyboardCapture::Release( &window );
76 else
77 KeyboardCapture::Capture( &window );
78
79 window.Refresh( false );
80 event.Skip();
81}
void Release(wxWindow *handler)
void Capture(wxWindow *handler)

References Capture(), and Release().

Referenced by MixerTrackSlider::OnFocus(), AudioSetupToolBar::OnFocus(), DeviceToolBar::OnFocus(), SelectionBar::OnFocus(), TranscriptionToolBar::OnFocus(), and NumericTextCtrl::OnFocus().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Release()

AUDACITY_DLL_API void KeyboardCapture::Release ( wxWindow *  handler)

Definition at line 66 of file KeyboardCapture.cpp.

67{
68// wxASSERT(sHandler() == handler);
69 sHandler() = nullptr;
70}

References anonymous_namespace{KeyboardCapture.cpp}::sHandler().

Referenced by OnFocus(), CellularPanel::OnKillFocus(), and AudioIO::StopStream().

Here is the call graph for this function:
Here is the caller graph for this function: