Audacity 3.2.0
|
#include "WaveTrackControls.h"
#include "../../ui/PlayableTrackButtonHandles.h"
#include "WaveTrackSliderHandles.h"
#include "WaveChannelView.h"
#include "WaveChannelViewConstants.h"
#include "AudioIOBase.h"
#include "../../../../CellularPanel.h"
#include "Project.h"
#include "ProjectAudioIO.h"
#include "ProjectHistory.h"
#include "../../../../ProjectWindows.h"
#include "../../../../RefreshCode.h"
#include "ShuttleGui.h"
#include "SyncLock.h"
#include "Theme.h"
#include "../../../../TrackArtist.h"
#include "../../../../TrackPanel.h"
#include "TrackFocus.h"
#include "../../../../TrackPanelMouseEvent.h"
#include "WaveClip.h"
#include "WaveTrack.h"
#include "WaveTrackUtilities.h"
#include "RealtimeEffectManager.h"
#include "../../../../prefs/PrefsDialog.h"
#include "../../../../prefs/ThemePrefs.h"
#include "AudacityMessageBox.h"
#include "ProgressDialog.h"
#include "UserException.h"
#include "Identifier.h"
#include <wx/app.h>
#include <wx/combobox.h>
#include <wx/frame.h>
#include <wx/sizer.h>
#include "MixAndRender.h"
#include "../../../../widgets/ASlider.h"
#include "../../../ui/CommonTrackInfo.h"
#include "../../../../TrackPanelDrawingContext.h"
#include "ViewInfo.h"
Go to the source code of this file.
Classes | |
struct | FormatMenuTable |
struct | RateMenuTable |
struct | WaveTrackMenuTable |
struct | WaveTrackTCPLines |
Namespaces | |
namespace | anonymous_namespace{WaveTrackControls.cpp} |
Typedefs | |
using | anonymous_namespace{WaveTrackControls.cpp}::ValueFinder = std::function< int(WaveTrack &) > |
using | TCPLine = TrackInfo::TCPLine |
using | DoGetWaveTrackControls = DoGetControls::Override< WaveTrack > |
using | GetDefaultWaveTrackHeight = GetDefaultTrackHeight::Override< WaveChannel > |
Enumerations | |
enum | { reserveDisplays = 100 , OnRate8ID = 30000 , OnRate11ID , OnRate16ID , OnRate22ID , OnRate44ID , OnRate48ID , OnRate88ID , OnRate96ID , OnRate176ID , OnRate192ID , OnRate352ID , OnRate384ID , OnRateOtherID , On16BitID , On24BitID , OnFloatID , OnMultiViewID , OnSetDisplayId , lastDisplayId = (OnSetDisplayId + reserveDisplays - 1) , OnChannelLeftID , OnChannelRightID , OnChannelMonoID , OnMergeStereoID , OnSwapChannelsID , OnSplitStereoID , OnSplitStereoMonoID , ChannelMenuID , FirstAttachedItemId } |
Functions | |
template<typename Table > | |
PopupMenuTableEntry::InitFunction | anonymous_namespace{WaveTrackControls.cpp}::initFn (const ValueFinder &findValue) |
AppendRadioItem ("16Bit", On16BitID, GetSampleFormatStr(int16Sample), POPUP_MENU_FN(OnFormatChange), fn) | |
AppendRadioItem ("24Bit", On24BitID, GetSampleFormatStr(int24Sample), POPUP_MENU_FN(OnFormatChange), fn) | |
AppendRadioItem ("Float", OnFloatID, GetSampleFormatStr(floatSample), POPUP_MENU_FN(OnFormatChange), fn) | |
AppendCheckItem ("8000", OnRate8ID, XXO("8000 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("11025", OnRate11ID, XXO("11025 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("16000", OnRate16ID, XXO("16000 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("22050", OnRate22ID, XXO("22050 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("44100", OnRate44ID, XXO("44100 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("48000", OnRate48ID, XXO("48000 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("88200", OnRate88ID, XXO("88200 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("96000", OnRate96ID, XXO("96000 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("176400", OnRate176ID, XXO("176400 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("192000", OnRate192ID, XXO("192000 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("352800", OnRate352ID, XXO("352800 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("384000", OnRate384ID, XXO("384000 Hz"), POPUP_MENU_FN(OnRateChange), fn) | |
AppendCheckItem ("Other", OnRateOtherID, XXO("&Other..."), POPUP_MENU_FN(OnRateOther), fn) | |
static std::vector< WaveChannelSubViewType > | AllTypes () |
BeginSection ("SubViews") | |
Append (Adapt< My >([](My &table) { return(WaveChannelSubViews::numFactories() > 1) ? std::make_unique< Entry >("MultiView", Entry::CheckItem, OnMultiViewID, XXO("&Multi-view"), POPUP_MENU_FN(OnMultiView), table, [](PopupMenuHandler &handler, wxMenu &menu, int id){ auto &table=static_cast< WaveTrackMenuTable & >(handler);auto &track=table.FindWaveTrack();const auto &view=WaveChannelView::GetFirst(track);menu.Check(id, view.GetMultiView());}) :nullptr;})) | |
for (const auto &type :AllTypes()) | |
BeginSection ("Extra") | |
EndSection () | |
BeginSection ("Channels") | |
AppendItem ("MakeStereo", OnMergeStereoID, XXO("Ma&ke Stereo Track"), POPUP_MENU_FN(OnMergeStereo), [](PopupMenuHandler &handler, wxMenu &menu, int id){ bool canMakeStereo=!isUnsafe(handler) &&isMono(handler);if(canMakeStereo) { AudacityProject &project=static_cast< WaveTrackMenuTable & >(handler).mpData->project;auto &tracks=TrackList::Get(project);auto &table=static_cast< WaveTrackMenuTable & >(handler);auto &track=table.FindWaveTrack();auto next= *++tracks.Find(&track);canMakeStereo=(next &&next->NChannels()==1 &&track_cast< WaveTrack * >(next));} menu.Enable(id, canMakeStereo);}) | |
AppendItem ("Swap", OnSwapChannelsID, XXO("Swap Stereo &Channels"), POPUP_MENU_FN(OnSwapChannels), [](PopupMenuHandler &handler, wxMenu &menu, int id){ auto &track=static_cast< WaveTrackMenuTable & >(handler).FindWaveTrack();bool isStereo=2==track.NChannels();menu.Enable(id, isStereo &&!isUnsafe(handler));}) | |
AppendItem ("Split", OnSplitStereoID, XXO("Spl&it Stereo Track"), POPUP_MENU_FN(OnSplitStereo), enableSplitStereo) | |
AppendItem ("SplitToMono", OnSplitStereoMonoID, XXO("Split Stereo to Mo&no"), POPUP_MENU_FN(OnSplitStereoMono), enableSplitStereo) | |
BeginSection ("Format") | |
BeginSection ("Rate") | |
WaveTrackPopupMenuTable & | GetWaveTrackMenuTable () |
void | anonymous_namespace{WaveTrackControls.cpp}::SliderDrawFunction (LWSlider *(*Selector)(const wxRect &sliderRect, const WaveTrack *t, bool captured, wxWindow *), wxDC *dc, const wxRect &rect, const Track *pTrack, wxWindow *pParent, bool captured, bool highlight) |
void | anonymous_namespace{WaveTrackControls.cpp}::PanSliderDrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack) |
void | anonymous_namespace{WaveTrackControls.cpp}::VolumeSliderDrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack) |
DEFINE_ATTACHED_VIRTUAL_OVERRIDE (DoGetWaveTrackControls) | |
DEFINE_ATTACHED_VIRTUAL_OVERRIDE (GetDefaultWaveTrackHeight) | |
Variables | |
static const auto | fn |
const int | nRates = 12 |
static int | gRates [nRates] |
static const auto | MenuPathStart = wxT("WaveTrackMenu") |
static const auto | isMono |
static const auto | isUnsafe |
int | id = OnSetDisplayId |
static const auto | enableSplitStereo |
WaveTrackTCPLines | waveTrackTCPLines |
std::unique_ptr< LWSlider > | anonymous_namespace{WaveTrackControls.cpp}::gVolumeCaptured |
std::unique_ptr< LWSlider > | anonymous_namespace{WaveTrackControls.cpp}::gPanCaptured |
std::unique_ptr< LWSlider > | anonymous_namespace{WaveTrackControls.cpp}::gVolume |
std::unique_ptr< LWSlider > | anonymous_namespace{WaveTrackControls.cpp}::gPan |
Definition at line 1160 of file WaveTrackControls.cpp.
Definition at line 1167 of file WaveTrackControls.cpp.
using TCPLine = TrackInfo::TCPLine |
Definition at line 1003 of file WaveTrackControls.cpp.
anonymous enum |
Definition at line 101 of file WaveTrackControls.cpp.
|
static |
Definition at line 540 of file WaveTrackControls.cpp.
References WaveChannelSubViewType::All(), and reserveDisplays.
Referenced by for(), and WaveTrackMenuTable::OnSetDisplay().
Append | ( | Adapt< My > | [](My &table) { return(WaveChannelSubViews::numFactories() > 1) ? std::make_unique< Entry >("MultiView", Entry::CheckItem, OnMultiViewID, XXO("&Multi-view"), POPUP_MENU_FN(OnMultiView), table,[](PopupMenuHandler &handler, wxMenu &menu, int id){ auto &table=static_cast< WaveTrackMenuTable & >(handler);auto &track=table.FindWaveTrack();const auto &view=WaveChannelView::GetFirst(track);menu.Check(id, view.GetMultiView());}) :nullptr;} | ) |
References WaveChannelView::GetFirst(), audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::numFactories(), OnMultiViewID, POPUP_MENU_FN, and XXO().
Referenced by for(), and XMLStringWriter::Write().
AppendCheckItem | ( | "11025" | , |
OnRate11ID | , | ||
XXO("11025 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "16000" | , |
OnRate16ID | , | ||
XXO("16000 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "176400" | , |
OnRate176ID | , | ||
XXO("176400 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "192000" | , |
OnRate192ID | , | ||
XXO("192000 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "22050" | , |
OnRate22ID | , | ||
XXO("22050 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "352800" | , |
OnRate352ID | , | ||
XXO("352800 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "384000" | , |
OnRate384ID | , | ||
XXO("384000 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "44100" | , |
OnRate44ID | , | ||
XXO("44100 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "48000" | , |
OnRate48ID | , | ||
XXO("48000 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "8000" | , |
OnRate8ID | , | ||
XXO("8000 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "88200" | , |
OnRate88ID | , | ||
XXO("88200 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "96000" | , |
OnRate96ID | , | ||
XXO("96000 Hz") | , | ||
POPUP_MENU_FN(OnRateChange) | , | ||
fn | |||
) |
AppendCheckItem | ( | "Other" | , |
OnRateOtherID | , | ||
XXO("&Other...") | , | ||
POPUP_MENU_FN(OnRateOther) | , | ||
fn | |||
) |
AppendItem | ( | "MakeStereo" | , |
OnMergeStereoID | , | ||
XXO("Ma&ke Stereo Track") | , | ||
POPUP_MENU_FN(OnMergeStereo) | , | ||
[] (PopupMenuHandler &handler, wxMenu &menu, int id){ bool canMakeStereo=!isUnsafe(handler) &&isMono(handler);if(canMakeStereo) { AudacityProject &project=static_cast< WaveTrackMenuTable & >(handler).mpData->project;auto &tracks=TrackList::Get(project);auto &table=static_cast< WaveTrackMenuTable & >(handler);auto &track=table.FindWaveTrack();auto next= *++tracks.Find(&track);canMakeStereo=(next &&next->NChannels()==1 &&track_cast< WaveTrack * >(next));} menu.Enable(id, canMakeStereo);} | |||
) |
References TrackList::Get(), audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, isMono, isUnsafe, project, and tracks.
AppendItem | ( | "Split" | , |
OnSplitStereoID | , | ||
XXO("Spl&it Stereo Track") | , | ||
POPUP_MENU_FN(OnSplitStereo) | , | ||
enableSplitStereo | |||
) |
AppendItem | ( | "SplitToMono" | , |
OnSplitStereoMonoID | , | ||
XXO("Split Stereo to Mo&no") | , | ||
POPUP_MENU_FN(OnSplitStereoMono) | , | ||
enableSplitStereo | |||
) |
AppendItem | ( | "Swap" | , |
OnSwapChannelsID | , | ||
XXO("Swap Stereo &Channels") | , | ||
POPUP_MENU_FN(OnSwapChannels) | , | ||
[] (PopupMenuHandler &handler, wxMenu &menu, int id){ auto &track=static_cast< WaveTrackMenuTable & >(handler).FindWaveTrack();bool isStereo=2==track.NChannels();menu.Enable(id, isStereo &&!isUnsafe(handler));} | |||
) |
References audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, isUnsafe, and WaveTrack::NChannels().
AppendRadioItem | ( | "16Bit" | , |
On16BitID | , | ||
GetSampleFormatStr(int16Sample) | , | ||
POPUP_MENU_FN(OnFormatChange) | , | ||
fn | |||
) |
AppendRadioItem | ( | "24Bit" | , |
On24BitID | , | ||
GetSampleFormatStr(int24Sample) | , | ||
POPUP_MENU_FN(OnFormatChange) | , | ||
fn | |||
) |
AppendRadioItem | ( | "Float" | , |
OnFloatID | , | ||
GetSampleFormatStr(floatSample) | , | ||
POPUP_MENU_FN(OnFormatChange) | , | ||
fn | |||
) |
BeginSection | ( | "Channels" | ) |
BeginSection | ( | "Extra" | ) |
BeginSection | ( | "Format" | ) |
BeginSection | ( | "Rate" | ) |
BeginSection | ( | "SubViews" | ) |
DEFINE_ATTACHED_VIRTUAL_OVERRIDE | ( | DoGetWaveTrackControls | ) |
Definition at line 1161 of file WaveTrackControls.cpp.
References Track::SharedPointer().
DEFINE_ATTACHED_VIRTUAL_OVERRIDE | ( | GetDefaultWaveTrackHeight | ) |
Definition at line 1168 of file WaveTrackControls.cpp.
References WaveTrackControls::DefaultWaveTrackHeight().
EndSection | ( | ) |
for | ( | const auto &type | :AllTypes() | ) |
Definition at line 589 of file WaveTrackControls.cpp.
References AllTypes(), Append(), details::begin(), details::end(), WaveChannelView::GetFirst(), audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, id, anonymous_namespace{WaveTrackControls.cpp}::initFn(), OnSetDisplayId, and POPUP_MENU_FN.
WaveTrackPopupMenuTable & GetWaveTrackMenuTable | ( | ) |
Definition at line 938 of file WaveTrackControls.cpp.
References WaveTrackMenuTable::Instance().
|
static |
Definition at line 670 of file WaveTrackControls.cpp.
|
static |
Definition at line 197 of file WaveTrackControls.cpp.
|
static |
gRates MUST CORRESPOND DIRECTLY TO THE RATES AS LISTED IN THE MENU!! IN THE SAME ORDER!!
Definition at line 366 of file WaveTrackControls.cpp.
Referenced by RateMenuTable::IdOfRate(), and RateMenuTable::OnRateChange().
int id = OnSetDisplayId |
Definition at line 588 of file WaveTrackControls.cpp.
Referenced by TranscriptionToolBar::AddButton(), SelectionBar::AddTime(), MacrosWindow::ChangeOK(), audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::CollectHashes(), PluginManager::ConvertID(), PluginManager::CreatePlugin(), CreateStdButtonSizer(), CurrentSettingsGroup(), ProjectSerializer::Decode(), anonymous_namespace{PluginHost.cpp}::Discover(), SqliteSampleBlockFactory::DoCreateFromId(), SqliteSampleBlockFactory::DoCreateSilent(), DistortionBase::DoLoadFactoryPreset(), PendingTracks::DoSubstituteOriginalChannel(), PendingTracks::DoSubstitutePendingChangedChannel(), PluginManager::DropFile(), FactoryDefaultsGroup(), for(), EffectDefinitionInterface::GetSquashedName(), CommandManager::HandleMenuID(), ShuttleGui::Id(), anonymous_namespace{WaveTrackControls.cpp}::initFn(), ModuleManager::InitializeBuiltins(), AudacityApp::InitPart2(), ReverbBase::LoadFactoryPreset(), EffectCompressor::LoadFactoryPreset(), EffectLimiter::LoadFactoryPreset(), AudioUnitInstance::MakeMessage(), ToolBarButtons::OnButton(), WaveTrackMenuTable::OnSetDisplay(), AudioUnitUtils::ParameterNameInfo::ParameterNameInfo(), anonymous_namespace{VST3Wrapper.cpp}::ParametersFromString(), anonymous_namespace{VST3Wrapper.cpp}::ComponentHandler::performEdit(), Scrubber::PopulatePopupMenu(), ToolBarButtons::PopUp(), ToolBarButtons::PushDown(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Importer::raw_get_length(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Importer::raw_get_pos(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Importer::raw_push_back_byte(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Importer::raw_read_bytes(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Importer::raw_set_pos_rel(), AudioSetupToolBar::Choices::Set(), SingleInputParameterValue::Set(), ToolBarButtons::SetEnabled(), RealtimeEffectState::SetID(), Track::SetId(), LWSlider::SetId(), TEST_CASE(), DirectoriesPrefs::Validate(), audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::VisitBlocks(), VST3Editor::VST3Editor(), VSTMessage::VSTMessage(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Exporter::WriteBlock(), WavPackExportProcessor::WriteBlock(), and ProjectSerializer::WriteName().
|
static |
Definition at line 552 of file WaveTrackControls.cpp.
Referenced by AppendItem().
|
static |
Definition at line 559 of file WaveTrackControls.cpp.
Referenced by AppendItem().
|
static |
Definition at line 495 of file WaveTrackControls.cpp.
Referenced by WaveTrackControls::GetMenuExtension(), MenuRegistry::ItemRegistry::Registry(), and MenuRegistry::Visit().
const int nRates = 12 |
Definition at line 362 of file WaveTrackControls.cpp.
Referenced by RateMenuTable::IdOfRate().
|
static |