1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 00:20:06 +02:00
audacity/src/toolbars/EditToolBar.h
James Crook adc7312954 Auto-Select off by default.
I've implemented three states for what to do if no selection:
0 - Grey out (no longer used)
1 - Auto-select
2 - Give the warning message and try again.
2017-06-09 19:40:28 +01:00

114 lines
1.8 KiB
C++

/**********************************************************************
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"
#include "../Theme.h"
#include "../Experimental.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,
#if 0 // Disabled for version 1.2.0 since it doesn't work quite right...
ETBZoomToggleID,
#endif
ETBZoomSelID,
ETBZoomFitID,
#if defined(EXPERIMENTAL_EFFECTS_RACK)
ETBEffectsID,
#endif
ETBNumButtons
};
// flags so 1,2,4,8 etc.
enum {
ETBActTooltips = 1,
ETBActEnableDisable = 2,
};
class EditToolBar final : public ToolBar {
public:
EditToolBar();
virtual ~EditToolBar();
void Create(wxWindow *parent);
void OnButton(wxCommandEvent & event);
void Populate();
void Repaint(wxDC * WXUNUSED(dc)) {};
void EnableDisableButtons();
void UpdatePrefs();
private:
AButton *AddButton(teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled,
int id, const wxChar *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