31#include <wx/tooltip.h>
34#include <wx/gbsizer.h>
38#include "../ProjectAudioIO.h"
39#include "../widgets/MeterPanel.h"
53:
ToolBar(project, type,
XO("Combined
Meter"), wxT("CombinedMeter"), true)
57 mLabel =
XO(
"Recording Meter");
58 mSection = wxT(
"RecordMeter");
61 mLabel =
XO(
"Playback Meter");
62 mSection = wxT(
"PlayMeter");
96 return *
static_cast<MeterToolBar*
>(toolManager.GetToolBar(toolBarID));
124 projectAudioIO.SetPlaybackMeter(
nullptr );
131 projectAudioIO.SetCaptureMeter(
nullptr );
137 if( playState.mSaved ){
141 if( recordState.mSaved ){
233 width = sz.x; height = sz.y;
239 bool bHorizontal = ( width > height );
240 bool bEndToEnd = ( nMeters > 1 ) && wxMin( width, height ) < (60 * nMeters);
243 wxGBPosition pos( 0, 0 );
246 if( bHorizontal ^ bEndToEnd ){
248 pos = wxGBPosition( 1, 0 );
251 pos = wxGBPosition( 0, 1 );
259 mPlayMeter->SetMinSize( wxSize( width, height));
282 projectAudioIO.SetPlaybackMeter(
nullptr );
287 projectAudioIO.SetCaptureMeter(
nullptr );
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
AudioIO uses this to send sample buffers for real-time display updates.
std::shared_ptr< Meter > GetMeter() const
MeterPanel is a panel that paints the meter used for monitoring or playback.
void Decrease(float steps)
void Increase(float steps)
void UpdateSliderControl()
void RestoreState(const State &state)
static ProjectAudioIO & Get(AudacityProject &project)
wxColour & Colour(int iIndex)
void SetToolTip(const TranslatableString &toolTip)
void SetName(const TranslatableString &name)
void SetLabel(const TranslatableString &label)