Audacity 3.2.0
SetTrackInfoCommand.h
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******************************************************************//*******************************************************************/
16
17#ifndef __SET_TRACK_COMMAND__
18#define __SET_TRACK_COMMAND__
19
20#include "Command.h"
21#include "CommandType.h"
22
23class Track;
24
26{
27public:
28 bool Apply(const CommandContext & context) final;
29 virtual bool ApplyInner(const CommandContext &context, Track &t) = 0;
30};
31
33{
34public:
36
37 //SetTrackStatusCommand();
38 // ComponentInterface overrides
39 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
40 TranslatableString GetDescription() const override {return XO("Sets various values for a track.");};
41 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
42 bool VisitSettings( SettingsVisitor & S ) override;
43 bool VisitSettings( ConstSettingsVisitor & S ) override;
44 void PopulateOrExchange(ShuttleGui & S) override;
45
46 // AudacityCommand overrides
47 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_I#set_track_status";}
48 bool ApplyInner(const CommandContext & context, Track &t) override;
49
50public:
51 wxString mTrackName;
54
55// For tracking optional parameters.
59};
60
62{
63public:
65
66 //SetTrackAudioCommand();
67 // ComponentInterface overrides
68 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
69 TranslatableString GetDescription() const override {return XO("Sets various values for a track.");};
70 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
71 bool VisitSettings( SettingsVisitor & S ) override;
72 bool VisitSettings( ConstSettingsVisitor & S ) override;
73 void PopulateOrExchange(ShuttleGui & S) override;
74
75 // AudacityCommand overrides
76 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_I#set_track_audio";}
77 bool ApplyInner(const CommandContext & context, Track &t) override;
78
79public:
80 double mPan;
81 double mGain;
82 bool bSolo;
83 bool bMute;
84
85// For tracking optional parameters.
86 bool bHasPan;
90};
91
93{
94public:
96
97 //SetTrackVisualsCommand();
98 // ComponentInterface overrides
99 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
100 TranslatableString GetDescription() const override {return XO("Sets various values for a track.");};
101 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
102 bool VisitSettings( SettingsVisitor & S ) override;
103 bool VisitSettings( ConstSettingsVisitor & S ) override;
104 void PopulateOrExchange(ShuttleGui & S) override;
105
106 // AudacityCommand overrides
107 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_I#set_track_visuals";}
108 bool ApplyInner(const CommandContext & context, Track &t) override;
109
110public:
116 double mVZoomTop;
118
122
123// For tracking optional parameters.
131
135};
136
138{
139public:
141
142 // ComponentInterface overrides
143 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
144 TranslatableString GetDescription() const override {return XO("Sets various values for a track.");};
145 // AudacityCommand overrides
146 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_II#set_track";}
147
148public:
149
150 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S ) {
151 return
155 };
156 bool VisitSettings( SettingsVisitor & S ) override;
157 bool VisitSettings( ConstSettingsVisitor & S ) override;
158 void PopulateOrExchange(ShuttleGui & S) override {
162 };
163 bool ApplyInner(const CommandContext & context, Track &t) override {
164 return
165 mSetStatus.ApplyInner(context, t) &&
166 mSetAudio.ApplyInner(context, t) &&
167 mSetVisuals.ApplyInner(context, t);
168 }
169
170private:
174};
175
176
177
178#endif /* End of include guard: __SETTRACKINFOCOMMAND__ */
Contains declaration of Command base class.
Contains declarations for CommandType class.
XO("Cut/Copy/Paste")
#define S(N)
Definition: ToChars.cpp:64
Base class for command in Audacity.
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
A SetTrackBase that sets pan, gain, mute and solo.
ManualPageID ManualPage() override
ComponentInterfaceSymbol GetSymbol() const override
bool ApplyInner(const CommandContext &context, Track &t) override
static const ComponentInterfaceSymbol Symbol
TranslatableString GetDescription() const override
bool VisitSettings(SettingsVisitorBase< Const > &S)
void PopulateOrExchange(ShuttleGui &S) override
Base class for the various track modifying command classes, that loops over selected tracks....
bool Apply(const CommandContext &context) final
virtual bool ApplyInner(const CommandContext &context, Track &t)=0
A SetTrackBase that combines SetTrackStatusCommand, SetTrackAudioConmmand and SetTrackVisualsCommand.
TranslatableString GetDescription() const override
SetTrackStatusCommand mSetStatus
void PopulateOrExchange(ShuttleGui &S) override
ComponentInterfaceSymbol GetSymbol() const override
ManualPageID ManualPage() override
static const ComponentInterfaceSymbol Symbol
bool VisitSettings(SettingsVisitorBase< Const > &S)
SetTrackVisualsCommand mSetVisuals
SetTrackAudioCommand mSetAudio
bool ApplyInner(const CommandContext &context, Track &t) override
A SetTrackBase that sets name, selected and focus.
void PopulateOrExchange(ShuttleGui &S) override
static const ComponentInterfaceSymbol Symbol
bool VisitSettings(SettingsVisitorBase< Const > &S)
TranslatableString GetDescription() const override
ManualPageID ManualPage() override
bool ApplyInner(const CommandContext &context, Track &t) override
ComponentInterfaceSymbol GetSymbol() const override
A SetTrackBase that sets appearance of a track.
static const ComponentInterfaceSymbol Symbol
bool ApplyInner(const CommandContext &context, Track &t) override
ManualPageID ManualPage() override
TranslatableString GetDescription() const override
void PopulateOrExchange(ShuttleGui &S) override
bool VisitSettings(SettingsVisitorBase< Const > &S)
ComponentInterfaceSymbol GetSymbol() const override
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.
Definition: ShuttleGui.h:640
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:110
Holds a msgid for the translation catalog; may also bind format arguments.