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