Audacity  3.0.3
Classes | Namespaces | Typedefs | Functions | Variables
WaveformView.cpp File Reference
#include "WaveformView.h"
#include "WaveformVRulerControls.h"
#include "WaveTrackView.h"
#include "WaveTrackViewConstants.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 "../../../../TrackArtist.h"
#include "../../../../TrackPanelDrawingContext.h"
#include "../../../../TrackPanelMouseEvent.h"
#include "../../../../ViewInfo.h"
#include "../../../../WaveClip.h"
#include "../../../../WaveTrack.h"
#include "../../../../prefs/WaveformSettings.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

 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, const int *bl, bool muted)
 
void anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples (TrackPanelDrawingContext &context, int leftOffset, const wxRect &rect, float zoomMin, float zoomMax, bool dB, float dBRange, const WaveClip *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 WaveClip *clip, const wxRect &rect, bool dB, bool muted)
 
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 WaveTrackSubView::Type sType
 
static WaveTrackSubViewType::RegisteredType reg { sType }
 
static const WaveTrackSubViews::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 1113 of file WaveformView.cpp.

Referenced by ToolBar::Add(), AnyTracksSelectedFlag(), AttachedVirtualFunction< Tag, Return, This, Arguments >::AttachedVirtualFunction(), AudioIOBusyFlag(), AudioIONotBusyFlag(), AudioTracksSelectedFlag(), CanStopAudioStreamFlag(), CaptureNotBusyFlag(), CutCopyAvailableFlag(), PrefsPanel::DefaultFactories(), anonymous_namespace{Menus.cpp}::MenuItemVisitor::DoBeginGroup(), anonymous_namespace{Menus.cpp}::MenuItemVisitor::DoEndGroup(), EditableTracksSelectedFlag(), EffectEqualization::ErrMin(), WaveTrackControls::GainSlider(), AudacityLogger::Get(), FileHistory::Global(), anonymous_namespace{PluginMenus.cpp}::HasLastAnalyzerFlag(), anonymous_namespace{PluginMenus.cpp}::HasLastEffectFlag(), anonymous_namespace{PluginMenus.cpp}::HasLastGeneratorFlag(), anonymous_namespace{PluginMenus.cpp}::HasLastToolFlag(), HasWaveDataFlag(), IsNotSyncLockedFlag(), anonymous_namespace{PluginMenus.cpp}::IsRealtimeNotActiveFlag(), IsSyncLockedFlag(), anonymous_namespace{LabelMenus.cpp}::LabelsSelectedFlag(), LabelTracksExistFlag(), NoAutoSelect(), NoiseReductionTimeSelectedFlag(), NoteTracksExistFlag(), NoteTracksSelectedFlag(), NotMinimizedFlag(), AttachedVirtualFunction< Tag, Return, This, Arguments >::Override< Subclass, Overridden >::Override(), WaveTrackControls::PanSlider(), PausedFlag(), PlayableTracksExistFlag(), PlayRegionLockedFlag(), PlayRegionNotLockedFlag(), ProjectSerializer::ProjectSerializer(), RedoAvailableFlag(), ScreenshotCommand::ScreenshotCommand(), ProjectSettings::SetShowId3Dialog(), EffectManager::SetSkipStateFlag(), ProjectSettings::SetSyncLock(), ProjectSettings::SetTracksFitVerticallyZoomed(), UpdateManager::Start(), PlayableTrackControls::StaticTCPLines(), StereoRequiredFlag(), TimeSelectedFlag(), TrackPanelHasFocus(), TracksExistFlag(), UndoAvailableFlag(), UnsavedChangesFlag(), EffectEqualization::UpdateDraw(), AButton::UseDisabledAsDownHiliteImage(), 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;
bool unsafe = ProjectAudioIO::Get( project ).IsAudioActive();
menu.Check( id, id == me.IdOfWaveColor( track.GetWaveColorIndex() ) );
menu.Enable( id, !unsafe );
}

Definition at line 1102 of file WaveformView.cpp.

Referenced by ProjectFileManager::AddImportedTracks(), Biquad::CalcButterworthFilter(), Biquad::CalcChebyshevType1Filter(), Biquad::CalcChebyshevType2Filter(), CommandManager::Options::CheckTest(), ProjectFileManager::Compact(), FileDialog::Create(), ExportCommand::DefineParams(), ExportMultipleDialog::DirOk(), DoImportMIDI(), ScrubbingToolBar::DoRegenerateTooltips(), AudioUnitEffect::ExportPresets(), VSTEffect::ExportPresets(), MP3Exporter::FindLibrary(), FFmpegLibs::FindLibs(), ProjectFileIO::GetCurrentUsage(), PlatformCompatibility::GetLongFileName(), GstMessageParse(), AUPImportFileHandle::HandleProject(), ProjectFileIO::HandleXMLChild(), ProjectFileManager::Import(), AudioUnitEffect::ImportPresets(), VSTEffect::ImportPresets(), EffectEqualization::LoadCurves(), VSTEffect::LoadFXB(), VSTEffect::LoadFXP(), Tags::LoadGenres(), MP3Exporter::LoadLibrary(), FFmpegLibs::LoadLibs(), VSTEffect::LoadXML(), ExportMultipleDialog::OnCreate(), TagsEditorDialog::OnEdit(), TagsEditorDialog::OnLoad(), TagsEditorDialog::OnReset(), TagsEditorDialog::OnSave(), AutoRecoveryDialog::PopulateList(), AudioUnitEffectImportDialog::PopulateOrExchange(), anonymous_namespace{AudacityApp.cpp}::PopulatePreferences(), MacroCommands::ReadMacro(), ProjectFileIO::SafetyFileName(), EffectEqualization::SaveCurves(), VSTEffect::SaveFXB(), VSTEffect::SaveFXP(), VSTEffect::SaveXML(), FileDialog::SetFileExtension(), FileDialog::SetPath(), ProjectFileIO::ShouldCompact(), MenuTable::Special(), ShuttleGuiBase::TieNumberAsChoice(), transform_container(), transform_range(), TempDirectory::UnsavedProjectFileName(), EffectEqualization::UpdateDefaultCurves(), UndoManager::VisitStates(), and MacroCommands::WriteMacro().

◆ key

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

Definition at line 1040 of file WaveformView.cpp.

◆ reg

Definition at line 42 of file WaveformView.cpp.

◆ sType

WaveTrackSubView::Type sType
static
Initial value:
{
{ wxT("Waveform"), XXO("Wa&veform") }
}

Definition at line 37 of file WaveformView.cpp.

Referenced by WaveformView::SubViewType().

WaveColorMenuTable
Definition: WaveformView.cpp:1060
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:68
WaveTrackView
Definition: WaveTrackView.h:72
ProjectAudioIO::Get
static ProjectAudioIO & Get(AudacityProject &project)
Definition: ProjectAudioIO.cpp:23
ProjectAudioIO::IsAudioActive
bool IsAudioActive() const
Definition: ProjectAudioIO.cpp:52
WaveColorMenuTable::mpData
PlayableTrackControls::InitMenuData * mpData
Definition: WaveformView.cpp:1073
XXO
#define XXO(s)
Definition: Internat.h:44
id
int id
Definition: WaveTrackControls.cpp:589
PopupMenuHandler
Definition: PopupMenuTable.h:82
WaveTrackViewConstants::Waveform
@ Waveform
Definition: WaveTrackViewConstants.h:24