Audacity  3.0.3
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
WaveTrackControls.cpp File Reference
#include "WaveTrackControls.h"
#include "../../ui/PlayableTrackButtonHandles.h"
#include "WaveTrackSliderHandles.h"
#include "WaveTrackView.h"
#include "WaveTrackViewConstants.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 "../../../../TrackArtist.h"
#include "../../../../TrackPanel.h"
#include "../../../../TrackPanelAx.h"
#include "../../../../TrackPanelMouseEvent.h"
#include "../../../../WaveTrack.h"
#include "../../../../effects/RealtimeEffectManager.h"
#include "../../../../prefs/PrefsDialog.h"
#include "../../../../prefs/ThemePrefs.h"
#include "../../../../widgets/AudacityMessageBox.h"
#include "widgets/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 "../../../../widgets/ASlider.h"
#include "../../../../TrackInfo.h"
#include "../../../../TrackPanelDrawingContext.h"
#include "ViewInfo.h"
Include dependency graph for WaveTrackControls.cpp:

Go to the source code of this file.

Classes

struct  FormatMenuTable
 
struct  RateMenuTable
 
struct  WaveTrackMenuTable
 
struct  WaveTrackTCPLines
 

Namespaces

 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< WaveTrack >
 

Enumerations

enum  {
  IndicatorSmallWidth = 9, IndicatorMediumWidth = 13, IndicatorOffset = 1, TopMargin = 1,
  BottomMargin = 2, LeftMargin = 1, RightMargin = 1, ID_QUIT_AUDACITY = 10000,
  ID_DISCARD_SELECTED, ID_RECOVER_SELECTED, ID_SKIP, ID_FILE_LIST,
  AddButtonID = 10000, RemoveButtonID, RenameButtonID, RestoreButtonID,
  ImportButtonID, ExportButtonID, SaveButtonID, DefaultsButtonID,
  InsertButtonID, EditButtonID, DeleteButtonID, UpButtonID,
  DownButtonID, ApplyToProjectButtonID = ApplyToProjectID, ApplyToFilesButtonID = ApplyToFilesID, RunID = 1000,
  BSaveID, ClearID, StaticTextID, BlockSizeID,
  DataSizeID, NumEditsID, RandSeedID, kCommands,
  kMenus, kPreferences, kTracks, kClips,
  kEnvelopes, kLabels, kBoxes, nTypes,
  kJson, kLisp, kBrief, nFormats,
  FileListID = 6000, CopySelectedFilesButtonID, CopyNamesToClipboardID, FutureActionChoiceID,
  ID_Amp = 10000, ID_Peak, ID_Clip, ID_Bass = 10000,
  ID_Treble, ID_Gain, ID_Link, ID_PercentChange = 10000,
  ID_Multiplier, ID_FromVinyl, ID_ToVinyl, ID_ToLength,
  ID_Thresh = 10000, ID_Width, ID_Threshold = 10000, ID_NoiseFloor,
  ID_Ratio, ID_Attack, ID_Decay, ID_BUTTON_USECURRENTF = 10001,
  ID_BUTTON_USECURRENTB, ID_BUTTON_EXPORT, ID_BUTTON_RESET, ID_FOREGROUNDSTART_T,
  ID_FOREGROUNDEND_T, ID_BACKGROUNDSTART_T, ID_BACKGROUNDEND_T, ID_FOREGROUNDDB_TEXT,
  ID_BACKGROUNDDB_TEXT, ID_RESULTS_TEXT, ID_RESULTSDB_TEXT, ID_Sequence,
  ID_Amplitude, ID_Duration, ID_DutyCycle, ID_Length = 10000,
  ID_dBMax, ID_dBMin, ID_Clear, ID_Invert,
  ID_Mode, ID_Draw, ID_Graphic, ID_Interp,
  ID_Linear, ID_Grid, ID_Curve, ID_Manage,
  ID_Delete, ID_Slider, ID_Duration = 20000, ID_Toggles = 21000,
  ID_Sliders = 22000, ID_Texts = 23000, ID_Duration = 10000, ID_Triggers = 11000,
  ID_Toggles = 12000, ID_Sliders = 13000, ID_Choices = 14000, ID_Texts = 15000,
  ID_TIMER = 20000, ID_BUTTON_GETPROFILE = 10001, ID_RADIOBUTTON_KEEPSIGNAL, ID_RADIOBUTTON_RESIDUE,
  ID_GAIN_SLIDER, ID_GAIN_TEXT, ID_NEW_SENSITIVITY_SLIDER, ID_NEW_SENSITIVITY_TEXT,
  ID_FREQ_SLIDER, ID_FREQ_TEXT, END_OF_BASIC_SLIDERS, END_OF_SLIDERS = END_OF_BASIC_SLIDERS,
  FIRST_SLIDER = ID_GAIN_SLIDER, ID_BUTTON_GETPROFILE = 10001, ID_BUTTON_LEAVENOISE, ID_RADIOBUTTON_KEEPSIGNAL,
  ID_RADIOBUTTON_KEEPNOISE, ID_SENSITIVITY_SLIDER, ID_GAIN_SLIDER, ID_FREQ_SLIDER,
  ID_TIME_SLIDER, ID_SENSITIVITY_TEXT, ID_GAIN_TEXT, ID_FREQ_TEXT,
  ID_TIME_TEXT, ID_Editor = 10000, ID_Load, ID_Save,
  ID_Slider = 11000, ID_Choice = 13000, ID_FILE = 15000, ID_Stages = 10000,
  ID_DryWet, ID_Freq, ID_Phase, ID_Depth,
  ID_Feedback, ID_OutGain, ID_RoomSize = 10000, ID_PreDelay,
  ID_Reverberance, ID_HfDamping, ID_ToneLow, ID_ToneHigh,
  ID_WetGain, ID_DryGain, ID_StereoWidth, ID_WetOnly,
  SBSMSOutBlockSize = 512, ID_FilterPanel = 10000, ID_dBMax, ID_dBMin,
  ID_Type, ID_SubType, ID_Order, ID_Ripple,
  ID_Cutoff, ID_StopbandRipple, ID_RatePercentChangeStart = 10000, ID_RatePercentChangeEnd,
  ID_PitchHalfStepsStart, ID_PitchHalfStepsEnd, ID_PitchPercentChangeStart, ID_PitchPercentChangeEnd,
  ID_Program = 10000, ID_Sliders = 11000, ID_Choices = 12000, ID_Texts = 13000,
  ID_Toggles = 14000, ID_Duration = 20000, ID_Sliders = 21000, ID_Freq = 10000,
  ID_Phase, ID_Depth, ID_Res, ID_FreqOfs,
  ID_OutGain, ID_MIXERPANEL = 10001, ID_SLIDER_CHANNEL, QUALITY_2 = 2,
  PRESET_INSANE = 0, PRESET_EXTREME = 1, PRESET_STANDARD = 2, PRESET_MEDIUM = 3,
  FormatID = 10001, OptionsID, DirID, CreateID,
  ChooseID, LabelID, FirstID, FirstFileNameID,
  TrackID, ByNameAndNumberID, ByNameID, ByNumberID,
  PrefixID, OverwriteID, FirstID = 7000, FreqZoomSliderID,
  FreqPanScrollerID, FreqExportButtonID, FreqAlgChoiceID, FreqSizeChoiceID,
  FreqFuncChoiceID, FreqAxisChoiceID, ReplotButtonID, GridOnOffID,
  ID_AVAIL = 1000, ID_FILESIZE, ID_TOTAL, ID_LEVELS,
  ID_DISCARD, ID_DISCARD_CLIPBOARD, ID_COMPACT, ChoiceID = 9000,
  PlayID, DetectID, ID_INSERTA = 11000, ID_INSERTB,
  ID_REMOVE, ID_IMPORT, ID_EXPORT, LoggerID_Save = wxID_HIGHEST + 1,
  LoggerID_Clear, LoggerID_Close, kID_RadioButton_BouncingBall = 10101, kID_RadioButton_Highlight,
  ID_BITMAPBUTTON_MUSICAL_INSTRUMENT = 13000, ID_SLIDER_PAN, ID_SLIDER_GAIN, ID_TOGGLEBUTTON_MUTE,
  ID_TOGGLEBUTTON_SOLO, kModuleDisabled = 0, kModuleEnabled = 1, kModuleAsk = 2,
  kModuleFailed = 3, kModuleNew = 4, STATE_Enabled, STATE_Disabled,
  STATE_New, STATE_COUNT, HostID = 10000, PlayID,
  RecordID, ChannelsID, ToolColumn, ActionColumn,
  ButtonsColumn, CommentColumn, UseCustomTrackNameID = 1000, ID_WINDOW_SIZE = 10001,
  ID_WINDOW_TYPE, ID_PADDING_SIZE, ID_SCALE, ID_ALGORITHM,
  ID_MINIMUM, ID_MAXIMUM, ID_GAIN, ID_RANGE,
  ID_FREQUENCY_GAIN, ID_COLOR_SCHEME, ID_SPECTRAL_SELECTION, ID_DEFAULTS,
  ID_DEFAULTS = 10001, ID_SCALE, ID_RANGE, FSCKstatus_CLOSE_REQ = 0x1,
  FSCKstatus_CHANGED = 0x2, FSCKstatus_SAVE_AUP = 0x4, SNAP_OFF, SNAP_NEAREST,
  SNAP_PRIOR, FirstID = 1000, HSBarID, VSBarID,
  NextID, FFT_SinCosBRTable, FFT_SinCosTableVBR16, FFT_SinCosTableBR16,
  FFT_FastMathBR16, FFT_FastMathBR24, IdMainWindowSmall = 19200, IdMainWindowLarge,
  IdDirectory, IdDirChoose, IdOneSec, IdTenSec,
  IdOneMin, IdFiveMin, IdOneHour, IdShortTracks,
  IdMedTracks, IdTallTracks, IdDelayCheckBox, IdCaptureFirst,
  IdCaptureEffects = IdCaptureFirst, IdCaptureScriptables, IdCapturePreferences, IdCaptureToolbars,
  IdAllDelayedEvents, IdCaptureWindowContents =IdAllDelayedEvents, IdCaptureFullWindow, IdCaptureWindowPlus,
  IdCaptureFullScreen, IdCaptureSelectionBar, IdCaptureSpectralSelection, IdCaptureTimer,
  IdCaptureTools, IdCaptureTransport, IdCaptureMixer, IdCaptureMeter,
  IdCapturePlayMeter, IdCaptureRecordMeter, IdCaptureEdit, IdCaptureDevice,
  IdCaptureTranscription, IdCaptureScrub, IdCaptureTrackPanel, IdCaptureRuler,
  IdCaptureTracks, IdCaptureFirstTrack, IdCaptureSecondTrack, IdCaptureLast = IdCaptureSecondTrack,
  IdLastDelayedEvent, IdToggleBackgroundBlue, IdToggleBackgroundWhite, eOkButton = 0x0001,
  eCancelButton = 0x0002, eYesButton = 0x0004, eNoButton = 0x0008, eHelpButton = 0x0010,
  ePreviewButton = 0x0020, eDebugButton = 0x0040, eSettingsButton = 0x0080, ePreviewDryButton = 0x0100,
  eApplyButton = 0x0200, eCloseButton = 0x0400, DontShowID =1000, ID_DATEPICKER_START = 10000,
  ID_TIMETEXT_START, ID_DATEPICKER_END, ID_TIMETEXT_END, ID_TIMETEXT_DURATION,
  ID_AUTOSAVEPATH_BUTTON, ID_AUTOSAVEPATH_TEXT, ID_AUTOEXPORTPATH_BUTTON, ID_AUTOEXPORTPATH_TEXT,
  ID_AUTOSAVE_CHECKBOX, ID_AUTOEXPORT_CHECKBOX, POST_TIMER_RECORD_STOPPED = -3, POST_TIMER_RECORD_CANCEL_WAIT,
  POST_TIMER_RECORD_CANCEL, POST_TIMER_RECORD_NOTHING = 0, POST_TIMER_RECORD_CLOSE, ETBCutID,
  ETBCopyID, ETBPasteID, ETBTrimID, ETBSilenceID,
  ETBUndoID, ETBRedoID, ETBZoomInID, ETBZoomOutID,
  ETBZoomSelID, ETBZoomFitID, ETBNumButtons, STBScrubID,
  STBSeekID, STBRulerID, STBNumButtons, STBFirstButton = STBScrubID,
  SelectionBarFirstID = 2700, RateID, SnapToID, OnMenuID,
  ChoiceID, StartTimeID, LengthTimeID, CenterTimeID,
  EndTimeID, AudioTimeID, TimeBarFirstID = 2800, AudioPositionID,
  ToolBarFloatMargin = 1, NoDockID = 0, TopDockID, BotDockID,
  DockCount = 2, TTB_PlaySpeed, TTB_PlaySpeedSlider, TTBNumButtons,
  @0::kTimerInterval = 50, kAffordancesAreaHeight = 18, kTopInset = 4, kTopMargin = kTopInset + kBorderThickness,
  kBottomMargin = kShadowThickness + kBorderThickness, kTrackSeparatorThickness = kBottomMargin + kTopMargin, kChannelSeparatorThickness = 1, OnSetFontID = 30000,
  OnCutSelectedTextID = 1, OnCopySelectedTextID, OnPasteSelectedTextID, OnDeleteSelectedLabelID,
  OnEditSelectedLabelID, OnUpOctaveID = 30000, OnDownOctaveID, OnZoomFitVerticalID = 20000,
  OnZoomResetID, OnZoomDiv2ID, OnZoomTimes2ID, OnZoomHalfWaveID,
  OnZoomInVerticalID, OnZoomOutVerticalID, OnZoomMaxID, OnUpOctaveID,
  OnDownOctaveID, 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, OnZoomFitVerticalID = 20000, OnZoomResetID,
  OnZoomDiv2ID, OnZoomTimes2ID, OnZoomHalfWaveID, OnZoomInVerticalID,
  OnZoomOutVerticalID, OnFirstWaveformScaleID, OnLastWaveformScaleID = OnFirstWaveformScaleID + 9, OnFirstSpectrumScaleID,
  OnLastSpectrumScaleID = OnFirstSpectrumScaleID + 19, OnTimeTrackLinID = 30000, OnTimeTrackLogID, OnTimeTrackLogIntID,
  OnSetTimeTrackRangeID, SELECTION_RESIZE_REGION = 3, FREQ_SNAP_DISTANCE = 10, OnSetNameID = 2000,
  OnMoveUpID, OnMoveDownID, OnMoveTopID, OnMoveBottomID,
  SCRUBBING_PIXEL_TOLERANCE = 10, kOneSecondCountdown = 1000 / ScrubPollInterval_ms, SELECTION_RESIZE_REGION = 3, FREQ_SNAP_DISTANCE = 10,
  ID_TIMER = wxID_HIGHEST + 1, DontShowID = wxID_HIGHEST + 1, kToggleButtonID = 5000, kTimerID,
  OnMeterUpdateID = 6000, OnMonitorID, OnPreferencesID, AV_FRAME_CROP_UNALIGNED = 1 << 0,
  AV_FRAME_CROP_UNALIGNED = 1 << 0, MAX_HFFT = 10, kVerticalPadding = 7, kBorderThickness = 1,
  kShadowThickness = 1, kLeftInset = 4, kRightInset = kLeftInset, kLeftMargin = kLeftInset + kBorderThickness,
  kRightMargin = kRightInset + kShadowThickness + kBorderThickness, kTrackInfoWidth = 100 - kLeftMargin, ID_AUTOLOAD = 20000, ID_AUTOWRAP,
  ID_FONT, ID_SPLITV, ID_SPLITH, ID_TOGGLECODE,
  ID_TOGGLEOUTPUT, ID_SMALLICONS, ID_LARGEICONS, ID_MATCH,
  ID_TOP, ID_UP, ID_PREVIOUS, ID_NEXT,
  ID_GO, ID_STOP, ID_SCRIPT, ID_OUTPUT
}
 

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< WaveTrackSubViewTypeAllTypes ()
 
 BeginSection ("SubViews")
 
 Append ([](My &table) -> Registry::BaseItemPtr { if(WaveTrackSubViews::slots() > 1) return 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=WaveTrackView::Get(track);menu.Check(id, view.GetMultiView());});else return 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 &&TrackList::Channels(next).size()==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==TrackList::Channels(&track).size();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")
 
