Audacity 3.2.0
Classes | Namespaces | Typedefs | Functions | Variables
WaveformView.cpp File Reference
#include "WaveformView.h"
#include "ClipParameters.h"
#include "WaveChannelView.h"
#include "WaveChannelViewConstants.h"
#include "WaveformCache.h"
#include "WaveformVRulerControls.h"
#include "SampleHandle.h"
#include "../../../ui/EnvelopeHandle.h"
#include "../../../ui/TimeShiftHandle.h"
#include "AColor.h"
#include "Envelope.h"
#include "../../../../EnvelopeEditor.h"
#include "../../../../ProjectSettings.h"
#include "SelectedRegion.h"
#include "SyncLock.h"
#include "../../../../TrackArt.h"
#include "../../../../TrackArtist.h"
#include "../../../../TrackPanelDrawingContext.h"
#include "../../../../TrackPanelMouseEvent.h"
#include "ViewInfo.h"
#include "WaveClip.h"
#include "WaveTrack.h"
#include "../../../../WaveTrackLocation.h"
#include "../../../../prefs/WaveformSettings.h"
#include "FrameStatistics.h"
#include <wx/graphics.h>
#include <wx/dc.h>
#include <mutex>
#include "WaveTrackControls.h"
#include "../../../../widgets/PopupMenuTable.h"
#include "ProjectAudioIO.h"
#include "ProjectHistory.h"
#include "../../../../RefreshCode.h"
Include dependency graph for WaveformView.cpp:

Go to the source code of this file.

Classes

struct  anonymous_namespace{WaveformView.cpp}::WavePortion
 
struct  WaveColorMenuTable
 

Namespaces

namespace  anonymous_namespace{WaveformView.cpp}
 

Typedefs

using anonymous_namespace{WaveformView.cpp}::ValueFinder = std::function< int(WaveTrack &) >
 

Functions

void anonymous_namespace{WaveformView.cpp}::DrawWaveformBackground (TrackPanelDrawingContext &context, int leftOffset, const wxRect &rect, const double env[], float zoomMin, float zoomMax, int zeroLevelYCoordinate, bool dB, float dBRange, double t0, double t1, bool bIsSyncLockSelected, bool highlightEnvelope)
 
void anonymous_namespace{WaveformView.cpp}::FindWavePortions (std::vector< WavePortion > &portions, const wxRect &rect, const ZoomInfo &zoomInfo, const ClipParameters &params)
 
void anonymous_namespace{WaveformView.cpp}::DrawMinMaxRMS (TrackPanelDrawingContext &context, const wxRect &rect, const double env[], float zoomMin, float zoomMax, bool dB, float dBRange, const float *min, const float *max, const float *rms, bool muted)
 
void anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples (TrackPanelDrawingContext &context, int leftOffset, const wxRect &rect, float zoomMin, float zoomMax, bool dB, float dBRange, const WaveChannelInterval &clip, bool showPoints, bool muted, bool highlight)
 
void anonymous_namespace{WaveformView.cpp}::DrawEnvLine (TrackPanelDrawingContext &context, const wxRect &rect, int x0, int y0, int cy, bool top)
 
void anonymous_namespace{WaveformView.cpp}::DrawEnvelope (TrackPanelDrawingContext &context, const wxRect &rect, const double env[], float zoomMin, float zoomMax, bool dB, float dBRange, bool highlight)
 
void anonymous_namespace{WaveformView.cpp}::DrawClipWaveform (TrackPanelDrawingContext &context, const WaveTrack &track, const WaveChannelInterval &clip, const wxRect &rect, bool dB, bool muted, bool selected)
 
void anonymous_namespace{WaveformView.cpp}::DrawTimeSlider (TrackPanelDrawingContext &context, const wxRect &rect, bool rightwards, bool highlight)
 
const TranslatableString anonymous_namespace{WaveformView.cpp}::GetWaveColorStr (int colorIndex)
 
 AppendRadioItem ("Instrument1", OnInstrument1ID, GetWaveColorStr(0), POPUP_MENU_FN(OnWaveColorChange), fn)
 
 AppendRadioItem ("Instrument2", OnInstrument2ID, GetWaveColorStr(1), POPUP_MENU_FN(OnWaveColorChange), fn)
 
 AppendRadioItem ("Instrument3", OnInstrument3ID, GetWaveColorStr(2), POPUP_MENU_FN(OnWaveColorChange), fn)
 
 AppendRadioItem ("Instrument4", OnInstrument4ID, GetWaveColorStr(3), POPUP_MENU_FN(OnWaveColorChange), fn)
 

Variables

static WaveChannelSubView::Type sType
 
