Eliminate one of the ## macro hacks in LoadCommands
This commit is contained in:
parent
8832621b0a
commit
0ca5775234
|
@ -34,6 +34,9 @@ threshold of difference in two selected tracks
|
|||
#include "../widgets/valnum.h"
|
||||
#include "CommandContext.h"
|
||||
|
||||
const ComponentInterfaceSymbol CompareAudioCommand::Symbol
|
||||
{ XO("Compare Audio") };
|
||||
|
||||
extern void RegisterCompareAudio( Registrar & R){
|
||||
R.AddCommand( std::make_unique<CompareAudioCommand>() );
|
||||
// std::unique_ptr<CommandOutputTargets> &&target
|
||||
|
@ -157,3 +160,4 @@ bool CompareAudioCommand::Apply(const CommandContext & context)
|
|||
context.Status(wxString::Format(wxT("Finished comparison: %li samples (%.3f seconds) exceeded the error threshold of %f."), errorCount, errorSeconds, errorThreshold));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,14 +23,14 @@ classes
|
|||
|
||||
class WaveTrack;
|
||||
|
||||
#define COMPARE_AUDIO_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Compare Audio") }
|
||||
|
||||
class CompareAudioCommand final : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return XO("Compare Audio");}
|
||||
TranslatableString GetDescription() override {return XO("Compares a range on two tracks.");};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;}
|
||||
TranslatableString GetDescription() override {return XO("Compares a range on two tracks.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
||||
|
|
|
@ -32,6 +32,9 @@ parameters. It is for development purposes.
|
|||
#include "../widgets/valnum.h"
|
||||
#include "../commands/CommandContext.h"
|
||||
|
||||
const ComponentInterfaceSymbol DemoCommand::Symbol
|
||||
{ XO("Demo") };
|
||||
|
||||
bool DemoCommand::DefineParams( ShuttleParams & S ){
|
||||
S.Define( delay, wxT("Delay"), 1.0f, 0.001f, FLT_MAX, 1.0f );
|
||||
S.Define( decay, wxT("Decay"), 0.5f, 0.0f, FLT_MAX, 1.0f );
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
|
||||
class ShuttleGui;
|
||||
|
||||
#define DEMO_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Demo") }
|
||||
|
||||
class DemoCommand final : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return DEMO_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Does the demo action.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
|
||||
#include <wx/frame.h>
|
||||
|
||||
const ComponentInterfaceSymbol DragCommand::Symbol
|
||||
{ XO("Drag") };
|
||||
|
||||
DragCommand::DragCommand()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
#include "Command.h"
|
||||
#include "CommandType.h"
|
||||
|
||||
#define DRAG_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Drag") }
|
||||
|
||||
class DragCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
DragCommand();
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return DRAG_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Drags mouse from one place to another.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -50,6 +50,9 @@ This class now lists
|
|||
#include <wx/frame.h>
|
||||
#include <wx/menu.h>
|
||||
|
||||
const ComponentInterfaceSymbol GetInfoCommand::Symbol
|
||||
{ XO("Get Info") };
|
||||
|
||||
enum {
|
||||
kCommands,
|
||||
//kCommandsPlus,
|
||||
|
|
|
@ -26,13 +26,13 @@ channel.
|
|||
class wxMenuBar;
|
||||
class wxPoint;
|
||||
|
||||
#define GET_INFO_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Get Info") }
|
||||
|
||||
class GetInfoCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return GET_INFO_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Gets information in JSON format.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
#include "../ShuttleGui.h"
|
||||
#include "CommandContext.h"
|
||||
|
||||
const ComponentInterfaceSymbol GetTrackInfoCommand::Symbol
|
||||
{ XO("Get Track Info") };
|
||||
|
||||
const int nTypes =3;
|
||||
static const EnumValueSymbol kTypes[nTypes] =
|
||||
{
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
#include "Command.h"
|
||||
#include "CommandType.h"
|
||||
|
||||
#define GET_TRACK_INFO_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Get Track Info") }
|
||||
|
||||
class GetTrackInfoCommand final : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
GetTrackInfoCommand();
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return GET_TRACK_INFO_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Gets track values as JSON.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
#include "CommandContext.h"
|
||||
#include "../effects/EffectManager.h"
|
||||
|
||||
const ComponentInterfaceSymbol HelpCommand::Symbol
|
||||
{ XO("Help") };
|
||||
|
||||
bool HelpCommand::DefineParams( ShuttleParams & S ){
|
||||
S.Define( mCommandName, wxT("Command"), "Help" );
|
||||
return true;
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
#include "CommandType.h"
|
||||
#include "Command.h"
|
||||
|
||||
#define HELP_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Help") }
|
||||
|
||||
class HelpCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return HELP_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Gives help on a command.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
#include "../ShuttleGui.h"
|
||||
#include "CommandContext.h"
|
||||
|
||||
const ComponentInterfaceSymbol ImportCommand::Symbol
|
||||
{ XO("Import2") };
|
||||
|
||||
bool ImportCommand::DefineParams( ShuttleParams & S ){
|
||||
S.Define( mFileName, wxT("Filename"), "" );
|
||||
return true;
|
||||
|
@ -52,6 +55,9 @@ bool ExportCommand::DefineParams( ShuttleParams & S ){
|
|||
return true;
|
||||
}
|
||||
|
||||
const ComponentInterfaceSymbol ExportCommand::Symbol
|
||||
{ XO("Export2") };
|
||||
|
||||
void ExportCommand::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
S.AddSpace(0, 5);
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
|
||||
// Import
|
||||
|
||||
#define IMPORT_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Import2") }
|
||||
|
||||
class ImportCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return IMPORT_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Imports from a file.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -41,13 +41,13 @@ public:
|
|||
wxString mFileName;
|
||||
};
|
||||
|
||||
#define EXPORT_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Export2") }
|
||||
|
||||
class ExportCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return EXPORT_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Exports to a file.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -96,7 +96,7 @@ enum
|
|||
// Redefine COMMAND() to add the COMMAND's name to an array
|
||||
//
|
||||
#undef COMMAND
|
||||
#define COMMAND(n, i, args) results.push_back( (n ## _PLUGIN_SYMBOL).Internal() );
|
||||
#define COMMAND(n, i, args) results.push_back( (i :: Symbol).Internal() );
|
||||
|
||||
//
|
||||
// Create the COMMAND name array
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
#include "../Shuttle.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
const ComponentInterfaceSymbol MessageCommand::Symbol
|
||||
{ XO("Message") };
|
||||
|
||||
bool MessageCommand::DefineParams( ShuttleParams & S ){
|
||||
S.Define( mMessage, wxT("Text"), "Some message" );
|
||||
return true;
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
#include "CommandType.h"
|
||||
#include "Command.h"
|
||||
|
||||
#define MESSAGE_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Message") }
|
||||
|
||||
class MessageCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return MESSAGE_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Echos a message.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
#include "CommandContext.h"
|
||||
|
||||
|
||||
const ComponentInterfaceSymbol OpenProjectCommand::Symbol
|
||||
{ XO("Open Project2") };
|
||||
|
||||
bool OpenProjectCommand::DefineParams( ShuttleParams & S ){
|
||||
S.Define( mFileName, wxT("Filename"), "test.aup" );
|
||||
S.OptionalN(bHasAddToHistory).Define( mbAddToHistory, wxT("AddToHistory"), false );
|
||||
|
@ -65,6 +68,9 @@ bool OpenProjectCommand::Apply(const CommandContext & context){
|
|||
return !newFileName.empty() && newFileName != oldFileName;
|
||||
}
|
||||
|
||||
const ComponentInterfaceSymbol SaveProjectCommand::Symbol
|
||||
{ XO("Save Project2") };
|
||||
|
||||
bool SaveProjectCommand::DefineParams( ShuttleParams & S ){
|
||||
S.Define( mFileName, wxT("Filename"), "name.aup" );
|
||||
S.Define( mbAddToHistory, wxT("AddToHistory"), false );
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
#include "Command.h"
|
||||
#include "CommandType.h"
|
||||
|
||||
#define OPEN_PROJECT_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Open Project2") }
|
||||
|
||||
class OpenProjectCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return OPEN_PROJECT_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Opens a project.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -41,13 +41,13 @@ public:
|
|||
bool bHasAddToHistory;
|
||||
};
|
||||
|
||||
#define SAVE_PROJECT_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Save Project2") }
|
||||
|
||||
class SaveProjectCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SAVE_PROJECT_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Saves a project.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -24,6 +24,9 @@ SetPreferenceCommand classes
|
|||
#include "../commands/CommandContext.h"
|
||||
#include "../prefs/PrefsDialog.h"
|
||||
|
||||
const ComponentInterfaceSymbol GetPreferenceCommand::Symbol
|
||||
{ XO("Get Preference") };
|
||||
|
||||
bool GetPreferenceCommand::DefineParams( ShuttleParams & S ){
|
||||
S.Define( mName, wxT("Name"), wxT("") );
|
||||
return true;
|
||||
|
@ -51,6 +54,9 @@ bool GetPreferenceCommand::Apply(const CommandContext & context)
|
|||
return true;
|
||||
}
|
||||
|
||||
const ComponentInterfaceSymbol SetPreferenceCommand::Symbol
|
||||
{ XO("Set Preference") };
|
||||
|
||||
bool SetPreferenceCommand::DefineParams( ShuttleParams & S ){
|
||||
S.Define( mName, wxT("Name"), wxT("") );
|
||||
S.Define( mValue, wxT("Value"), wxT("") );
|
||||
|
|
|
@ -26,14 +26,13 @@
|
|||
|
||||
// GetPreference
|
||||
|
||||
#define GET_PREFERENCE_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Get Preference") }
|
||||
#define SET_PREFERENCE_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Set Preference") }
|
||||
|
||||
class GetPreferenceCommand final : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return GET_PREFERENCE_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Gets the value of a single preference.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -50,8 +49,10 @@ public:
|
|||
class SetPreferenceCommand final : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SET_PREFERENCE_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Sets the value of a single preference.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -44,6 +44,9 @@ small calculations of rectangles.
|
|||
#include "CommandContext.h"
|
||||
#include "CommandManager.h"
|
||||
|
||||
const ComponentInterfaceSymbol ScreenshotCommand::Symbol
|
||||
{ XO("Screenshot") };
|
||||
|
||||
|
||||
static const EnumValueSymbol
|
||||
kCaptureWhatStrings[ ScreenshotCommand::nCaptureWhats ] =
|
||||
|
|
|
@ -28,8 +28,6 @@ class AdornedRulerPanel;
|
|||
class AudacityProject;
|
||||
class CommandContext;
|
||||
|
||||
#define SCREENSHOT_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Screenshot") }
|
||||
|
||||
class ScreenshotCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
|
@ -78,9 +76,11 @@ public:
|
|||
nCaptureWhats
|
||||
};
|
||||
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
ScreenshotCommand();
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SCREENSHOT_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Takes screenshots.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -44,6 +44,9 @@ explicitly code all three.
|
|||
#include "CommandContext.h"
|
||||
|
||||
|
||||
const ComponentInterfaceSymbol SelectTimeCommand::Symbol
|
||||
{ XO("Select Time") };
|
||||
|
||||
// Relative to project and relative to selection cover MOST options, since you can already
|
||||
// set a selection to a clip.
|
||||
const int nRelativeTos =6;
|
||||
|
@ -136,6 +139,9 @@ bool SelectTimeCommand::Apply(const CommandContext & context){
|
|||
return true;
|
||||
}
|
||||
|
||||
const ComponentInterfaceSymbol SelectFrequenciesCommand::Symbol
|
||||
{ XO("Select Frequencies") };
|
||||
|
||||
bool SelectFrequenciesCommand::DefineParams( ShuttleParams & S ){
|
||||
S.OptionalN( bHasTop ).Define( mTop, wxT("High"), 0.0, 0.0, (double)FLT_MAX);
|
||||
S.OptionalN( bHasBottom ).Define( mBottom, wxT("Low"), 0.0, 0.0, (double)FLT_MAX);
|
||||
|
@ -170,6 +176,9 @@ bool SelectFrequenciesCommand::Apply(const CommandContext & context){
|
|||
return true;
|
||||
}
|
||||
|
||||
const ComponentInterfaceSymbol SelectTracksCommand::Symbol
|
||||
{ XO("Select Tracks") };
|
||||
|
||||
const int nModes =3;
|
||||
static const EnumValueSymbol kModes[nModes] =
|
||||
{
|
||||
|
@ -251,3 +260,5 @@ bool SelectTracksCommand::Apply(const CommandContext &context)
|
|||
return true;
|
||||
}
|
||||
|
||||
const ComponentInterfaceSymbol SelectCommand::Symbol
|
||||
{ XO("Select") };
|
||||
|
|
|
@ -24,17 +24,13 @@
|
|||
|
||||
//#include "../commands/AudacityCommand.h"
|
||||
|
||||
|
||||
#define SELECT_TIME_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Select Time") }
|
||||
#define SELECT_FREQUENCIES_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Select Frequencies") }
|
||||
#define SELECT_TRACKS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Select Tracks") }
|
||||
#define SELECT_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Select") }
|
||||
|
||||
class SelectTimeCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SELECT_TIME_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Selects a time range.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -57,8 +53,10 @@ public:
|
|||
class SelectFrequenciesCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SELECT_FREQUENCIES_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Selects a frequency range.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -78,8 +76,10 @@ public:
|
|||
class SelectTracksCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SELECT_TRACKS_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Selects a range of tracks.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -100,8 +100,10 @@ public:
|
|||
class SelectCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SELECT_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Selects Audio.");};
|
||||
bool DefineParams( ShuttleParams & S ) override {
|
||||
return
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
#include "../Shuttle.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
const ComponentInterfaceSymbol SetClipCommand::Symbol
|
||||
{ XO("Set Clip") };
|
||||
|
||||
SetClipCommand::SetClipCommand()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -18,14 +18,14 @@
|
|||
|
||||
#include "SetTrackInfoCommand.h"
|
||||
|
||||
#define SET_CLIP_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Set Clip") }
|
||||
|
||||
class SetClipCommand : public SetTrackBase
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
SetClipCommand();
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SET_CLIP_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Sets various values for a clip.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
#include "../Shuttle.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
const ComponentInterfaceSymbol SetEnvelopeCommand::Symbol
|
||||
{ XO("Set Envelope") };
|
||||
|
||||
SetEnvelopeCommand::SetEnvelopeCommand()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -18,14 +18,14 @@
|
|||
|
||||
#include "SetTrackInfoCommand.h"
|
||||
|
||||
#define SET_ENVELOPE_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Set Envelope") }
|
||||
|
||||
class SetEnvelopeCommand : public SetTrackBase
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
SetEnvelopeCommand();
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SET_ENVELOPE_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Sets an envelope point position.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
#include "CommandContext.h"
|
||||
#include "../tracks/labeltrack/ui/LabelTrackView.h"
|
||||
|
||||
const ComponentInterfaceSymbol SetLabelCommand::Symbol
|
||||
{ XO("Set Label") };
|
||||
|
||||
SetLabelCommand::SetLabelCommand()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
#include "Command.h"
|
||||
#include "CommandType.h"
|
||||
|
||||
#define SET_LABEL_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Set Label") }
|
||||
|
||||
class SetLabelCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
SetLabelCommand();
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SET_LABEL_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Sets various values for a label.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
|
||||
#include <wx/frame.h>
|
||||
|
||||
const ComponentInterfaceSymbol SetProjectCommand::Symbol
|
||||
{ XO("Set Project") };
|
||||
|
||||
SetProjectCommand::SetProjectCommand()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -20,14 +20,14 @@
|
|||
#include "Command.h"
|
||||
#include "CommandType.h"
|
||||
|
||||
#define SET_PROJECT_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Set Project") }
|
||||
|
||||
class SetProjectCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
SetProjectCommand();
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SET_PROJECT_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Sets various values for a project.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
|
|
@ -121,7 +121,10 @@ bool SetTrackBase::Apply(const CommandContext & context )
|
|||
return true;
|
||||
}
|
||||
|
||||
bool SetTrackStatusCommand::DefineParams( ShuttleParams & S ){
|
||||
const ComponentInterfaceSymbol SetTrackStatusCommand::Symbol
|
||||
{ XO("Set Track Status") };
|
||||
|
||||
bool SetTrackStatusCommand::DefineParams( ShuttleParams & S ){
|
||||
SetTrackBase::DefineParams( S );
|
||||
S.OptionalN( bHasTrackName ).Define( mTrackName, wxT("Name"), _("Unnamed") );
|
||||
// There is also a select command. This is an alternative.
|
||||
|
@ -178,6 +181,9 @@ bool SetTrackStatusCommand::ApplyInner(const CommandContext & context, Track * t
|
|||
|
||||
|
||||
|
||||
const ComponentInterfaceSymbol SetTrackAudioCommand::Symbol
|
||||
{ XO("Set Track Audio") };
|
||||
|
||||
bool SetTrackAudioCommand::DefineParams( ShuttleParams & S ){
|
||||
SetTrackBase::DefineParams( S );
|
||||
S.OptionalN( bHasMute ).Define( bMute, wxT("Mute"), false );
|
||||
|
@ -230,6 +236,9 @@ bool SetTrackAudioCommand::ApplyInner(const CommandContext & context, Track * t
|
|||
|
||||
|
||||
|
||||
const ComponentInterfaceSymbol SetTrackVisualsCommand::Symbol
|
||||
{ XO("Set Track Visuals") };
|
||||
|
||||
enum kColours
|
||||
{
|
||||
kColour0,
|
||||
|
@ -418,6 +427,9 @@ bool SetTrackVisualsCommand::ApplyInner(const CommandContext & context, Track *
|
|||
}
|
||||
|
||||
|
||||
const ComponentInterfaceSymbol SetTrackCommand::Symbol
|
||||
{ XO("Set Track") };
|
||||
|
||||
SetTrackCommand::SetTrackCommand()
|
||||
{
|
||||
mSetStatus.mbPromptForTracks = false;
|
||||
|
|
|
@ -20,11 +20,6 @@
|
|||
#include "Command.h"
|
||||
#include "CommandType.h"
|
||||
|
||||
#define SET_TRACK_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Set Track") }
|
||||
#define SET_TRACK_STATUS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Set Track Status") }
|
||||
#define SET_TRACK_AUDIO_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Set Track Audio") }
|
||||
#define SET_TRACK_VISUALS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Set Track Visuals") }
|
||||
|
||||
class Track;
|
||||
|
||||
class SetTrackBase : public AudacityCommand
|
||||
|
@ -49,9 +44,11 @@ public:
|
|||
class SetTrackStatusCommand : public SetTrackBase
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
//SetTrackStatusCommand();
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SET_TRACK_STATUS_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Sets various values for a track.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -74,9 +71,11 @@ public:
|
|||
class SetTrackAudioCommand : public SetTrackBase
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
//SetTrackAudioCommand();
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SET_TRACK_AUDIO_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Sets various values for a track.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -101,9 +100,11 @@ public:
|
|||
class SetTrackVisualsCommand : public SetTrackBase
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
//SetTrackVisualsCommand();
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SET_TRACK_VISUALS_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Sets various values for a track.");};
|
||||
bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -142,9 +143,11 @@ public:
|
|||
class SetTrackCommand : public SetTrackBase
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
SetTrackCommand();
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override {return SET_TRACK_PLUGIN_SYMBOL;};
|
||||
ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
|
||||
TranslatableString GetDescription() override {return XO("Sets various values for a track.");};
|
||||
// AudacityCommand overrides
|
||||
wxString ManualPage() override {return wxT("Extra_Menu:_Scriptables_II#set_track");};
|
||||
|
|
|
@ -175,8 +175,6 @@ END_POPUP_MENU()
|
|||
|
||||
|
||||
|
||||
#define SET_TRACK_NAME_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Set Track Name") }
|
||||
|
||||
// An example of using an AudacityCommand simply to create a dialog.
|
||||
// We can add additional functions later, if we want to make it
|
||||
// available to scripting.
|
||||
|
@ -184,9 +182,11 @@ END_POPUP_MENU()
|
|||
class SetTrackNameCommand : public AudacityCommand
|
||||
{
|
||||
public:
|
||||
static const ComponentInterfaceSymbol Symbol;
|
||||
|
||||
// ComponentInterface overrides
|
||||
ComponentInterfaceSymbol GetSymbol() override
|
||||
{return SET_TRACK_NAME_PLUGIN_SYMBOL;};
|
||||
{ return Symbol; }
|
||||
//TranslatableString GetDescription() override {return XO("Sets the track name.");};
|
||||
//bool DefineParams( ShuttleParams & S ) override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -198,6 +198,9 @@ public:
|
|||
wxString mName;
|
||||
};
|
||||
|
||||
const ComponentInterfaceSymbol SetTrackNameCommand::Symbol
|
||||
{ XO("Set Track Name") };
|
||||
|
||||
void SetTrackNameCommand::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
S.AddSpace(0, 5);
|
||||
|
|
Loading…
Reference in New Issue