WaveTrackPopupMenuTableGetWaveTrackMenuTable ()
 
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}::GainSliderDrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
 
void anonymous_namespace{WaveTrackControls.cpp}::StatusDrawFunction (const TranslatableString &string, wxDC *dc, const wxRect &rect)
 
void anonymous_namespace{WaveTrackControls.cpp}::Status1DrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
 
void anonymous_namespace{WaveTrackControls.cpp}::Status2DrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
 
 DEFINE_ATTACHED_VIRTUAL_OVERRIDE (DoGetWaveTrackControls)
 

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< LWSlideranonymous_namespace{WaveTrackControls.cpp}::gGainCaptured
 
std::unique_ptr< LWSlideranonymous_namespace{WaveTrackControls.cpp}::gPanCaptured
 
std::unique_ptr< LWSlideranonymous_namespace{WaveTrackControls.cpp}::gGain
 
std::unique_ptr< LWSlideranonymous_namespace{WaveTrackControls.cpp}::gPan
 

Typedef Documentation

◆ DoGetWaveTrackControls

Definition at line 1242 of file WaveTrackControls.cpp.

◆ GetDefaultWaveTrackHeight

Definition at line 1249 of file WaveTrackControls.cpp.

◆ TCPLine

Definition at line 1071 of file WaveTrackControls.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
IndicatorSmallWidth 
IndicatorMediumWidth 
IndicatorOffset 
TopMargin 
BottomMargin 
LeftMargin 
RightMargin 
ID_QUIT_AUDACITY 
ID_DISCARD_SELECTED 
ID_RECOVER_SELECTED 
ID_SKIP 
ID_FILE_LIST 
AddButtonID 
RemoveButtonID 
RenameButtonID 
RestoreButtonID 
ImportButtonID 
ExportButtonID 
SaveButtonID 
DefaultsButtonID 
InsertButtonID 
EditButtonID 
DeleteButtonID 
UpButtonID 
DownButtonID 
ApplyToProjectButtonID 
ApplyToFilesButtonID 
RunID 
BSaveID 
ClearID 
StaticTextID 
BlockSizeID 
DataSizeID 
NumEditsID 
RandSeedID 
kCommands 
kMenus 
kPreferences 
kTracks 
kClips 
kEnvelopes 
kLabels 
kBoxes 
nTypes 
kJson 
kLisp 
kBrief 
nFormats 
FileListID 
CopySelectedFilesButtonID 
CopyNamesToClipboardID 
FutureActionChoiceID 
ID_Amp 
ID_Peak 
ID_Clip 
ID_Bass 
ID_Treble 
ID_Gain 
ID_Link 
ID_PercentChange 
ID_Multiplier 
ID_FromVinyl 
ID_ToVinyl 
ID_ToLength 
ID_Thresh 
ID_Width 
ID_Threshold 
ID_NoiseFloor 
ID_Ratio 
ID_Attack 
ID_Decay 
ID_BUTTON_USECURRENTF 
ID_BUTTON_USECURRENTB 
ID_BUTTON_EXPORT 
ID_BUTTON_RESET 
ID_FOREGROUNDSTART_T 
ID_FOREGROUNDEND_T 
ID_BACKGROUNDSTART_T 
ID_BACKGROUNDEND_T 
ID_FOREGROUNDDB_TEXT 
ID_BACKGROUNDDB_TEXT 
ID_RESULTS_TEXT 
ID_RESULTSDB_TEXT 
ID_Sequence 
ID_Amplitude 
ID_Duration 
ID_DutyCycle 
ID_Length 
ID_dBMax 
ID_dBMin 
ID_Clear 
ID_Invert 
ID_Mode 
ID_Draw 
ID_Graphic 
ID_Interp 
ID_Linear 
ID_Grid 
ID_Curve 
ID_Manage 
ID_Delete 
ID_Slider 
ID_Duration 
ID_Toggles 
ID_Sliders 
ID_Texts 
ID_Duration 
ID_Triggers 
ID_Toggles 
ID_Sliders 
ID_Choices 
ID_Texts 
ID_TIMER 
ID_BUTTON_GETPROFILE 
ID_RADIOBUTTON_KEEPSIGNAL 
ID_RADIOBUTTON_RESIDUE 
ID_GAIN_SLIDER 
ID_GAIN_TEXT 
ID_NEW_SENSITIVITY_SLIDER 
ID_NEW_SENSITIVITY_TEXT 
ID_FREQ_SLIDER 
ID_FREQ_TEXT 
END_OF_BASIC_SLIDERS 
END_OF_SLIDERS 
FIRST_SLIDER 
ID_BUTTON_GETPROFILE 
ID_BUTTON_LEAVENOISE 
ID_RADIOBUTTON_KEEPSIGNAL 
ID_RADIOBUTTON_KEEPNOISE 
ID_SENSITIVITY_SLIDER 
ID_GAIN_SLIDER 
ID_FREQ_SLIDER 
ID_TIME_SLIDER 
ID_SENSITIVITY_TEXT 
ID_GAIN_TEXT 
ID_FREQ_TEXT 
ID_TIME_TEXT 
ID_Editor 
ID_Load 
ID_Save 
ID_Slider 
ID_Choice 
ID_FILE 
ID_Stages 
ID_DryWet 
ID_Freq 
ID_Phase 
ID_Depth 
ID_Feedback 
ID_OutGain 
ID_RoomSize 
ID_PreDelay 
ID_Reverberance 
ID_HfDamping 
ID_ToneLow 
ID_ToneHigh 
ID_WetGain 
ID_DryGain 
ID_StereoWidth 
ID_WetOnly 
SBSMSOutBlockSize 
ID_FilterPanel 
ID_dBMax 
ID_dBMin 
ID_Type 
ID_SubType 
ID_Order 
ID_Ripple 
ID_Cutoff 
ID_StopbandRipple 
ID_RatePercentChangeStart 
ID_RatePercentChangeEnd 
ID_PitchHalfStepsStart 
ID_PitchHalfStepsEnd 
ID_PitchPercentChangeStart 
ID_PitchPercentChangeEnd 
ID_Program 
ID_Sliders 
ID_Choices 
ID_Texts 
ID_Toggles 
ID_Duration 
ID_Sliders 
ID_Freq 
ID_Phase 
ID_Depth 
ID_Res 
ID_FreqOfs 
ID_OutGain 
ID_MIXERPANEL 
ID_SLIDER_CHANNEL 
QUALITY_2 
PRESET_INSANE 
PRESET_EXTREME 
PRESET_STANDARD 
PRESET_MEDIUM 
FormatID 
OptionsID 
DirID 
CreateID 
ChooseID 
LabelID 
FirstID 
FirstFileNameID 
TrackID 
ByNameAndNumberID 
ByNameID 
ByNumberID 
PrefixID 
OverwriteID 
FirstID 
FreqZoomSliderID 
FreqPanScrollerID 
FreqExportButtonID 
FreqAlgChoiceID 
FreqSizeChoiceID 
FreqFuncChoiceID 
FreqAxisChoiceID 
ReplotButtonID 
GridOnOffID 
ID_AVAIL 
ID_FILESIZE 
ID_TOTAL 
ID_LEVELS 
ID_DISCARD 
ID_DISCARD_CLIPBOARD 
ID_COMPACT 
ChoiceID 
PlayID 
DetectID 
ID_INSERTA 
ID_INSERTB 
ID_REMOVE 
ID_IMPORT 
ID_EXPORT 
LoggerID_Save 
LoggerID_Clear 
LoggerID_Close 
kID_RadioButton_BouncingBall 
kID_RadioButton_Highlight 
ID_BITMAPBUTTON_MUSICAL_INSTRUMENT 
ID_SLIDER_PAN 
ID_SLIDER_GAIN 
ID_TOGGLEBUTTON_MUTE 
ID_TOGGLEBUTTON_SOLO 
kModuleDisabled 
kModuleEnabled 
kModuleAsk 
kModuleFailed 
kModuleNew 
STATE_Enabled 
STATE_Disabled 
STATE_New 
STATE_COUNT 
HostID 
PlayID 
RecordID 
ChannelsID 
ToolColumn 
ActionColumn 
ButtonsColumn 
CommentColumn 
UseCustomTrackNameID 
ID_WINDOW_SIZE 
ID_WINDOW_TYPE 
ID_PADDING_SIZE 
ID_SCALE 
ID_ALGORITHM 
ID_MINIMUM 
ID_MAXIMUM 
ID_GAIN 
ID_RANGE 
ID_FREQUENCY_GAIN 
ID_COLOR_SCHEME 
ID_SPECTRAL_SELECTION 
ID_DEFAULTS 
ID_DEFAULTS 
ID_SCALE 
ID_RANGE 
FSCKstatus_CLOSE_REQ 
FSCKstatus_CHANGED 
FSCKstatus_SAVE_AUP 
SNAP_OFF 
SNAP_NEAREST 
SNAP_PRIOR 
FirstID 
HSBarID 
VSBarID 
NextID 
FFT_SinCosBRTable 
FFT_SinCosTableVBR16 
FFT_SinCosTableBR16 
FFT_FastMathBR16 
FFT_FastMathBR24 
IdMainWindowSmall 
IdMainWindowLarge 
IdDirectory 
IdDirChoose 
IdOneSec 
IdTenSec 
IdOneMin 
IdFiveMin 
IdOneHour 
IdShortTracks 
IdMedTracks 
IdTallTracks 
IdDelayCheckBox 
IdCaptureFirst 
IdCaptureEffects 
IdCaptureScriptables 
IdCapturePreferences 
IdCaptureToolbars 
IdAllDelayedEvents 
IdCaptureWindowContents 
IdCaptureFullWindow 
IdCaptureWindowPlus 
IdCaptureFullScreen 
IdCaptureSelectionBar 
IdCaptureSpectralSelection 
IdCaptureTimer 
IdCaptureTools 
IdCaptureTransport 
IdCaptureMixer 
IdCaptureMeter 
IdCapturePlayMeter 
IdCaptureRecordMeter 
IdCaptureEdit 
IdCaptureDevice 
IdCaptureTranscription 
IdCaptureScrub 
IdCaptureTrackPanel 
IdCaptureRuler 
IdCaptureTracks 
IdCaptureFirstTrack 
IdCaptureSecondTrack 
IdCaptureLast 
IdLastDelayedEvent 
IdToggleBackgroundBlue 
IdToggleBackgroundWhite 
eOkButton 
eCancelButton 
eYesButton 
eNoButton 
eHelpButton 
ePreviewButton 
eDebugButton 
eSettingsButton 
ePreviewDryButton 
eApplyButton 
eCloseButton 
DontShowID 
ID_DATEPICKER_START 
ID_TIMETEXT_START 
ID_DATEPICKER_END 
ID_TIMETEXT_END 
ID_TIMETEXT_DURATION 
ID_AUTOSAVEPATH_BUTTON 
ID_AUTOSAVEPATH_TEXT 
ID_AUTOEXPORTPATH_BUTTON 
ID_AUTOEXPORTPATH_TEXT 
ID_AUTOSAVE_CHECKBOX 
ID_AUTOEXPORT_CHECKBOX 
POST_TIMER_RECORD_STOPPED 
POST_TIMER_RECORD_CANCEL_WAIT 
POST_TIMER_RECORD_CANCEL 
POST_TIMER_RECORD_NOTHING 
POST_TIMER_RECORD_CLOSE 
ETBCutID 
ETBCopyID 
ETBPasteID 
ETBTrimID 
ETBSilenceID 
ETBUndoID 
ETBRedoID 
ETBZoomInID 
ETBZoomOutID 
ETBZoomSelID 
ETBZoomFitID 
ETBNumButtons 
STBScrubID 
STBSeekID 
STBRulerID 
STBNumButtons 
STBFirstButton 
SelectionBarFirstID 
RateID 
SnapToID 
OnMenuID 
ChoiceID 
StartTimeID 
LengthTimeID 
CenterTimeID 
EndTimeID 
AudioTimeID 
TimeBarFirstID 
AudioPositionID 
ToolBarFloatMargin 
NoDockID 
TopDockID 
BotDockID 
DockCount 
TTB_PlaySpeed 
TTB_PlaySpeedSlider 
TTBNumButtons 
kTimerInterval 
kAffordancesAreaHeight 
kTopInset 
kTopMargin 
kBottomMargin 
kTrackSeparatorThickness 
kChannelSeparatorThickness 
OnSetFontID 
OnCutSelectedTextID 
OnCopySelectedTextID 
OnPasteSelectedTextID 
OnDeleteSelectedLabelID 
OnEditSelectedLabelID 
OnUpOctaveID 
OnDownOctaveID 
OnZoomFitVerticalID 
OnZoomResetID 
OnZoomDiv2ID 
OnZoomTimes2ID 
OnZoomHalfWaveID 
OnZoomInVerticalID 
OnZoomOutVerticalID 
OnZoomMaxID 
OnUpOctaveID 
OnDownOctaveID 
reserveDisplays 
OnRate8ID 
OnRate11ID 
OnRate16ID 
OnRate22ID 
OnRate44ID 
OnRate48ID 
OnRate88ID 
OnRate96ID 
OnRate176ID 
OnRate192ID 
OnRate352ID 
OnRate384ID 
OnRateOtherID 
On16BitID 
On24BitID 
OnFloatID 
OnMultiViewID 
OnSetDisplayId 
lastDisplayId 
OnChannelLeftID 
OnChannelRightID 
OnChannelMonoID 
OnMergeStereoID 
OnSwapChannelsID 
OnSplitStereoID 
OnSplitStereoMonoID 
ChannelMenuID 
FirstAttachedItemId 
OnZoomFitVerticalID 
OnZoomResetID 
OnZoomDiv2ID 
OnZoomTimes2ID 
OnZoomHalfWaveID 
OnZoomInVerticalID 
OnZoomOutVerticalID 
OnFirstWaveformScaleID 
OnLastWaveformScaleID 
OnFirstSpectrumScaleID 
OnLastSpectrumScaleID 
OnTimeTrackLinID 
OnTimeTrackLogID 
OnTimeTrackLogIntID 
OnSetTimeTrackRangeID 
SELECTION_RESIZE_REGION 
FREQ_SNAP_DISTANCE 
OnSetNameID 
OnMoveUpID 
OnMoveDownID 
OnMoveTopID 
OnMoveBottomID 
SCRUBBING_PIXEL_TOLERANCE 
kOneSecondCountdown 
SELECTION_RESIZE_REGION 
FREQ_SNAP_DISTANCE 
ID_TIMER 
DontShowID 
kToggleButtonID 
kTimerID 
OnMeterUpdateID 
OnMonitorID 
OnPreferencesID 
AV_FRAME_CROP_UNALIGNED 
AV_FRAME_CROP_UNALIGNED 
MAX_HFFT 
kVerticalPadding 

