Audacity  3.0.3
SetTrackInfoCommand.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity - A Digital Audio Editor
4  Copyright 1999-2018 Audacity Team
5  License: wxwidgets
6 
7  Dan Horgan
8  James Crook
9 
10 ******************************************************************//*******************************************************************/
35 
36 
37 #include "SetTrackInfoCommand.h"
38 
39 #include "LoadCommands.h"
40 #include "../Project.h"
41 #include "../TrackPanelAx.h"
42 #include "../TrackPanel.h"
43 #include "../WaveTrack.h"
44 #include "../prefs/WaveformSettings.h"
45 #include "../prefs/SpectrogramSettings.h"
46 #include "../Shuttle.h"
47 #include "../ShuttleGui.h"
48 #include "../tracks/playabletrack/wavetrack/ui/WaveTrackView.h"
49 #include "../tracks/playabletrack/wavetrack/ui/WaveTrackViewConstants.h"
50 #include "CommandContext.h"
51 
53  mbPromptForTracks = true;
54  bIsSecondChannel = false;
55 }
56 
57 //Define for the old scheme, where SetTrack defines its own track selection.
58 //rather than using the current selection.
59 //#define USE_OWN_TRACK_SELECTION
60 
61 
62 bool SetTrackBase::ApplyInner( const CommandContext &context, Track *t )
63 {
64  static_cast<void>(&context);
65  static_cast<void>(&t);
66  return true;
67 };
68 
69 
71 {
72  static_cast<void>(S);
73 #ifdef USE_OWN_TRACK_SELECTION
74  S.OptionalY( bHasTrackIndex ).Define( mTrackIndex, wxT("Track"), 0, 0, 100 );
75  S.OptionalN( bHasChannelIndex ).Define( mChannelIndex, wxT("Channel"), 0, 0, 100 );
76 #endif
77  return true;
78 }
79 
81 {
82  static_cast<void>(S);
83 #ifdef USE_OWN_TRACK_SELECTION
84  if( !mbPromptForTracks )
85  return;
86  S.AddSpace(0, 5);
87  S.StartMultiColumn(3, wxEXPAND);
88  {
89  S.SetStretchyCol( 2 );
90  S.Optional( bHasTrackIndex ).TieNumericTextBox( XO("Track Index:"), mTrackIndex );
92  }
93  S.EndMultiColumn();
94 #endif
95 }
96 
97 bool SetTrackBase::Apply(const CommandContext & context )
98 {
99  long i = 0;// track counter
100  long j = 0;// channel counter
101  auto &tracks = TrackList::Get( context.project );
102  for ( auto t : tracks.Leaders() )
103  {
104  auto channels = TrackList::Channels(t);
105  for ( auto channel : channels ) {
106  bool bThisTrack =
107 #ifdef USE_OWN_TRACK_SELECTION
108  (bHasTrackIndex && (i==mTrackIndex)) ||
109  (bHasChannelIndex && (j==mChannelIndex ) ) ||
111 #else
112  channel->GetSelected();
113 #endif
114 
115  if( bThisTrack ){
116  ApplyInner( context, channel );
117  }
118  ++j; // count all channels
119  }
120  ++i; // count groups of channels
121  }
122  return true;
123 }
124 
126 { XO("Set Track Status") };
127 
129 
132  S.OptionalN( bHasTrackName ).Define( mTrackName, wxT("Name"), _("Unnamed") );
133  // There is also a select command. This is an alternative.
134  S.OptionalN( bHasSelected ).Define( bSelected, wxT("Selected"), false );
135  S.OptionalN( bHasFocused ).Define( bFocused, wxT("Focused"), false );
136  return true;
137 };
138 
140 {
142  S.StartMultiColumn(3, wxEXPAND);
143  {
144  S.SetStretchyCol( 2 );
145  S.Optional( bHasTrackName ).TieTextBox( XXO("Name:"), mTrackName );
146  }
147  S.EndMultiColumn();
148  S.StartMultiColumn(2, wxEXPAND);
149  {
150  S.SetStretchyCol( 1 );
151  S.Optional( bHasSelected ).TieCheckBox( XXO("Selected"), bSelected );
152  S.Optional( bHasFocused ).TieCheckBox( XXO("Focused"), bFocused);
153  }
154  S.EndMultiColumn();
155 }
156 
158 {
159  //auto wt = dynamic_cast<WaveTrack *>(t);
160  //auto pt = dynamic_cast<PlayableTrack *>(t);
161 
162  // You can get some intriguing effects by setting R and L channels to
163  // different values.
164  if( bHasTrackName )
165  t->SetName(mTrackName);
166 
167  // In stereo tracks, both channels need selecting/deselecting.
168  if( bHasSelected )
170 
171  // These ones don't make sense on the second channel of a stereo track.
172  if( !bIsSecondChannel ){
173  if( bHasFocused )
174  {
175  auto &trackFocus = TrackFocus::Get( context.project );
176  if( bFocused)
177  trackFocus.Set( t );
178  else if( t == trackFocus.Get() )
179  trackFocus.Set( nullptr );
180  }
181  }
182  return true;
183 }
184 
185 
186 
188 { XO("Set Track Audio") };
189 
191 
194  S.OptionalN( bHasMute ).Define( bMute, wxT("Mute"), false );
195  S.OptionalN( bHasSolo ).Define( bSolo, wxT("Solo"), false );
196 
197  S.OptionalN( bHasGain ).Define( mGain, wxT("Gain"), 0.0, -36.0, 36.0);
198  S.OptionalN( bHasPan ).Define( mPan, wxT("Pan"), 0.0, -100.0, 100.0);
199  return true;
200 };
201 
203 {
205  S.StartMultiColumn(2, wxEXPAND);
206  {
207  S.SetStretchyCol( 1 );
208  S.Optional( bHasMute ).TieCheckBox( XXO("Mute"), bMute);
209  S.Optional( bHasSolo ).TieCheckBox( XXO("Solo"), bSolo);
210  }
211  S.EndMultiColumn();
212  S.StartMultiColumn(3, wxEXPAND);
213  {
214  S.SetStretchyCol( 2 );
215  S.Optional( bHasGain ).TieSlider( XXO("Gain:"), mGain, 36.0,-36.0);
216  S.Optional( bHasPan ).TieSlider( XXO("Pan:"), mPan, 100.0, -100.0);
217  }
218  S.EndMultiColumn();
219 }
220 
222 {
223  static_cast<void>(context);
224  auto wt = dynamic_cast<WaveTrack *>(t);
225  auto pt = dynamic_cast<PlayableTrack *>(t);
226 
227  if( wt && bHasGain )
228  wt->SetGain(DB_TO_LINEAR(mGain));
229  if( wt && bHasPan )
230  wt->SetPan(mPan/100.0);
231 
232  // These ones don't make sense on the second channel of a stereo track.
233  if( !bIsSecondChannel ){
234  if( pt && bHasSolo )
235  pt->SetSolo(bSolo);
236  if( pt && bHasMute )
237  pt->SetMute(bMute);
238  }
239  return true;
240 }
241 
242 
243 
245 { XO("Set Track Visuals") };
246 
248 
250 {
255  nColours
256 };
257 
259 {
260  { wxT("Color0"), XO("Color 0") },
261  { wxT("Color1"), XO("Color 1") },
262  { wxT("Color2"), XO("Color 2") },
263  { wxT("Color3"), XO("Color 3") },
264 };
265 
266 
268 {
272 };
273 
275 {
276  // These are acceptable dual purpose internal/visible names
277  { XO("Linear") },
278  /* i18n-hint: abbreviates decibels */
279  { XO("dB") },
280 };
281 
283 {
287  nZoomTypes
288 };
289 
291 {
292  { XO("Reset") },
293  { wxT("Times2"), XO("Times 2") },
294  { XO("HalfWave") },
295 };
296 
298 {
299  const auto &types = WaveTrackSubViewType::All();
300  auto result = transform_container< EnumValueSymbols >(
301  types, std::mem_fn( &WaveTrackSubView::Type::name ) );
302  result.push_back( WaveTrackViewConstants::MultiViewSymbol );
303  return result;
304 }
305 
308  S.OptionalN( bHasHeight ).Define( mHeight, wxT("Height"), 120, 44, 2000 );
309 
310  {
311  auto symbols = DiscoverSubViewTypes();
312  S.OptionalN( bHasDisplayType ).DefineEnum( mDisplayType, wxT("Display"), 0, symbols.data(), symbols.size() );
313  }
314 
318  S.OptionalN( bHasVZoomTop ).Define( mVZoomTop, wxT("VZoomHigh"), 1.0, -2.0, 2.0 );
319  S.OptionalN( bHasVZoomBottom ).Define( mVZoomBottom, wxT("VZoomLow"), -1.0, -2.0, 2.0 );
320 
321  S.OptionalN( bHasUseSpecPrefs ).Define( bUseSpecPrefs, wxT("SpecPrefs"), false );
322  S.OptionalN( bHasSpectralSelect ).Define( bSpectralSelect, wxT("SpectralSel"),true );
323  S.OptionalN( bHasGrayScale ).Define( bGrayScale, wxT("GrayScale"), false );
324 
325  return true;
326 };
327 
329 {
331  S.StartMultiColumn(3, wxEXPAND);
332  {
333  S.SetStretchyCol( 2 );
334  S.Optional( bHasHeight ).TieNumericTextBox( XXO("Height:"), mHeight );
335  S.Optional( bHasColour ).TieChoice( XXO("Color:"), mColour,
337 
338  {
339  auto symbols = DiscoverSubViewTypes();
340  auto typeNames = transform_container<TranslatableStrings>(
341  symbols, std::mem_fn( &EnumValueSymbol::Stripped ) );
343  typeNames );
344  }
345 
346  S.Optional( bHasScaleType ).TieChoice( XXO("Scale:"), mScaleType,
348  S.Optional( bHasVZoom ).TieChoice( XXO("VZoom:"), mVZoom,
350  S.Optional( bHasVZoomTop ).TieTextBox( XXO("VZoom Top:"), mVZoomTop );
351  S.Optional( bHasVZoomBottom ).TieTextBox( XXO("VZoom Bottom:"), mVZoomBottom );
352  }
353  S.EndMultiColumn();
354  S.StartMultiColumn(2, wxEXPAND);
355  {
356  S.SetStretchyCol( 1 );
357  S.Optional( bHasUseSpecPrefs ).TieCheckBox( XXO("Use Spectral Prefs"), bUseSpecPrefs );
358  S.Optional( bHasSpectralSelect ).TieCheckBox( XXO("Spectral Select"), bSpectralSelect);
359  S.Optional( bHasGrayScale ).TieCheckBox( XXO("Gray Scale"), bGrayScale );
360  }
361  S.EndMultiColumn();
362 }
363 
365 {
366  static_cast<void>(context);
367  auto wt = dynamic_cast<WaveTrack *>(t);
368  //auto pt = dynamic_cast<PlayableTrack *>(t);
369  static const double ZOOMLIMIT = 0.001f;
370 
371  // You can get some intriguing effects by setting R and L channels to
372  // different values.
373  if( wt && bHasColour )
374  wt->SetWaveColorIndex( mColour );
375 
376  if( t && bHasHeight )
378 
379  if( wt && bHasDisplayType ) {
380  auto &view = WaveTrackView::Get( *wt );
381  auto &all = WaveTrackSubViewType::All();
382  if (mDisplayType < all.size())
383  view.SetDisplay( all[ mDisplayType ].id );
384  else {
385  view.SetMultiView( true );
386  view.SetDisplay( WaveTrackSubViewType::Default(), false );
387  }
388  }
389  if( wt && bHasScaleType )
390  wt->GetWaveformSettings().scaleType =
391  (mScaleType==kLinear) ?
394 
395  if( wt && bHasVZoom ){
396  switch( mVZoom ){
397  default:
398  case kReset: wt->SetDisplayBounds(-1,1); break;
399  case kTimes2: wt->SetDisplayBounds(-2,2); break;
400  case kHalfWave: wt->SetDisplayBounds(0,1); break;
401  }
402  }
403 
404  if ( wt && (bHasVZoomTop || bHasVZoomBottom) && !bHasVZoom){
405  float vzmin, vzmax;
406  wt->GetDisplayBounds(&vzmin, &vzmax);
407 
408  if ( !bHasVZoomTop ){
409  mVZoomTop = vzmax;
410  }
411  if ( !bHasVZoomBottom ){
412  mVZoomBottom = vzmin;
413  }
414 
415  // Can't use std::clamp until C++17
416  mVZoomTop = std::max(-2.0, std::min(mVZoomTop, 2.0));
417  mVZoomBottom = std::max(-2.0, std::min(mVZoomBottom, 2.0));
418 
419  if (mVZoomBottom > mVZoomTop){
421  }
422  if ( mVZoomTop - mVZoomBottom < ZOOMLIMIT ){
423  double c = (mVZoomBottom + mVZoomTop) / 2;
424  mVZoomBottom = c - ZOOMLIMIT / 2.0;
425  mVZoomTop = c + ZOOMLIMIT / 2.0;
426  }
427  wt->SetDisplayBounds(mVZoomBottom, mVZoomTop);
428  auto &tp = TrackPanel::Get( context.project );
429  tp.UpdateVRulers();
430  }
431 
432  if( wt && bHasUseSpecPrefs ){
433  wt->UseSpectralPrefs( bUseSpecPrefs );
434  }
435  if( wt && bHasSpectralSelect ){
436  wt->GetSpectrogramSettings().spectralSelection = bSpectralSelect;
437  }
438  if( wt && bHasGrayScale ){
439  wt->GetSpectrogramSettings().isGrayscale = bGrayScale;
440  }
441 
442  return true;
443 }
444 
445 
447 { XO("Set Track") };
448 
450 
452 {
456 }
457 
SetTrackBase::mTrackIndex
int mTrackIndex
Definition: SetTrackInfoCommand.h:34
SetTrackVisualsCommand::bHasScaleType
bool bHasScaleType
Definition: SetTrackInfoCommand.h:133
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:68
DB_TO_LINEAR
const double MIN_Threshold_Linear DB_TO_LINEAR(MIN_Threshold_dB)
LoadCommands.h
TrackView::Get
static TrackView & Get(Track &)
Definition: TrackView.cpp:63
SetTrackAudioCommand::bHasGain
bool bHasGain
Definition: SetTrackInfoCommand.h:95
SetTrackAudioCommand::bMute
bool bMute
Definition: SetTrackInfoCommand.h:91
SetTrackVisualsCommand::bSpectralSelect
bool bSpectralSelect
Definition: SetTrackInfoCommand.h:126
ClientData::Site::Get
Subclass & Get(const RegisteredFactory &key)
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass.
Definition: ClientData.h:309
SetTrackAudioCommand::ApplyInner
bool ApplyInner(const CommandContext &context, Track *t) override
Definition: SetTrackInfoCommand.cpp:221
SetTrackVisualsCommand::bHasVZoomBottom
bool bHasVZoomBottom
Definition: SetTrackInfoCommand.h:136
SetTrackVisualsCommand::bHasHeight
bool bHasHeight
Definition: SetTrackInfoCommand.h:131
WaveTrackSubViewType::Default
static Display Default()
Return a preferred type.
Definition: WaveTrackViewConstants.cpp:97
ShuttleGuiBase::TieCheckBox
wxCheckBox * TieCheckBox(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1603
SetTrackBase::mbPromptForTracks
bool mbPromptForTracks
Definition: SetTrackInfoCommand.h:40
SetTrackVisualsCommand::mColour
int mColour
Definition: SetTrackInfoCommand.h:117
kHalfWave
@ kHalfWave
Definition: SetTrackInfoCommand.cpp:286
TrackList::Channels
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1467
SetTrackCommand::SetTrackCommand
SetTrackCommand()
Definition: SetTrackInfoCommand.cpp:451
ShuttleGuiBase::TieSlider
wxSlider * TieSlider(const TranslatableString &Prompt, int &pos, const int max, const int min=0)
Definition: ShuttleGui.cpp:1661
SetTrackStatusCommand::bHasFocused
bool bHasFocused
Definition: SetTrackInfoCommand.h:68
SetTrackBase::SetTrackBase
SetTrackBase()
Definition: SetTrackInfoCommand.cpp:52
SetTrackStatusCommand::DefineParams
bool DefineParams(ShuttleParams &S) override
Definition: SetTrackInfoCommand.cpp:130
ShuttleGui::AddSpace
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2421
TrackView::SetHeight
void SetHeight(int height)
Definition: TrackView.cpp:153
TrackPanel::Get
static TrackPanel & Get(AudacityProject &project)
Definition: TrackPanel.cpp:222
XO
#define XO(s)
Definition: Internat.h:32
kReset
@ kReset
Definition: SetTrackInfoCommand.cpp:284
SetTrackCommand::mSetStatus
SetTrackStatusCommand mSetStatus
Definition: SetTrackInfoCommand.h:181
anonymous_namespace{SetTrackInfoCommand.cpp}::reg2
BuiltinCommandsModule::Registration< SetTrackAudioCommand > reg2
Definition: SetTrackInfoCommand.cpp:190
ShuttleParams
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:61
anonymous_namespace{SetTrackInfoCommand.cpp}::reg
BuiltinCommandsModule::Registration< SetTrackStatusCommand > reg
Definition: SetTrackInfoCommand.cpp:128
SetTrackCommand::mSetAudio
SetTrackAudioCommand mSetAudio
Definition: SetTrackInfoCommand.h:182
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1212
kColour1
@ kColour1
Definition: SetTrackInfoCommand.cpp:252
SetTrackBase::DefineParams
virtual bool DefineParams(ShuttleParams &S) override
Definition: SetTrackInfoCommand.cpp:70
SetTrackVisualsCommand::DefineParams
bool DefineParams(ShuttleParams &S) override
Definition: SetTrackInfoCommand.cpp:306
kZoomTypeStrings
static const EnumValueSymbol kZoomTypeStrings[nZoomTypes]
Definition: SetTrackInfoCommand.cpp:290
SetTrackAudioCommand::bHasPan
bool bHasPan
Definition: SetTrackInfoCommand.h:94
kZoomTypes
kZoomTypes
Definition: SetTrackInfoCommand.cpp:283
SetTrackStatusCommand::bHasSelected
bool bHasSelected
Definition: SetTrackInfoCommand.h:67
SetTrackStatusCommand::ApplyInner
bool ApplyInner(const CommandContext &context, Track *t) override
Definition: SetTrackInfoCommand.cpp:157
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterface.h:60
ShuttleParams::OptionalN
virtual ShuttleParams & OptionalN(bool &var)
Definition: Shuttle.h:71
SetTrackAudioCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: SetTrackInfoCommand.cpp:202
WaveTrack::SetWaveColorIndex
void SetWaveColorIndex(int colorIndex)
Definition: WaveTrack.cpp:437
ShuttleGuiBase::TieTextBox
wxTextCtrl * TieTextBox(const TranslatableString &Caption, wxString &Value, const int nChars=0)
Definition: ShuttleGui.cpp:1626
BuiltinCommandsModule::Registration
Definition: LoadCommands.h:41
WaveformSettings::stLogarithmic
@ stLogarithmic
Definition: WaveformSettings.h:61
EnumValueSymbols
Definition: Prefs.h:62
SetTrackBase::bIsSecondChannel
bool bIsSecondChannel
Definition: SetTrackInfoCommand.h:39
kColour0
@ kColour0
Definition: SetTrackInfoCommand.cpp:251
Track::SetSelected
virtual void SetSelected(bool s)
Definition: Track.cpp:91
kColours
kColours
Definition: SetClipCommand.cpp:38
SetTrackVisualsCommand::bHasUseSpecPrefs
bool bHasUseSpecPrefs
Definition: SetTrackInfoCommand.h:138
anonymous_namespace{SetTrackInfoCommand.cpp}::reg3
BuiltinCommandsModule::Registration< SetTrackVisualsCommand > reg3
Definition: SetTrackInfoCommand.cpp:247
CommandContext.h
SetTrackVisualsCommand::mVZoomBottom
double mVZoomBottom
Definition: SetTrackInfoCommand.h:123
ComponentInterfaceSymbol::Stripped
const TranslatableString Stripped() const
Definition: ComponentInterface.h:90
XXO
#define XXO(s)
Definition: Internat.h:45
SetTrackVisualsCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: SetTrackInfoCommand.h:103
SetTrackAudioCommand::mPan
double mPan
Definition: SetTrackInfoCommand.h:88
SetTrackCommand::mSetVisuals
SetTrackVisualsCommand mSetVisuals
Definition: SetTrackInfoCommand.h:183
CommandContext
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
Definition: CommandContext.h:22
SetTrackBase::Apply
bool Apply(const CommandContext &context) override
Definition: SetTrackInfoCommand.cpp:97
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1203
WaveTrackViewConstants::MultiViewSymbol
AUDACITY_DLL_API const EnumValueSymbol MultiViewSymbol
String identifier for a preference for one of each type of view.
Definition: WaveTrackViewConstants.cpp:105
SetTrackStatusCommand::bHasTrackName
bool bHasTrackName
Definition: SetTrackInfoCommand.h:66
nZoomTypes
@ nZoomTypes
Definition: SetTrackInfoCommand.cpp:287
SetTrackVisualsCommand::bHasDisplayType
bool bHasDisplayType
Definition: SetTrackInfoCommand.h:132
SetTrackBase::bHasChannelIndex
bool bHasChannelIndex
Definition: SetTrackInfoCommand.h:37
SetTrackAudioCommand::mGain
double mGain
Definition: SetTrackInfoCommand.h:89
ShuttleParams::DefineEnum
virtual void DefineEnum(int &var, const wxChar *key, const int vdefault, const EnumValueSymbol strings[], size_t nStrings)
Definition: Shuttle.cpp:339
SetTrackVisualsCommand::mScaleType
int mScaleType
Definition: SetTrackInfoCommand.h:120
Msgids
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Definition: Internat.cpp:267
SetTrackStatusCommand::bSelected
bool bSelected
Definition: SetTrackInfoCommand.h:62
SetTrackCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: SetTrackInfoCommand.h:146
kColour2
@ kColour2
Definition: SetTrackInfoCommand.cpp:253
SetTrackStatusCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: SetTrackInfoCommand.cpp:139
WaveTrackSubViewType::All
static const std::vector< WaveTrackSubViewType > & All()
Discover all registered types.
Definition: WaveTrackViewConstants.cpp:90
TrackFocus::Get
Track * Get()
Definition: TrackPanelAx.cpp:755
ShuttleParams::OptionalY
virtual ShuttleParams & OptionalY(bool &var)
Definition: Shuttle.h:70
anonymous_namespace{NoteTrack.cpp}::swap
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
Definition: NoteTrack.cpp:735
SetTrackVisualsCommand::bGrayScale
bool bGrayScale
Definition: SetTrackInfoCommand.h:127
ShuttleGuiBase::TieNumericTextBox
wxTextCtrl * TieNumericTextBox(const TranslatableString &Prompt, int &Value, const int nChars=0)
Definition: ShuttleGui.cpp:1647
Track::SetPan
virtual void SetPan(float)
Definition: Track.h:430
SetTrackVisualsCommand::bUseSpecPrefs
bool bUseSpecPrefs
Definition: SetTrackInfoCommand.h:125
PlayableTrack
AudioTrack subclass that can also be audibly replayed by the program.
Definition: Track.h:837
SetTrackAudioCommand::bSolo
bool bSolo
Definition: SetTrackInfoCommand.h:90
SetTrackInfoCommand.h
SetTrackStatusCommand::bFocused
bool bFocused
Definition: SetTrackInfoCommand.h:63
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
kTimes2
@ kTimes2
Definition: SetTrackInfoCommand.cpp:285
SetTrackStatusCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: SetTrackInfoCommand.h:47
SetTrackVisualsCommand::bHasSpectralSelect
bool bHasSpectralSelect
Definition: SetTrackInfoCommand.h:139
TrackList::Get
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:495
Track::SetName
void SetName(const wxString &n)
Definition: Track.cpp:83
kScaleTypes
kScaleTypes
Definition: SetTrackInfoCommand.cpp:268
Track
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:238
_
#define _(s)
Definition: Internat.h:76
SetTrackVisualsCommand::bHasColour
bool bHasColour
Definition: SetTrackInfoCommand.h:130
WaveTrackSubViewType::name
EnumValueSymbol name
Definition: WaveTrackViewConstants.h:99
SetTrackVisualsCommand::bHasVZoom
bool bHasVZoom
Definition: SetTrackInfoCommand.h:134
WaveTrackView::Get
static WaveTrackView & Get(WaveTrack &track)
Definition: WaveTrackView.cpp:763
kLinear
@ kLinear
Definition: SetTrackInfoCommand.cpp:269
nScaleTypes
@ nScaleTypes
Definition: SetTrackInfoCommand.cpp:271
kColourStrings
static const EnumValueSymbol kColourStrings[nColours]
Definition: SetTrackInfoCommand.cpp:258
SetTrackAudioCommand::bHasSolo
bool bHasSolo
Definition: SetTrackInfoCommand.h:96
SetTrackVisualsCommand::ApplyInner
bool ApplyInner(const CommandContext &context, Track *t) override
Definition: SetTrackInfoCommand.cpp:364
SetTrackVisualsCommand::bHasGrayScale
bool bHasGrayScale
Definition: SetTrackInfoCommand.h:140
kDb
@ kDb
Definition: SetTrackInfoCommand.cpp:270
SetTrackBase::mChannelIndex
int mChannelIndex
Definition: SetTrackInfoCommand.h:35
SetTrackBase::bHasTrackIndex
bool bHasTrackIndex
Definition: SetTrackInfoCommand.h:36
ShuttleParams::Define
virtual void Define(bool &var, const wxChar *key, const bool vdefault, const bool vmin=false, const bool vmax=false, const bool vscl=false)
Definition: Shuttle.cpp:332
SetTrackBase::PopulateOrExchange
virtual void PopulateOrExchange(ShuttleGui &S) override
Definition: SetTrackInfoCommand.cpp:80
kColour3
@ kColour3
Definition: SetTrackInfoCommand.cpp:254
ShuttleGui::Optional
ShuttleGui & Optional(bool &bVar)
Definition: ShuttleGui.cpp:2254
SetTrackBase::ApplyInner
virtual bool ApplyInner(const CommandContext &context, Track *t)
Definition: SetTrackInfoCommand.cpp:62
SetTrackVisualsCommand::mDisplayType
int mDisplayType
Definition: SetTrackInfoCommand.h:119
ShuttleGuiBase::SetStretchyCol
void SetStretchyCol(int i)
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition: ShuttleGui.cpp:195
SetTrackVisualsCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: SetTrackInfoCommand.cpp:328
SetTrackStatusCommand::mTrackName
wxString mTrackName
Definition: SetTrackInfoCommand.h:61
CommandContext::project
AudacityProject & project
Definition: CommandContext.h:52
SetTrackVisualsCommand::mVZoom
int mVZoom
Definition: SetTrackInfoCommand.h:121
WaveformSettings::stLinear
@ stLinear
Definition: WaveformSettings.h:60
ShuttleGuiBase::TieChoice
wxChoice * TieChoice(const TranslatableString &Prompt, TranslatableString &Selected, const TranslatableStrings &choices)
Definition: ShuttleGui.cpp:1701
SetTrackAudioCommand::DefineParams
bool DefineParams(ShuttleParams &S) override
Definition: SetTrackInfoCommand.cpp:192
anonymous_namespace{SetTrackInfoCommand.cpp}::reg4
BuiltinCommandsModule::Registration< SetTrackCommand > reg4
Definition: SetTrackInfoCommand.cpp:449
SetTrackVisualsCommand::mVZoomTop
double mVZoomTop
Definition: SetTrackInfoCommand.h:122
SetTrackVisualsCommand::mHeight
int mHeight
Definition: SetTrackInfoCommand.h:118
SetTrackVisualsCommand::bHasVZoomTop
bool bHasVZoomTop
Definition: SetTrackInfoCommand.h:135
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:638
SetTrackAudioCommand::bHasMute
bool bHasMute
Definition: SetTrackInfoCommand.h:97
DiscoverSubViewTypes
static EnumValueSymbols DiscoverSubViewTypes()
Definition: SetTrackInfoCommand.cpp:297
kScaleTypeStrings
static const EnumValueSymbol kScaleTypeStrings[nScaleTypes]
Definition: SetTrackInfoCommand.cpp:274
SetTrackAudioCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: SetTrackInfoCommand.h:74
nColours
@ nColours
Definition: SetTrackInfoCommand.cpp:255