Audacity 3.2.0
ToolsToolBar.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5
6 ToolsToolBar.h
7
8 Dominic Mazzoni
9 Shane T. Mueller
10 Leland Lucius
11
12**********************************************************************/
13
14#ifndef __AUDACITY_TOOLS_TOOLBAR__
15#define __AUDACITY_TOOLS_TOOLBAR__
16
17#include <wx/defs.h>
18
19#include "Observer.h"
20#include "ToolBar.h"
21
22class wxCommandEvent;
23class wxDC;
24class wxGridSizer;
25class wxImage;
26class wxWindow;
27
28class AButton;
29class AudacityProject;
31
32// Code duplication warning: these apparently need to be in the
33// same order as the enum in ToolsToolBar.cpp
34
35const int FirstToolID = 11200;
36
37class ToolsToolBar final : public ToolBar {
38
39 public:
40 static Identifier ID();
41
43 virtual ~ToolsToolBar();
44
46 static const ToolsToolBar &Get( const AudacityProject &project );
47
48 void UpdatePrefs() override;
49
50 void OnTool(wxCommandEvent & evt);
52 void DoToolChanged();
53
54 void Populate() override;
55 void Repaint(wxDC * WXUNUSED(dc)) override {};
56 void EnableDisableButtons() override {};
57
58 private:
59
60 void Create(wxWindow * parent) override;
61 void RegenerateTooltips() override;
63 static AButton *MakeTool(
64 ToolsToolBar *pBar, teBmps eTool, int id, const TranslatableString &label);
65 enum { numTools = 4 };
66
69 wxGridSizer *mToolSizer;
71
72 public:
73
74 DECLARE_CLASS(ToolsToolBar)
75 DECLARE_EVENT_TABLE()
76};
77
78#endif
79
wxImage(22, 22)
int teBmps
TranslatableString label
Definition: TagsEditor.cpp:165
const auto project
const int FirstToolID
Definition: ToolsToolBar.h:35
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
A move-only handle representing a connection to a Publisher.
Definition: Observer.h:70
Works with ToolManager and ToolDock to provide a dockable window in which buttons can be placed.
Definition: ToolBar.h:74
A kind of ToolBar with Tools on it.
Definition: ToolsToolBar.h:37
wxImage * MakeToolImage(wxImage *tool, wxImage *mask, int style)
void Repaint(wxDC *WXUNUSED(dc)) override
Definition: ToolsToolBar.h:55
void UpdatePrefs() override
static AButton * MakeTool(ToolsToolBar *pBar, teBmps eTool, int id, const TranslatableString &label)
void RegenerateTooltips() override
static Identifier ID()
void DoToolChanged()
wxGridSizer * mToolSizer
Definition: ToolsToolBar.h:69
AButton * mTool[numTools]
Definition: ToolsToolBar.h:68
ToolsToolBar(AudacityProject &project)
void Create(wxWindow *parent) override
void OnTool(wxCommandEvent &evt)
static ToolsToolBar & Get(AudacityProject &project)
void EnableDisableButtons() override
Definition: ToolsToolBar.h:56
void Populate() override
virtual ~ToolsToolBar()
void OnToolChanged(ProjectSettingsEvent)
Observer::Subscription mSubscription
Definition: ToolsToolBar.h:67
Holds a msgid for the translation catalog; may also bind format arguments.