Width of padding below each channel group

kBorderThickness 
kShadowThickness 
kLeftInset 
kRightInset 
kLeftMargin 
kRightMargin 
kTrackInfoWidth 
ID_AUTOLOAD 
ID_AUTOWRAP 
ID_FONT 
ID_SPLITV 
ID_SPLITH 
ID_TOGGLECODE 
ID_TOGGLEOUTPUT 
ID_SMALLICONS 
ID_LARGEICONS 
ID_MATCH 
ID_TOP 
ID_UP 
ID_PREVIOUS 
ID_NEXT 
ID_GO 
ID_STOP 
ID_SCRIPT 
ID_OUTPUT 

Definition at line 94 of file WaveTrackControls.cpp.

94  {
95  reserveDisplays = 100,
96 
97  OnRate8ID = 30000, // <---
98  OnRate11ID, // |
99  OnRate16ID, // |
100  OnRate22ID, // |
101  OnRate44ID, // |
102  OnRate48ID, // | Leave these in order
103  OnRate88ID, // |
104  OnRate96ID, // |
105  OnRate176ID, // |
106  OnRate192ID, // |
107  OnRate352ID, // |
108  OnRate384ID, // |
109  OnRateOtherID, // |
110  // |
111  On16BitID, // |
112  On24BitID, // |
113  OnFloatID, // <---
114 
116 
118 
122 
124 
128 
130 
131  // Range of ids for registered items -- keep this last!
133 };