static WaveChannelSubViewType::RegisteredType reg { sType }
 
static const WaveChannelSubViews::RegisteredFactory key
 
static const auto fn
 
static std::once_flag flag
 
PopupMenuTable::AttachedItem anonymous_namespace{WaveformView.cpp}::sAttachment
 

Function Documentation

◆ AppendRadioItem() [1/4]

AppendRadioItem ( "Instrument1"  ,
OnInstrument1ID  ,
GetWaveColorStr(0)  ,
POPUP_MENU_FN(OnWaveColorChange)  ,
fn   
)

Referenced by for().

Here is the caller graph for this function:

◆ AppendRadioItem() [2/4]

AppendRadioItem ( "Instrument2"  ,
OnInstrument2ID  ,
GetWaveColorStr(1)  ,
POPUP_MENU_FN(OnWaveColorChange)  ,
fn   
)

◆ AppendRadioItem() [3/4]

AppendRadioItem ( "Instrument3"  ,
OnInstrument3ID  ,
GetWaveColorStr(2)  ,
POPUP_MENU_FN(OnWaveColorChange)  ,
fn   
)

◆ AppendRadioItem() [4/4]

AppendRadioItem ( "Instrument4"  ,
OnInstrument4ID  ,
GetWaveColorStr(3)  ,
POPUP_MENU_FN(OnWaveColorChange)  ,
fn   
)

Variable Documentation

◆ flag

std::once_flag flag
static

Definition at line 1096 of file WaveformView.cpp.

Referenced by ToolBar::Add(), AnyTracksSelectedFlag(), AudioIOBusyFlag(), AudioIONotBusyFlag(), Journal::Events::anonymous_namespace{JournalEvents.cpp}::ByCode(), Journal::Events::anonymous_namespace{JournalEvents.cpp}::ByType(), CanStopAudioStreamFlag(), CaptureNotBusyFlag(), anonymous_namespace{EditMenus.cpp}::CutCopyAvailableFlag(), PrefsPanel::DefaultFactories(), CommandManager::Populator::DoBeginGroup(), CommandManager::Populator::DoEndGroup(), EditableTracksSelectedFlag(), EqualizationBandSliders::ErrMin(), WaveTrackControls::GainSlider(), AudacityLogger::Get(), FileHistory::Global(), anonymous_namespace{PluginMenus.cpp}::HasLastAnalyzerFlag(), anonymous_namespace{PluginMenus.cpp}::HasLastEffectFlag(), anonymous_namespace{PluginMenus.cpp}::HasLastGeneratorFlag(), anonymous_namespace{BatchProcessDialog.cpp}::HasLastToolFlag(), anonymous_namespace{PluginMenus.cpp}::HasTrackFocusFlag(), HasWaveDataFlag(), Importer::Initialize(), IsNotSyncLockedFlag(), anonymous_namespace{PluginMenus.cpp}::IsRealtimeNotActiveFlag(), IsSyncLockedFlag(), anonymous_namespace{EditMenus.cpp}::JoinClipsAvailableFlag(), anonymous_namespace{LabelMenus.cpp}::LabelsSelectedFlag(), LabelTracksExistFlag(), NoAutoSelect(), NoiseReductionTimeSelectedFlag(), anonymous_namespace{ExportMIDI.cpp}::NoteTracksExistFlag(), NotMinimizedFlag(), RealtimeEffectListWindow::OnEffectListItemChange(), AttachedVirtualFunction< Tag, Return, This, Arguments >::Override< Subclass, Overridden >::Override(), WaveTrackControls::PanSlider(), PausedFlag(), anonymous_namespace{MixerBoard.cpp}::PlayableTracksExistFlag(), ProjectSerializer::ProjectSerializer(), RedoAvailableFlag(), EffectManager::SetSkipStateFlag(), SyncLockState::SetSyncLock(), anonymous_namespace{WaveTrackAffordanceControls.cpp}::SomeClipIsSelectedFlag(), UpdateManager::Start(), PlayableTrackControls::StaticNoteTCPLines(), PlayableTrackControls::StaticWaveTCPLines(), StereoRequiredFlag(), anonymous_namespace{WaveTrackAffordanceControls.cpp}::StretchedClipIsSelectedFlag(), TimeSelectedFlag(), TrackPanelHasFocus(), TracksExistFlag(), UndoAvailableFlag(), EqualizationUI::UpdateDraw(), AButton::UseDisabledAsDownHiliteImage(), DirectoriesPrefs::Validate(), TrackIterRange< TrackType >::VisitWhile(), WaveTracksExistFlag(), WaveTracksSelectedFlag(), ZoomInAvailableFlag(), and ZoomOutAvailableFlag().

