forked from tenacityteam/tenacity-legacy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEditToolBar.h
114 lines (77 loc) · 1.91 KB
/
EditToolBar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/**********************************************************************
Audacity: A Digital Audio Editor
EditToolbar.h
Dominic Mazzoni
Shane T. Mueller
Leland Lucius
**********************************************************************/
#ifndef __AUDACITY_EDIT_TOOLBAR__
#define __AUDACITY_EDIT_TOOLBAR__
#include <wx/defs.h>
#include "ToolBar.h"
class wxCommandEvent;
class wxDC;
class wxImage;
class wxWindow;
class AButton;
enum {
ETBCutID,
ETBCopyID,
ETBPasteID,
ETBTrimID,
ETBSilenceID,
ETBUndoID,
ETBRedoID,
#ifdef EXPERIMENTAL_SYNC_LOCK
//Undefined, so no sync-lock on/off button.
//#define OPTION_SYNC_LOCK_BUTTON
#endif
#ifdef OPTION_SYNC_LOCK_BUTTON
ETBSyncLockID,
#endif
ETBZoomInID,
ETBZoomOutID,
#ifdef EXPERIMENTAL_ZOOM_TOGGLE_BUTTON
ETBZoomToggleID,
#endif
ETBZoomSelID,
ETBZoomFitID,
#if defined(EXPERIMENTAL_EFFECTS_RACK)
ETBEffectsID,
#endif
ETBNumButtons
};
const int first_ETB_ID = 11300;
// flags so 1,2,4,8 etc.
enum {
ETBActTooltips = 1,
ETBActEnableDisable = 2,
};
class EditToolBar final : public ToolBar {
public:
EditToolBar( AudacityProject &project );
virtual ~EditToolBar();
void Create(wxWindow *parent) override;
void OnButton(wxCommandEvent & event);
void Populate() override;
void Repaint(wxDC * WXUNUSED(dc)) override {};
void EnableDisableButtons() override;
void UpdatePrefs() override;
private:
static AButton *AddButton(
EditToolBar *pBar,
teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled,
int id, const TranslatableString &label, bool toggle = false);
void AddSeparator();
void MakeButtons();
void RegenerateTooltips() override;
void ForAllButtons(int Action);
AButton *mButtons[ETBNumButtons];
wxImage *upImage;
wxImage *downImage;
wxImage *hiliteImage;
public:
DECLARE_CLASS(EditToolBar)
DECLARE_EVENT_TABLE()
};
#endif