Function Documentation

◆ AllTypes()

static std::vector<WaveTrackSubViewType> AllTypes ( )
static

Definition at line 529 of file WaveTrackControls.cpp.

530 {
531  auto result = WaveTrackSubViewType::All();
532  if ( result.size() > reserveDisplays ) {
533  wxASSERT( false );
534  result.resize( reserveDisplays );
535  }
536  return result;
537 }

References WaveTrackSubViewType::All(), and reserveDisplays.

Referenced by for(), and WaveTrackMenuTable::OnSetDisplay().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Append()

Append ( [] (My &table) -> Registry::BaseItemPtr { if(WaveTrackSubViews::slots() > 1) return 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=WaveTrackView::Get(track);menu.Check(id, view.GetMultiView());});else return nullptr;}  )

References PopupMenuTableEntry::CheckItem, WaveTrackView::Get(), OnMultiViewID, POPUP_MENU_FN, ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::slots(), and XXO.

Referenced by ComputedPopupMenuTable< WaveTrackMenuTable, WaveTrackPopupMenuTable >::Append(), XMLStringWriter::Write(), and MyFLACFile::write_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AppendCheckItem() [1/13]

AppendCheckItem ( "11025"  ,
OnRate11ID  ,
XXO("11025 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [2/13]

AppendCheckItem ( "16000"  ,
OnRate16ID  ,
XXO("16000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [3/13]

AppendCheckItem ( "176400"  ,
OnRate176ID  ,
XXO("176400 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [4/13]

AppendCheckItem ( "192000"  ,
OnRate192ID  ,
XXO("192000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [5/13]

AppendCheckItem ( "22050"  ,
OnRate22ID  ,
XXO("22050 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [6/13]

AppendCheckItem ( "352800"  ,
OnRate352ID  ,
XXO("352800 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [7/13]

AppendCheckItem ( "384000"  ,
OnRate384ID  ,
XXO("384000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [8/13]

AppendCheckItem ( "44100"  ,
OnRate44ID  ,
XXO("44100 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [9/13]

AppendCheckItem ( "48000"  ,
OnRate48ID  ,
XXO("48000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [10/13]

AppendCheckItem ( "8000"  ,
OnRate8ID  ,
XXO("8000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [11/13]

AppendCheckItem ( "88200"  ,
OnRate88ID  ,
XXO("88200 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [12/13]

AppendCheckItem ( "96000"  ,
OnRate96ID  ,
XXO("96000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [13/13]

AppendCheckItem ( "Other"  ,
OnRateOtherID  ,
XXO("&Other...")  ,
POPUP_MENU_FN(OnRateOther)  ,
fn   
)

◆ AppendItem() [1/4]

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 &&TrackList::Channels(next).size()==1 &&track_cast< WaveTrack * >(next));} menu.Enable(id, canMakeStereo);}   
)

References TrackList::Channels(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Find(), TrackList::Get(), isMono, isUnsafe, FormatMenuTable::mpData, and CommonTrackControls::InitMenuData::project.

Here is the call graph for this function:

◆ AppendItem() [2/4]

AppendItem ( "Split"  ,
OnSplitStereoID  ,
XXO("Spl&it Stereo Track")  ,
POPUP_MENU_FN(OnSplitStereo)  ,
enableSplitStereo   
)

◆ AppendItem() [3/4]

AppendItem ( "SplitToMono"  ,
OnSplitStereoMonoID  ,
XXO("Split Stereo to Mo&no")  ,
POPUP_MENU_FN(OnSplitStereoMono)  ,
enableSplitStereo   
)

◆ AppendItem() [4/4]

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==TrackList::Channels(&track).size();menu.Enable(id, isStereo &&!isUnsafe(handler));}   
)

References TrackList::Channels(), and isUnsafe.

Here is the call graph for this function:

◆ AppendRadioItem() [1/3]

AppendRadioItem ( "16Bit"  ,
On16BitID  ,
GetSampleFormatStr(int16Sample ,
POPUP_MENU_FN(OnFormatChange)  ,
fn   
)

◆ AppendRadioItem() [2/3]

AppendRadioItem ( "24Bit"  ,
On24BitID  ,
GetSampleFormatStr(int24Sample ,
POPUP_MENU_FN(OnFormatChange)  ,
fn   
)

◆ AppendRadioItem() [3/3]

AppendRadioItem ( "Float"  ,
OnFloatID  ,
GetSampleFormatStr(floatSample ,
POPUP_MENU_FN(OnFormatChange)  ,
fn   
)

◆ BeginSection() [1/5]

BeginSection ( "Channels"  )

◆ BeginSection() [2/5]

BeginSection ( "Extra"  )

◆ BeginSection() [3/5]

BeginSection ( "Format"  )

◆ BeginSection() [4/5]

BeginSection ( "Rate"  )

◆ BeginSection() [5/5]

BeginSection ( "SubViews"  )

◆ DEFINE_ATTACHED_VIRTUAL_OVERRIDE()

DEFINE_ATTACHED_VIRTUAL_OVERRIDE ( DoGetWaveTrackControls  )

Definition at line 1243 of file WaveTrackControls.cpp.

1243  {
1244  return [](WaveTrack &track) {
1245  return std::make_shared<WaveTrackControls>( track.SharedPointer() );
1246  };
1247 }

References Track::SharedPointer().

Here is the call graph for this function:

◆ EndSection()

EndSection ( )

◆ for()

for ( const auto &type   :AllTypes())

Definition at line 578 of file WaveTrackControls.cpp.

578  : AllTypes() ) {
579  static const auto initFn = []( bool radio ){ return
580  [radio]( PopupMenuHandler &handler, wxMenu &menu, int id ){
581  // Find all known sub-view types
582  const auto allTypes = AllTypes();
583 
584  // How to convert a type to a menu item id
585  const auto IdForType =
586  [&allTypes]( const WaveTrackSubViewType &type ) -> int {
587  const auto begin = allTypes.begin();
588  return OnSetDisplayId +
589  (std::find( begin, allTypes.end(), type ) - begin);
590  };
591 
592  auto &table = static_cast< WaveTrackMenuTable& >( handler );
593  auto &track = table.FindWaveTrack();
594 
595  const auto &view = WaveTrackView::Get( track );
596 
597  const auto displays = view.GetDisplays();
598  const auto end = displays.end();
599  bool check = (end !=
600  std::find_if( displays.begin(), end,
601  [&]( const WaveTrackSubViewType &type ){
602  return id == IdForType( type ); } ) );
603  menu.Check( id, check );
604 
605  // Bug2275 residual
606  // Disable the checking-off of the only sub-view
607  if ( !radio && displays.size() == 1 && check )
608  menu.Enable( id, false );
609  };
610  };
611  Append( [type, id]( My &table ) -> Registry::BaseItemPtr {
612  const auto pTrack = &table.FindWaveTrack();
613  const auto &view = WaveTrackView::Get( *pTrack );
614  const auto itemType =
615  view.GetMultiView() ? Entry::CheckItem : Entry::RadioItem;
616  return std::make_unique<Entry>( type.name.Internal(), itemType,
617  id, type.name.Msgid(),
618  POPUP_MENU_FN( OnSetDisplay ), table,
619  initFn( !view.GetMultiView() ) );
620  } );
621  ++id;
622  }

References AllTypes(), PopupMenuTable::Append(), PopupMenuTableEntry::CheckItem, WaveTrackView::Get(), id, anonymous_namespace{WaveTrackControls.cpp}::initFn(), OnSetDisplayId, POPUP_MENU_FN, and PopupMenuTableEntry::RadioItem.

Here is the call graph for this function:

◆ GetWaveTrackMenuTable()

WaveTrackPopupMenuTable& GetWaveTrackMenuTable ( )

Definition at line 960 of file WaveTrackControls.cpp.

961 {
963 }

References WaveTrackMenuTable::Instance().

Here is the call graph for this function:

Variable Documentation

◆ enableSplitStereo

const auto enableSplitStereo
static
Initial value:
=
[]( PopupMenuHandler &handler, wxMenu &menu, int id ){
menu.Enable( id, !isMono( handler ) && !isUnsafe( handler ) );
}

Definition at line 682 of file WaveTrackControls.cpp.

◆ fn

static const auto fn
static
Initial value:
= initFn< FormatMenuTable >(
[]( WaveTrack &track ){
return IdOfFormat( track.GetSampleFormat() );
}
)

Definition at line 190 of file WaveTrackControls.cpp.

◆ gRates

int gRates[nRates]
static
Initial value:
= { 8000, 11025, 16000, 22050, 44100, 48000, 88200, 96000,
176400, 192000, 352800, 384000 }

gRates MUST CORRESPOND DIRECTLY TO THE RATES AS LISTED IN THE MENU!! IN THE SAME ORDER!!

Definition at line 359 of file WaveTrackControls.cpp.

Referenced by RateMenuTable::IdOfRate(), and RateMenuTable::OnRateChange().

◆ id

int id = OnSetDisplayId

◆ isMono

const auto isMono
static
Initial value:
=
[]( PopupMenuHandler &handler ) -> bool {
auto &track =
static_cast< WaveTrackMenuTable& >( handler ).FindWaveTrack();
return 1 == TrackList::Channels( &track ).size();
}

Definition at line 541 of file WaveTrackControls.cpp.

Referenced by AppendItem().

◆ isUnsafe

const auto isUnsafe
static
Initial value:
=
[]( PopupMenuHandler &handler ) -> bool {
auto &project =
static_cast< WaveTrackMenuTable& >( handler ).mpData->project;
}

Definition at line 548 of file WaveTrackControls.cpp.

Referenced by AppendItem().

◆ MenuPathStart

const auto MenuPathStart = wxT("WaveTrackMenu")
static

◆ nRates

const int nRates = 12

Definition at line 355 of file WaveTrackControls.cpp.

Referenced by RateMenuTable::IdOfRate().

◆ waveTrackTCPLines

WaveTrackTCPLines waveTrackTCPLines
static
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:69
OnRate352ID
@ OnRate352ID
Definition: WaveTrackControls.cpp:107
OnRate176ID
@ OnRate176ID
Definition: WaveTrackControls.cpp:105
OnChannelRightID
@ OnChannelRightID
Definition: WaveTrackControls.cpp:120
OnRate11ID
@ OnRate11ID
Definition: WaveTrackControls.cpp:98
OnRateOtherID
@ OnRateOtherID
Definition: WaveTrackControls.cpp:109
OnSplitStereoMonoID
@ OnSplitStereoMonoID
Definition: WaveTrackControls.cpp:127
TrackList::Channels
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1484
OnFloatID
@ OnFloatID
Definition: WaveTrackControls.cpp:113
On24BitID
@ On24BitID
Definition: WaveTrackControls.cpp:112
OnChannelMonoID
@ OnChannelMonoID
Definition: WaveTrackControls.cpp:121
On16BitID
@ On16BitID
Definition: WaveTrackControls.cpp:111
OnSplitStereoID
@ OnSplitStereoID
Definition: WaveTrackControls.cpp:126
AllTypes
static std::vector< WaveTrackSubViewType > AllTypes()
Definition: WaveTrackControls.cpp:529
OnRate384ID
@ OnRate384ID
Definition: WaveTrackControls.cpp:108
OnRate8ID
@ OnRate8ID
Definition: WaveTrackControls.cpp:97
lastDisplayId
@ lastDisplayId
Definition: WaveTrackControls.cpp:117
OnMergeStereoID
@ OnMergeStereoID
Definition: WaveTrackControls.cpp:123
ProjectAudioIO::Get
static ProjectAudioIO & Get(AudacityProject &project)
Definition: ProjectAudioIO.cpp:22
ProjectAudioIO::IsAudioActive
bool IsAudioActive() const
Definition: ProjectAudioIO.cpp:51
ChannelMenuID
@ ChannelMenuID
Definition: WaveTrackControls.cpp:129
OnRate22ID
@ OnRate22ID
Definition: WaveTrackControls.cpp:100
OnRate96ID
@ OnRate96ID
Definition: WaveTrackControls.cpp:104
isUnsafe
static const auto isUnsafe
Definition: WaveTrackControls.cpp:548
Registry::BaseItemPtr
std::unique_ptr< BaseItem > BaseItemPtr
Definition: Registry.h:71
WaveTrackSubViewType
Definition: WaveTrackViewConstants.h:91
Append
Append([](My &table) -> Registry::BaseItemPtr { if(WaveTrackSubViews::slots() > 1) return 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=WaveTrackView::Get(track);menu.Check(id, view.GetMultiView());});else return nullptr;})
OnMultiViewID
@ OnMultiViewID
Definition: WaveTrackControls.cpp:115
OnRate44ID
@ OnRate44ID
Definition: WaveTrackControls.cpp:101
WaveTrackSubViewType::All
static const std::vector< WaveTrackSubViewType > & All()
Discover all registered types.
Definition: WaveTrackViewConstants.cpp:90
RealtimeEffectManager::RealtimeIsActive
bool RealtimeIsActive()
Definition: RealtimeEffectManager.cpp:103
WaveTrack::GetSampleFormat
sampleFormat GetSampleFormat() const
Definition: WaveTrack.h:154
POPUP_MENU_FN
#define POPUP_MENU_FN(memFn)
Definition: PopupMenuTable.h:324
RealtimeEffectManager::Get
static RealtimeEffectManager & Get()
Definition: RealtimeEffectManager.cpp:43
id
int id
Definition: WaveTrackControls.cpp:577
anonymous_namespace{WaveTrackControls.cpp}::initFn
PopupMenuTableEntry::InitFunction initFn(const ValueFinder &findValue)
Definition: WaveTrackControls.cpp:142
PopupMenuHandler
Definition: PopupMenuTable.h:85
isMono
static const auto isMono
Definition: WaveTrackControls.cpp:541
OnRate88ID
@ OnRate88ID
Definition: WaveTrackControls.cpp:103
reserveDisplays
@ reserveDisplays
Definition: WaveTrackControls.cpp:95
WaveTrackView::Get
static WaveTrackView & Get(WaveTrack &track)
Definition: WaveTrackView.cpp:851
OnSetDisplayId
@ OnSetDisplayId
Definition: WaveTrackControls.cpp:117
WaveTrackPopupMenuTable::FindWaveTrack
WaveTrack & FindWaveTrack() const
Definition: WaveTrackControls.cpp:89
OnRate16ID
@ OnRate16ID
Definition: WaveTrackControls.cpp:99
WaveTrackMenuTable::Instance
static WaveTrackMenuTable & Instance()
Definition: WaveTrackControls.cpp:518
OnRate192ID
@ OnRate192ID
Definition: WaveTrackControls.cpp:106
OnSwapChannelsID
@ OnSwapChannelsID
Definition: WaveTrackControls.cpp:125
WaveTrackMenuTable
Definition: WaveTrackControls.cpp:489
OnChannelLeftID
@ OnChannelLeftID
Definition: WaveTrackControls.cpp:119
FirstAttachedItemId
@ FirstAttachedItemId
Definition: WaveTrackControls.cpp:132
OnRate48ID
@ OnRate48ID
Definition: WaveTrackControls.cpp:102