1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-30 07:08:39 +02:00
audacity/src/toolbars/MeterToolBar.h
lllucius fe42e881a5 First stab at taming the meter toolbars
This should correct at least a couple of the reported
issues.  And it also has some fixes in for multiple
project support.
2014-12-17 19:16:08 +00:00

72 lines
1.4 KiB
C++

/**********************************************************************
Audacity: A Digital Audio Editor
MeterToolbar.h
Dominic Mazzoni
Leland Lucius
ToolBar to hold the VU Meter
**********************************************************************/
#ifndef __AUDACITY_METER_TOOLBAR__
#define __AUDACITY_METER_TOOLBAR__
#include "ToolBar.h"
class wxDC;
class wxGridBagSizer;
class wxSizeEvent;
class wxWindow;
class Meter;
// Constants used as bit pattern
const int kWithRecordMeter = 1;
const int kWithPlayMeter = 2;
class MeterToolBar:public ToolBar {
public:
MeterToolBar(AudacityProject *project, int type);
virtual ~MeterToolBar();
void Create(wxWindow *parent);
virtual void Populate();
virtual void Repaint(wxDC * WXUNUSED(dc)) {};
virtual void EnableDisableButtons() {};
virtual void UpdatePrefs();
virtual void OnSize(wxSizeEvent & event);
virtual bool Expose( bool show );
int GetInitialWidth() {return (mWhichMeters ==
(kWithRecordMeter + kWithPlayMeter)) ? 338 : 460;} // Separate bars used to be smaller.
int GetMinToolbarWidth() { return 100; }
wxSize GetDockedSize();
private:
void OnMeterPrefsUpdated(wxCommandEvent & evt);
void RegenerateTooltips();
AudacityProject *mProject;
int mWhichMeters;
wxGridBagSizer *mSizer;
Meter *mPlayMeter;
Meter *mRecordMeter;
public:
DECLARE_CLASS(MeterToolBar);
DECLARE_EVENT_TABLE();
};
#endif