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:
29 bool Apply(const CommandContext & context) override;
30 virtual bool ApplyInner( const CommandContext &context, Track *t );
31 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
32 bool VisitSettings( SettingsVisitor & S ) override;
33 bool VisitSettings( ConstSettingsVisitor & S ) override;
34 virtual void PopulateOrExchange(ShuttleGui & S) override;
35
40
43};
44
45
47{
48public:
50
51 //SetTrackStatusCommand();
52 // ComponentInterface overrides
53 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
54 TranslatableString GetDescription() const override {return XO("Sets various values for a track.");};
55 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
56 bool VisitSettings( SettingsVisitor & S ) override;
57 bool VisitSettings( ConstSettingsVisitor & S ) override;
58 void PopulateOrExchange(ShuttleGui & S) override;
59
60 // AudacityCommand overrides
61 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_I#set_track_status";}
62 bool ApplyInner( const CommandContext & context, Track * t ) override;
63
64public:
65 wxString mTrackName;
68
69// For tracking optional parameters.
73};
74
76{
77public:
79
80 //SetTrackAudioCommand();
81 // ComponentInterface overrides
82 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
83 TranslatableString GetDescription() const override {return XO("Sets various values for a track.");};
84 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
85 bool VisitSettings( SettingsVisitor & S ) override;
86 bool VisitSettings( ConstSettingsVisitor & S ) override;
87 void PopulateOrExchange(ShuttleGui & S) override;
88
89 // AudacityCommand overrides
90 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_I#set_track_audio";}
91 bool ApplyInner( const CommandContext & context, Track * t ) override;
92
93public:
94 double mPan;
95 double mGain;
96 bool bSolo;
97 bool bMute;
98
99// For tracking optional parameters.
104};
105
107{
108public:
110
111 //SetTrackVisualsCommand();
112 // ComponentInterface overrides
113 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
114 TranslatableString GetDescription() const override {return XO("Sets various values for a track.");};
115 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
116 bool VisitSettings( SettingsVisitor & S ) override;
117 bool VisitSettings( ConstSettingsVisitor & S ) override;
118 void PopulateOrExchange(ShuttleGui & S) override;
119
120 // AudacityCommand overrides
121 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_I#set_track_visuals";}
122 bool ApplyInner( const CommandContext & context, Track * t ) override;
123
124public:
130 double mVZoomTop;
132
136
137// For tracking optional parameters.
145
149};
150
152{
153public:
155
157 // ComponentInterface overrides
158 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
159 TranslatableString GetDescription() const override {return XO("Sets various values for a track.");};
160 // AudacityCommand overrides
161 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_II#set_track";}
162
163public:
164
165 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S ) {
166 return
171 };
172 bool VisitSettings( SettingsVisitor & S ) override;
173 bool VisitSettings( ConstSettingsVisitor & S ) override;
174 void PopulateOrExchange(ShuttleGui & S) override {
179 };
180 bool ApplyInner(const CommandContext & context, Track * t ) override {
184 return
185 mSetStatus.ApplyInner( context, t ) &&
186 mSetAudio.ApplyInner( context, t )&&
187 mSetVisuals.ApplyInner( context, t );
188 }
189
190private:
194};
195
196
197
198#endif /* End of include guard: __SETTRACKINFOCOMMAND__ */
Contains declaration of Command base class.
Contains declarations for CommandType class.
#define XO(s)
Definition: Internat.h:31
#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
static const ComponentInterfaceSymbol Symbol
TranslatableString GetDescription() const override
bool ApplyInner(const CommandContext &context, Track *t) override
bool VisitSettings(SettingsVisitorBase< Const > &S)
void PopulateOrExchange(ShuttleGui &S) override
Base class for the various SetTrackCommand classes. Sbclasses provide the settings that are relevan...
bool VisitSettings(SettingsVisitorBase< Const > &S)
virtual bool ApplyInner(const CommandContext &context, Track *t)
bool Apply(const CommandContext &context) override
virtual void PopulateOrExchange(ShuttleGui &S) override
A SetTrackBase that combines SetTrackStatusCommand, SetTrackAudioCommand and SetTrackVisualsCommand.
bool ApplyInner(const CommandContext &context, Track *t) override
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
A SetTrackBase that sets name, selected and focus.
void PopulateOrExchange(ShuttleGui &S) override
static const ComponentInterfaceSymbol Symbol
bool ApplyInner(const CommandContext &context, Track *t) override
bool VisitSettings(SettingsVisitorBase< Const > &S)
TranslatableString GetDescription() const override
ManualPageID ManualPage() 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 ...
Definition: Shuttle.h:115
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:628
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:225
Holds a msgid for the translation catalog; may also bind format arguments.