Audacity 3.2.0
ScrubbingToolBar.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5
6 ScrubbingToolbar.h
7
8 Paul Licameli
9
10 **********************************************************************/
11
12#ifndef __AUDACITY_SCRUBBING_TOOLBAR__
13#define __AUDACITY_SCRUBBING_TOOLBAR__
14
15
16
17#include <wx/defs.h>
18
19#include "ToolBar.h"
20
21class AudacityProject;
22
23class wxCommandEvent;
24class wxDC;
25class wxImage;
26class wxWindow;
27
28class AButton;
29
30enum {
34
37};
38
39class ScrubbingToolBar final : public ToolBar {
40
41public:
42
43 static Identifier ID();
44
46 virtual ~ScrubbingToolBar();
47
48 bool ShownByDefault() const override;
49
51 static const ScrubbingToolBar &Get( const AudacityProject &project );
52
53 void Create(wxWindow *parent) override;
54
55 void OnButton(wxCommandEvent & event);
56
57 void Populate() override;
58 void Repaint(wxDC * WXUNUSED(dc)) override {};
59 void EnableDisableButtons() override;
60 void UpdatePrefs() override;
61
62 void RegenerateTooltips() override;
63
64private:
65
66 static AButton *AddButton(
67 ScrubbingToolBar *pBar,
68 teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled,
69 int id, const TranslatableString &label, bool toggle = false);
70
72
74
78
79 void OnIdle( wxIdleEvent &evt );
80
81public:
82
83 DECLARE_CLASS(ScrubbingToolBar)
84 DECLARE_EVENT_TABLE()
85
86private:
87 void DoRegenerateTooltips( bool force );
88
89 bool mLastScrub{ false };
90 bool mLastSeek{ false };
91 bool mLastRuler{ false };
92};
93
94#endif
wxImage(22, 22)
int teBmps
@ STBFirstButton
@ STBNumButtons
@ STBRulerID
@ STBSeekID
@ STBScrubID
TranslatableString label
Definition: TagsEditor.cpp:165
const auto project
A wxButton with mouse-over behaviour.
Definition: AButton.h:104
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
An explicitly nonlocalized string, not meant for the user to see.
Definition: Identifier.h:22
static AButton * AddButton(ScrubbingToolBar *pBar, teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled, int id, const TranslatableString &label, bool toggle=false)
AButton * mButtons[STBNumButtons]
void RegenerateTooltips() override
virtual ~ScrubbingToolBar()
void Create(wxWindow *parent) override
void OnButton(wxCommandEvent &event)
bool ShownByDefault() const override
Whether the toolbar should be shown by default. Default implementation returns true.
ScrubbingToolBar(AudacityProject &project)
static Identifier ID()
void Populate() override
void EnableDisableButtons() override
void UpdatePrefs() override
void Repaint(wxDC *WXUNUSED(dc)) override
static ScrubbingToolBar & Get(AudacityProject &project)
void DoRegenerateTooltips(bool force)
void OnIdle(wxIdleEvent &evt)
Works with ToolManager and ToolDock to provide a dockable window in which buttons can be placed.
Definition: ToolBar.h:74
Holds a msgid for the translation catalog; may also bind format arguments.