1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 16:40:07 +02:00
audacity/src/toolbars/MeterToolBar.h
james.k.crook@gmail.com 51be26b49b Restore default meter size.
The meters are back to the length they used to be (with a little space lost for the grabber).  If we want to increase their default lengths then we should look at the space saver idea (make them less tall) or else widen the initial size of Audacity main screen.
2014-10-26 14:42:25 +00:00

81 lines
1.6 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(int WhichMeters);
virtual ~MeterToolBar();
void Create(wxWindow *parent);
bool DestroyChildren();
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 : 165;}
int GetMinToolbarWidth() { return 100; }
private:
void OnMeterPrefsUpdated(wxCommandEvent & evt);
void RegenerateTooltips();
int mWhichMeters;
wxGridBagSizer *mSizer;
Meter *mPlayMeter;
Meter *mRecordMeter;
public:
DECLARE_CLASS(MeterToolBar);
DECLARE_EVENT_TABLE();
};
namespace MeterToolBars {
void AddMeters(Meter *playMeter, Meter *recordMeter);
void RemoveMeters(Meter *playMeter, Meter *recordMeter);
void GetMeters(Meter **playMeter, Meter **recordMeter);
void StartMonitoring();
void Clear();
//Meter *mPlayMeter;
//Meter *mRecordMeter;
};
#endif