42#include "../CommonCommandFlags.h"
46#include "../TrackPanel.h"
53#include "../tracks/playabletrack/wavetrack/ui/WaveChannelView.h"
55#include "../tracks/playabletrack/wavetrack/ui/WaveformView.h"
70{
XO(
"Set Track Status") };
84 {
return VisitSettings<false>(
S); }
87 {
return VisitSettings<true>(
S); }
91 S.StartMultiColumn(3, wxEXPAND);
93 S.SetStretchyCol( 2 );
97 S.StartMultiColumn(2, wxEXPAND);
99 S.SetStretchyCol( 1 );
121 else if (&t == trackFocus.
Get())
122 trackFocus.Set(
nullptr);
130{
XO(
"Set Track Audio") };
145 {
return VisitSettings<false>(
S); }
148 {
return VisitSettings<true>(
S); }
152 S.StartMultiColumn(2, wxEXPAND);
154 S.SetStretchyCol( 1 );
159 S.StartMultiColumn(3, wxEXPAND);
161 S.SetStretchyCol( 2 );
170 static_cast<void>(context);
177 wt->SetPan(
mPan/100.0);
189{
XO(
"Set Track Visuals") };
204 {
wxT(
"Color0"),
XO(
"Color 0") },
205 {
wxT(
"Color1"),
XO(
"Color 1") },
206 {
wxT(
"Color2"),
XO(
"Color 2") },
207 {
wxT(
"Color3"),
XO(
"Color 3") },
222 {
wxT(
"Linear"),
XO(
"Linear (amp)") },
224 {
wxT(
"dB"),
XO(
"Logarithmic (dB)") },
226 {
wxT(
"LinearDB"),
XO(
"Linear (dB)")}
240 {
wxT(
"Times2"),
XO(
"Times 2") },
247 auto result = transform_container< EnumValueSymbols >(
278 {
return VisitSettings<false>(
S); }
281 {
return VisitSettings<true>(
S); }
285 S.StartMultiColumn(3, wxEXPAND);
287 S.SetStretchyCol( 2 );
294 auto typeNames = transform_container<TranslatableStrings>(
308 S.StartMultiColumn(2, wxEXPAND);
310 S.SetStretchyCol( 1 );
315 S.StartMultiColumn(3, wxEXPAND);
317 S.SetStretchyCol( 2 );
320 Msgids( schemes.data(), schemes.size() ) );
328 static_cast<void>(context);
329 const auto wt =
dynamic_cast<WaveTrack *
>(&t);
332 auto &wc = **wt->
Channels().begin();
334 static const double ZOOMLIMIT = 0.001f;
349 view.SetMultiView(
true );
367 case kReset: cache.SetDisplayBounds(-1,1);
break;
368 case kTimes2: cache.SetDisplayBounds(-2,2);
break;
369 case kHalfWave: cache.SetDisplayBounds(0,1);
break;
376 cache.GetDisplayBounds(vzmin, vzmax);
425 {
return VisitSettings<false>(
S); }
427 {
return VisitSettings<true>(
S); }
444 Command(
wxT(
"SetTrackVisuals"),
XXO(
"Set Track Visuals..."),
447 wxT(
"Optional/Extra/Part2/Scriptables1")
457 wxT(
"Optional/Extra/Part2/Scriptables2")
AttachedItem sAttachment1
AttachedItem sAttachment2
const ReservedCommandFlag & AudioIONotBusyFlag()
XXO("&Cut/Copy/Paste Toolbar")
static const EnumValueSymbol kScaleTypeStrings[nScaleTypes]
static const EnumValueSymbol kZoomTypeStrings[nZoomTypes]
static EnumValueSymbols DiscoverSubViewTypes()
static const EnumValueSymbol kColourStrings[nColours]
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Convenience function often useful when adding choice controls.
static Settings & settings()
IteratorRange< ChannelIterator< ChannelType > > Channels()
Get range of channels with mutative access.
static ChannelView & Get(Channel &channel)
void SetExpandedHeight(int height)
Subclass & Get(const RegisteredFactory &key)
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass.
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
AudacityProject & project
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
const TranslatableString Stripped() const
AudioTrack subclass that can also be audibly replayed by the program.
Generates classes whose instances register items at construction.
bool ApplyInner(const CommandContext &context, Track &t) override
static const ComponentInterfaceSymbol Symbol
bool VisitSettings(SettingsVisitorBase< Const > &S)
void PopulateOrExchange(ShuttleGui &S) override
bool Apply(const CommandContext &context) final
virtual bool ApplyInner(const CommandContext &context, Track &t)=0
static const ComponentInterfaceSymbol Symbol
bool VisitSettings(SettingsVisitorBase< Const > &S)
void PopulateOrExchange(ShuttleGui &S) override
static const ComponentInterfaceSymbol Symbol
bool VisitSettings(SettingsVisitorBase< Const > &S)
bool ApplyInner(const CommandContext &context, Track &t) override
static const ComponentInterfaceSymbol Symbol
bool ApplyInner(const CommandContext &context, Track &t) override
void PopulateOrExchange(ShuttleGui &S) override
bool VisitSettings(SettingsVisitorBase< Const > &S)
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
static SpectrogramSettings & Get(const WaveTrack &track)
static const EnumValueSymbols & GetColorSchemeNames()
static SpectrogramSettings & Own(WaveChannel &wc)
static void Reset(WaveChannel &channel)
Make channel lose indpendent settings and use defaults.
Abstract base class for an object holding data associated with points on a time axis.
virtual void SetSelected(bool s)
void SetName(const wxString &n)
static TrackList & Get(AudacityProject &project)
static TrackPanel & Get(AudacityProject &project)
static WaveChannelView & Get(WaveChannel &channel)
A Track that contains audio waveform data.
AUDACITY_DLL_API void OnAudacityCommand(const CommandContext &ctx)
WAVE_TRACK_API const EnumValueSymbol MultiViewSymbol
String identifier for a preference for one of each type of view.
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
BuiltinCommandsModule::Registration< SetTrackAudioCommand > reg2
BuiltinCommandsModule::Registration< SetTrackCommand > reg4
BuiltinCommandsModule::Registration< SetTrackStatusCommand > reg
BuiltinCommandsModule::Registration< SetTrackVisualsCommand > reg3
static Display Default()
Return a preferred type.
static const std::vector< WaveChannelSubViewType > & All()
Discover all registered types.