Audacity
3.2.0
src
KeyboardCapture.h
Go to the documentation of this file.
1
/**********************************************************************
2
3
Audacity: A Digital Audio Editor
4
5
KeyboardCapture.h
6
7
Paul Licameli split this from Project.h
8
9
**********************************************************************/
10
11
#ifndef __AUDACITY_KEYBOARD_CAPTURE__
12
#define __AUDACITY_KEYBOARD_CAPTURE__
13
14
15
16
#include <functional>
17
#include <wx/event.h>
18
19
#include "
GlobalVariable.h
"
20
24
32
DECLARE_EXPORTED_EVENT_TYPE
(AUDACITY_DLL_API, EVT_CAPTURE_KEY, -1);
33
34
namespace
KeyboardCapture
35
{
36
AUDACITY_DLL_API
bool
IsHandler
(
const
wxWindow *
handler
);
37
AUDACITY_DLL_API wxWindow *
GetHandler
();
38
AUDACITY_DLL_API
void
Capture
(wxWindow *
handler
);
39
AUDACITY_DLL_API
void
Release
(wxWindow *
handler
);
40
42
43
struct
AUDACITY_DLL_API
PreFilter
:
GlobalHook
<PreFilter,
44
bool( wxKeyEvent& )
45
>{};
46
48
55
struct
AUDACITY_DLL_API
PostFilter
:
GlobalHook
<PostFilter,
56
bool( wxKeyEvent& )
57
>{};
58
63
AUDACITY_DLL_API
64
void
OnFocus
( wxWindow &window, wxFocusEvent &event );
65
}
66
67
#endif
GlobalVariable.h
DECLARE_EXPORTED_EVENT_TYPE
DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_CAPTURE_KEY, -1)
Custom events.
GlobalHook
Global function-valued variable, adding a convenient Call()
Definition:
GlobalVariable.h:158
KeyboardCapture
Definition:
KeyboardCapture.cpp:48
KeyboardCapture::IsHandler
bool IsHandler(const wxWindow *handler)
Definition:
KeyboardCapture.cpp:51
KeyboardCapture::GetHandler
wxWindow * GetHandler()
Definition:
KeyboardCapture.cpp:56
KeyboardCapture::Release
void Release(wxWindow *handler)
Definition:
KeyboardCapture.cpp:66
KeyboardCapture::OnFocus
void OnFocus(wxWindow &window, wxFocusEvent &event)
a function useful to implement a focus event handler The window releases the keyboard if the event is...
Definition:
KeyboardCapture.cpp:72
KeyboardCapture::Capture
void Capture(wxWindow *handler)
Definition:
KeyboardCapture.cpp:61
audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler
AuthorizationHandler handler
Definition:
AuthorizationHandler.cpp:34
KeyboardCapture::PostFilter
Post-filter is conditionally called after passing the event to the window.
Definition:
KeyboardCapture.h:57
KeyboardCapture::PreFilter
Pre-filter is called before passing the event to the captured window.
Definition:
KeyboardCapture.h:45
Generated by
1.9.3