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 "ToolBar.h"
20
21class wxCommandEvent;
22class wxDC;
23class wxGridSizer;
24class wxImage;
25class wxWindow;
26
27class AButton;
28class AudacityProject;
29
30// Code duplication warning: these apparently need to be in the
31// same order as the enum in ToolsToolBar.cpp
32
33const int FirstToolID = 11200;
34
35class ToolsToolBar final : public ToolBar {
36
37 public:
38 static Identifier ID();
39
40 ToolsToolBar( AudacityProject &project );
41 virtual ~ToolsToolBar();
42
43 static ToolsToolBar &Get( AudacityProject &project );
44 static const ToolsToolBar &Get( const AudacityProject &project );
45
46 void UpdatePrefs() override;
47
48 void OnTool(wxCommandEvent & evt);
49 void OnToolChanged(wxCommandEvent &evt);
50 void DoToolChanged();
51
52 void Populate() override;
53 void Repaint(wxDC * WXUNUSED(dc)) override {};
54 void EnableDisableButtons() override {};
55
56 private:
57
58 void Create(wxWindow * parent) override;
59 void RegenerateTooltips() override;
60 wxImage *MakeToolImage(wxImage *tool, wxImage *mask, int style);
61 static AButton *MakeTool(
62 ToolsToolBar *pBar, teBmps eTool, int id, const TranslatableString &label);
63 enum { numTools = 4 };
65 wxGridSizer *mToolSizer;
67
68 public:
69
70 DECLARE_CLASS(ToolsToolBar)
71 DECLARE_EVENT_TABLE()
72};
73
74#endif
75
wxImage(22, 22)
int teBmps
TranslatableString label
Definition: TagsEditor.cpp:164
const int FirstToolID
Definition: ToolsToolBar.h:33
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
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:35
wxImage * MakeToolImage(wxImage *tool, wxImage *mask, int style)
void Repaint(wxDC *WXUNUSED(dc)) override
Definition: ToolsToolBar.h:53
void UpdatePrefs() override
static AButton * MakeTool(ToolsToolBar *pBar, teBmps eTool, int id, const TranslatableString &label)
void RegenerateTooltips() override
static Identifier ID()
void DoToolChanged()
void OnToolChanged(wxCommandEvent &evt)
wxGridSizer * mToolSizer
Definition: ToolsToolBar.h:65
AButton * mTool[numTools]
Definition: ToolsToolBar.h:64
ToolsToolBar(AudacityProject &project)
void Create(wxWindow *parent) override
void OnTool(wxCommandEvent &evt)
static ToolsToolBar & Get(AudacityProject &project)
void EnableDisableButtons() override
Definition: ToolsToolBar.h:54
void Populate() override
virtual ~ToolsToolBar()
Holds a msgid for the translation catalog; may also bind format arguments.