audacia/src/toolbars/ToolsToolBar.h

91 lines
1.6 KiB
C
Raw Normal View History

/**********************************************************************
Audacity: A Digital Audio Editor
2014-06-03 20:30:19 +00:00
ToolsToolBar.h
2014-06-03 20:30:19 +00:00
Dominic Mazzoni
Shane T. Mueller
Leland Lucius
**********************************************************************/
#ifndef __AUDACITY_TOOLS_TOOLBAR__
#define __AUDACITY_TOOLS_TOOLBAR__
#include <wx/defs.h>
#include "ToolBar.h"
#include "../Theme.h"
class wxCommandEvent;
class wxDC;
class wxGridSizer;
class wxImage;
class wxWindow;
class AButton;
// Code duplication warning: these apparently need to be in the
// same order as the enum in ToolsToolBar.cpp
enum {
selectTool,
envelopeTool,
drawTool,
zoomTool,
slideTool,
multiTool,
numTools,
firstTool = selectTool,
lastTool = multiTool
};
class ToolsToolBar final : public ToolBar {
public:
ToolsToolBar();
virtual ~ToolsToolBar();
void UpdatePrefs();
void OnTool(wxCommandEvent & evt);
void SetCurrentTool(int tool, bool show);
//These interrogate the state of the buttons or controls.
2017-02-22 19:23:35 +00:00
int GetCurrentTool() const;
bool IsDown(int tool) const;
int GetDownTool();
2017-02-22 19:23:35 +00:00
const wxChar * GetMessageForTool( int ToolNumber ) const;
void Populate();
void Repaint(wxDC * WXUNUSED(dc)) override {};
void EnableDisableButtons() override {};
private:
void RegenerateTooltips() override;
wxImage *MakeToolImage(wxImage *tool, wxImage *mask, int style);
AButton *MakeTool(teBmps eTool, int id, const wxChar *label);
AButton *mTool[numTools];
wxGridSizer *mToolSizer;
int mCurrentTool;
const wxChar *mMessageOfTool[numTools];
public:
2016-09-18 14:26:29 +00:00
DECLARE_CLASS(ToolsToolBar)
DECLARE_EVENT_TABLE()
};
#endif