Audacity 3.2.0
MousePrefs.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 MousePrefs.h
6
7**********************************************************************/
8
9#ifndef __AUDACITY_MOUSE_PREFS__
10#define __AUDACITY_MOUSE_PREFS__
11
12#include <wx/defs.h>
13
14#include "PrefsPanel.h"
15
16class wxListCtrl;
17class ShuttleGui;
19
20#define MOUSE_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Mouse") }
21
22class MousePrefs final : public PrefsPanel
23{
24 public:
25 MousePrefs(wxWindow * parent, wxWindowID winid);
27 ComponentInterfaceSymbol GetSymbol() const override;
28 TranslatableString GetDescription() const override;
29
30 bool Commit() override;
31 ManualPageID HelpPageName() override;
32 void PopulateOrExchange(ShuttleGui & S) override;
33
34 private:
35 void Populate();
36 void CreateList();
37 void AddItem(TranslatableString const & buttons,
38 TranslatableString const & tool,
39 TranslatableString const & action,
40 TranslatableString const & comment = {});
41
42 // See bug #2315 for discussion. This should be reviewed
43 // and (possibly) removed after wx3.1.3.
44 void OnShow(wxShowEvent & event);
45
46 wxListCtrl * mList;
47};
48
49#endif
#define S(N)
Definition: ToChars.cpp:64
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
A PrefsPanel that presents an interface for user to view the default bindings of mouse buttons to com...
Definition: MousePrefs.h:23
void CreateList()
Creates the contents of mList.
Definition: MousePrefs.cpp:121
bool Commit() override
Definition: MousePrefs.cpp:231
wxListCtrl * mList
Definition: MousePrefs.h:46
void Populate()
Creates the dialog and its contents.
Definition: MousePrefs.cpp:90
TranslatableString GetDescription() const override
Definition: MousePrefs.cpp:79
ComponentInterfaceSymbol GetSymbol() const override
Definition: MousePrefs.cpp:74
void PopulateOrExchange(ShuttleGui &S) override
Places controls on the panel and also exchanges data with them.
Definition: MousePrefs.cpp:109
void OnShow(wxShowEvent &event)
Definition: MousePrefs.cpp:219
void AddItem(TranslatableString const &buttons, TranslatableString const &tool, TranslatableString const &action, TranslatableString const &comment={})
Adds an item to mList.
Definition: MousePrefs.cpp:203
MousePrefs(wxWindow *parent, wxWindowID winid)
Constructor.
Definition: MousePrefs.cpp:60
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
Definition: MousePrefs.cpp:84
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:630
Holds a msgid for the translation catalog; may also bind format arguments.