◆ fn

const auto fn
static
Initial value:
= []( PopupMenuHandler &handler, wxMenu &menu, int id ){
auto &me = static_cast<WaveColorMenuTable&>( handler );
auto pData = me.mpData;
const auto &track = *static_cast<WaveTrack*>(pData->pTrack);
auto &project = pData->project;
menu.Check( id, id == me.IdOfWaveColor( track.GetWaveColorIndex() ) );
menu.Enable( id, !unsafe );
}
const auto project
int id
bool IsAudioActive() const
static ProjectAudioIO & Get(AudacityProject &project)
A Track that contains audio waveform data.
Definition: WaveTrack.h:227
PlayableTrackControls::InitMenuData * mpData

Definition at line 1085 of file WaveformView.cpp.

Referenced by staffpad::TimeAndPitch::_time_stretch(), ProjectFileManager::AddImportedTracks(), XMLMethodRegistry< Host >::AttributeReaderEntries::AttributeReaderEntries(), XMLMethodRegistry< Host >::AttributeWriterEntry::AttributeWriterEntry(), Biquad::CalcButterworthFilter(), Biquad::CalcChebyshevType1Filter(), Biquad::CalcChebyshevType2Filter(), GlobalHook< Tag, Signature, Default, Options >::Call(), XMLMethodRegistryBase::CallAttributeWriters(), XMLMethodRegistryBase::CallObjectAccessor(), XMLMethodRegistryBase::CallObjectWriters(), Journal::Events::anonymous_namespace{JournalEvents.cpp}::Type::checkDeserializer(), MenuRegistry::Options::CheckTest(), ProjectFileManager::Compact(), FileDialog::Create(), anonymous_namespace{ImportMIDI.cpp}::DoImportMIDI(), AudioUnitEffect::ExportPresets(), VSTEffect::ExportPresets(), MP3Exporter::FindLibrary(), for_each_in_range(), SpectrumView::ForAll(), ProjectFileIO::GetCurrentUsage(), PlatformCompatibility::GetLongFileName(), AUPImportFileHandle::HandleProject(), ProjectFileManager::Import(), AudioUnitEffect::ImportPresets(), VSTEffect::ImportPresetsNC(), EQCurveReader::LoadCurves(), VSTWrapper::LoadFXB(), VSTWrapper::LoadFXP(), Tags::LoadGenres(), MP3Exporter::LoadLibrary(), VSTWrapper::LoadXML(), Journal::Events::anonymous_namespace{JournalEvents.cpp}::Type::makeSerializer(), NotifyingSelectedRegion::Mutators(), XMLMethodRegistry< Host >::ObjectReaderEntry::ObjectReaderEntry(), XMLMethodRegistry< Host >::ObjectWriterEntry::ObjectWriterEntry(), TagsEditorDialog::OnEdit(), TagsEditorDialog::OnLoad(), TagsEditorDialog::OnReset(), TagsEditorDialog::OnSave(), TypeSwitch::detail::Invoker< R, Exec, ObjectTypes >::operator()(), AudioUnitCleaner< T, fn >::operator()(), AutoRecoveryDialog::PopulateList(), anonymous_namespace{AudacityApp.cpp}::PopulatePreferences(), MacroCommands::ReadMacro(), LadspaInstance::RealtimeResume(), LadspaInstance::RealtimeSuspend(), ProjectFileIO::SafetyFileName(), EQCurveWriter::SaveCurves(), VSTWrapper::SaveFXB(), VSTWrapper::SaveFXP(), VSTWrapper::SaveXML(), FileDialog::SetFileExtension(), FileDialog::SetPath(), ProjectFileIO::ShouldCompact(), ShuttleGuiBase::TieNumberAsChoice(), transform_container(), transform_range(), TempDirectory::UnsavedProjectFileName(), EQCurveReader::UpdateDefaultCurves(), Registry::VisitorFunctions< RegistryTraits, Reference >::Visit(), ExportCommand::VisitSettings(), UndoManager::VisitStates(), MacroCommands::WriteMacro(), and Viewport::ZoomFitVertically().

◆ key

Initial value:
{
[](WaveChannelView &view) {
return std::make_shared<WaveformView>( view );
}
}

Definition at line 1028 of file WaveformView.cpp.

◆ reg

Definition at line 49 of file WaveformView.cpp.

◆ sType

Initial value:
{
{ wxT("Waveform"), XXO("Wa&veform") }
}
wxT("CloseDown"))
XXO("&Cut/Copy/Paste Toolbar")

Definition at line 44 of file WaveformView.cpp.

Referenced by WaveformView::SubViewType().