From b1b1a362ed88b441bd8acbfe5341a34e28739de8 Mon Sep 17 00:00:00 2001 From: James Crook Date: Thu, 8 Feb 2018 19:08:50 +0000 Subject: [PATCH] Doxygen, Clips and Labels - Classes renamed and better doxygenated - GetInfo: Type=Clips added - GetInfo: Type=Labels added. --- src/LabelTrack.h | 1 + src/Project.cpp | 2 +- src/Screenshot.cpp | 2 +- src/WaveClip.h | 2 +- src/commands/AudacityCommand.h | 4 +- src/commands/BatchEvalCommand.cpp | 2 +- src/commands/BatchEvalCommand.h | 2 +- src/commands/Command.cpp | 2 +- src/commands/Command.h | 4 +- src/commands/CommandBuilder.cpp | 2 +- src/commands/CommandContext.cpp | 4 +- src/commands/CommandContext.h | 6 +- src/commands/CommandDirectory.h | 2 +- src/commands/CommandTargets.cpp | 50 ++++++------ src/commands/CommandTargets.h | 70 ++++++++++++---- src/commands/CommandType.h | 4 +- src/commands/CompareAudioCommand.cpp | 2 +- src/commands/GetInfoCommand.cpp | 81 +++++++++++++++---- src/commands/MessageCommand.cpp | 2 +- src/commands/MessageCommand.h | 2 +- src/commands/ScreenshotCommand.h | 2 +- win/Projects/Audacity/Audacity.vcxproj | 2 - .../Audacity/Audacity.vcxproj.filters | 6 -- 23 files changed, 171 insertions(+), 85 deletions(-) diff --git a/src/LabelTrack.h b/src/LabelTrack.h index 8215fef96..e6ecf66dc 100644 --- a/src/LabelTrack.h +++ b/src/LabelTrack.h @@ -321,6 +321,7 @@ private: protected: std::shared_ptr GetControls() override; std::shared_ptr GetVRulerControls() override; + friend class GetInfoCommand; }; #endif diff --git a/src/Project.cpp b/src/Project.cpp index 5975c0420..abc25857d 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -5175,7 +5175,7 @@ void AudacityProject::TP_DisplayStatusMessage(const wxString &msg) void AudacityProject::SafeDisplayStatusMessage(const wxChar *msg) { auto target - = std::make_unique(TargetFactory::ProgressDefault(), + = std::make_unique(TargetFactory::ProgressDefault(), std::make_shared(*mStatusBar), TargetFactory::MessageDefault()); OldStyleCommandType *type = CommandDirectory::Get()->LookUp(wxT("Message")); diff --git a/src/Screenshot.cpp b/src/Screenshot.cpp index 369526378..e773633b8 100644 --- a/src/Screenshot.cpp +++ b/src/Screenshot.cpp @@ -248,7 +248,7 @@ std::unique_ptr ScreenFrame::CreateCommand() { wxASSERT(mStatus != NULL); auto output = - std::make_unique(std::make_unique(), + std::make_unique(std::make_unique(), std::make_shared(*mStatus), std::make_shared()); //OldStyleCommandType *type = CommandDirectory::Get()->LookUp(wxT("Screenshot")); diff --git a/src/WaveClip.h b/src/WaveClip.h index 7619ed8b9..1b6d869ee 100644 --- a/src/WaveClip.h +++ b/src/WaveClip.h @@ -255,7 +255,7 @@ public: void MarkChanged() // NOFAIL-GUARANTEE { mDirty++; } - /** Getting high-level data from the for screen display and clipping + /** Getting high-level data for screen display and clipping * calculations and Contrast */ bool GetWaveDisplay(WaveDisplay &display, double t0, double pixelsPerSecond, bool &isLoadingOD) const; diff --git a/src/commands/AudacityCommand.h b/src/commands/AudacityCommand.h index 119254a17..ab3ed47ce 100644 --- a/src/commands/AudacityCommand.h +++ b/src/commands/AudacityCommand.h @@ -54,8 +54,8 @@ class AUDACITY_DLL_API AudacityCommand /* not final */ : public wxEvtHandler, public CommandDefinitionInterface { public: - //std::unique_ptr mOutput; - //CommandOutputTarget * mOutput; + //std::unique_ptr mOutput; + //CommandOutputTargets * mOutput; public: AudacityCommand(); virtual ~AudacityCommand(); diff --git a/src/commands/BatchEvalCommand.cpp b/src/commands/BatchEvalCommand.cpp index fc4674f29..eebc7a76e 100644 --- a/src/commands/BatchEvalCommand.cpp +++ b/src/commands/BatchEvalCommand.cpp @@ -32,7 +32,7 @@ void BatchEvalCommandType::BuildSignature(CommandSignature &signature) signature.AddParameter(wxT("ChainName"), wxT(""), std::move(chainValidator)); } -OldStyleCommandPointer BatchEvalCommandType::Create(std::unique_ptr &&target) +OldStyleCommandPointer BatchEvalCommandType::Create(std::unique_ptr &&target) { return std::make_shared(*this); } diff --git a/src/commands/BatchEvalCommand.h b/src/commands/BatchEvalCommand.h index db5d2a803..9cd112d7d 100644 --- a/src/commands/BatchEvalCommand.h +++ b/src/commands/BatchEvalCommand.h @@ -31,7 +31,7 @@ class BatchEvalCommandType final : public OldStyleCommandType public: wxString BuildName() override; void BuildSignature(CommandSignature &signature) override; - OldStyleCommandPointer Create(std::unique_ptr &&target) override; + OldStyleCommandPointer Create(std::unique_ptr &&target) override; }; class BatchEvalCommand final : public CommandImplementation diff --git a/src/commands/Command.cpp b/src/commands/Command.cpp index 36b32c7a8..9b7328832 100644 --- a/src/commands/Command.cpp +++ b/src/commands/Command.cpp @@ -122,7 +122,7 @@ bool DecoratedCommand::SetParameter(const wxString ¶mName, return mCommand->SetParameter(paramName, paramValue); } -ApplyAndSendResponse::ApplyAndSendResponse(const OldStyleCommandPointer &cmd, std::unique_ptr &target) +ApplyAndSendResponse::ApplyAndSendResponse(const OldStyleCommandPointer &cmd, std::unique_ptr &target) : DecoratedCommand(cmd), mCtx( std::make_unique( *GetActiveProject(), std::move(target) ) ) { diff --git a/src/commands/Command.h b/src/commands/Command.h index 34b41f84e..b49c08c79 100644 --- a/src/commands/Command.h +++ b/src/commands/Command.h @@ -27,7 +27,7 @@ class AudacityApp; class CommandContext; -class CommandOutputTarget; +class CommandOutputTargets; // Abstract base class for command interface. class OldStyleCommand /* not final */ @@ -67,7 +67,7 @@ public: class ApplyAndSendResponse final : public DecoratedCommand { public: - ApplyAndSendResponse(const OldStyleCommandPointer &cmd, std::unique_ptr &target); + ApplyAndSendResponse(const OldStyleCommandPointer &cmd, std::unique_ptr &target); bool Apply() override; bool Apply(const CommandContext &context) override;// Error to use this. std::unique_ptr mCtx; diff --git a/src/commands/CommandBuilder.cpp b/src/commands/CommandBuilder.cpp index d0443762a..2e5633f35 100644 --- a/src/commands/CommandBuilder.cpp +++ b/src/commands/CommandBuilder.cpp @@ -85,7 +85,7 @@ void CommandBuilder::BuildCommand(const wxString &cmdName, auto scriptOutput = ScriptCommandRelay::GetResponseTarget(); auto output - = std::make_unique(std::make_unique(), + = std::make_unique(std::make_unique(), scriptOutput, scriptOutput); diff --git a/src/commands/CommandContext.cpp b/src/commands/CommandContext.cpp index 8d7ba9860..aa46ac998 100644 --- a/src/commands/CommandContext.cpp +++ b/src/commands/CommandContext.cpp @@ -47,7 +47,7 @@ CommandContext::CommandContext( ) : project{ p } // No target specified? Use the special interactive one that pops up a dialog. - , pOutput( std::move( std::make_unique()) ) + , pOutput( std::move( std::make_unique()) ) , pEvt{ e } , index{ ii } , parameter{ param } @@ -56,7 +56,7 @@ CommandContext::CommandContext( CommandContext::CommandContext( AudacityProject &p, - std::unique_ptr target) + std::unique_ptr target) : project{ p } // Revisit and use std_unique pointer for pOutput?? , pOutput( std::move( target) ) diff --git a/src/commands/CommandContext.h b/src/commands/CommandContext.h index 155c52f4c..310052ca3 100644 --- a/src/commands/CommandContext.h +++ b/src/commands/CommandContext.h @@ -19,7 +19,7 @@ class AudacityProject; class AudacityApp; class wxEvent; -class CommandOutputTarget; +class CommandOutputTargets; using CommandParameter = wxString; class CommandContext { @@ -33,7 +33,7 @@ public: CommandContext( AudacityProject &p, - std::unique_ptr target); + std::unique_ptr target); virtual void Status( const wxString & WXUNUSED(message) ) const; virtual void Error( const wxString & WXUNUSED(message) ) const; @@ -49,7 +49,7 @@ public: void AddItem(const double value , const wxString &name="" ) const; AudacityProject &project; - std::unique_ptr pOutput; + std::unique_ptr pOutput; const wxEvent *pEvt; int index; CommandParameter parameter; diff --git a/src/commands/CommandDirectory.h b/src/commands/CommandDirectory.h index 34a47599e..3dfab92fc 100644 --- a/src/commands/CommandDirectory.h +++ b/src/commands/CommandDirectory.h @@ -28,7 +28,7 @@ they are kept separate to make things simpler. #include "CommandType.h" class Command; -class CommandOutputTarget; +class CommandOutputTargets; class CommandDirectory { diff --git a/src/commands/CommandTargets.cpp b/src/commands/CommandTargets.cpp index ff760b3f2..c55a54512 100644 --- a/src/commands/CommandTargets.cpp +++ b/src/commands/CommandTargets.cpp @@ -11,10 +11,14 @@ \file CommandTargets.cpp \brief Contains definitions for CommandType class -\class InteractiveOutputTarget -\brief InteractiveOutputTarget is an output target that pops up a +\class InteractiveOutputTargets +\brief InteractiveOutputTargets is an output target that pops up a dialog, if necessary. +\class LongMessageDialog +\brief LongMessageDialog is a dialog with a Text Window in it to +capture the more lengthy output from some commands. + *//*******************************************************************/ #include "../Audacity.h" @@ -126,7 +130,7 @@ void LispyCommandMessageTarget::AddField(const wxString &name){ -void DeformattedCommandMessageTarget::StartArray() +void BriefCommandMessageTarget::StartArray() { wxString Padding; Padding.Pad( mCounts.GetCount() *2 -2); @@ -136,14 +140,14 @@ void DeformattedCommandMessageTarget::StartArray() mCounts.push_back( 0 ); } -void DeformattedCommandMessageTarget::EndArray(){ +void BriefCommandMessageTarget::EndArray(){ if( mCounts.GetCount() > 1 ){ mCounts.pop_back(); } if( mCounts.GetCount() <= 3 ) Update( " " ); } -void DeformattedCommandMessageTarget::StartStruct(){ +void BriefCommandMessageTarget::StartStruct(){ wxString Padding; Padding.Pad( mCounts.GetCount() *2 -2); if( mCounts.GetCount() <= 3 ) @@ -151,30 +155,30 @@ void DeformattedCommandMessageTarget::StartStruct(){ mCounts.Last() += 1; mCounts.push_back( 0 ); } -void DeformattedCommandMessageTarget::EndStruct(){ +void BriefCommandMessageTarget::EndStruct(){ if( mCounts.GetCount() > 1 ){ mCounts.pop_back(); } if( mCounts.GetCount() <= 3 ) Update( " " ); } -void DeformattedCommandMessageTarget::AddItem(const wxString &value, const wxString &name){ +void BriefCommandMessageTarget::AddItem(const wxString &value, const wxString &name){ if( mCounts.GetCount() <= 3 ) Update( wxString::Format( "%s\"%s\"", (mCounts.Last()>0)?" ":"",value)); mCounts.Last() += 1; } -void DeformattedCommandMessageTarget::AddItem(const bool value, const wxString &name){ +void BriefCommandMessageTarget::AddItem(const bool value, const wxString &name){ if( mCounts.GetCount() <= 3 ) Update( wxString::Format( "%s%s", (mCounts.Last()>0)?" ":"",value?"True":"False")); mCounts.Last() += 1; } -void DeformattedCommandMessageTarget::AddItem(const double value, const wxString &name){ +void BriefCommandMessageTarget::AddItem(const double value, const wxString &name){ if( mCounts.GetCount() <= 3 ) Update( wxString::Format( "%s%g", (mCounts.Last()>0)?" ":"", value)); mCounts.Last() += 1; } -void DeformattedCommandMessageTarget::AddField(const wxString &name){ +void BriefCommandMessageTarget::AddField(const wxString &name){ mCounts.Last() = 0; // Lie so that we don't get a comma. } @@ -182,8 +186,8 @@ void DeformattedCommandMessageTarget::AddField(const wxString &name){ -LispifiedCommandOutputTarget::LispifiedCommandOutputTarget( CommandOutputTarget & target ) - : CommandOutputTarget() , +LispifiedCommandOutputTargets::LispifiedCommandOutputTargets( CommandOutputTargets & target ) + : CommandOutputTargets() , pToRestore( &target ) { mProgressTarget = std::move(target.mProgressTarget), @@ -191,7 +195,7 @@ LispifiedCommandOutputTarget::LispifiedCommandOutputTarget( CommandOutputTarget mErrorTarget = std::move( target.mErrorTarget ); } -LispifiedCommandOutputTarget::~LispifiedCommandOutputTarget() +LispifiedCommandOutputTargets::~LispifiedCommandOutputTargets() { pToRestore->mProgressTarget = std::move( mProgressTarget ); //The status was never captured so does not need restoring. @@ -199,16 +203,16 @@ LispifiedCommandOutputTarget::~LispifiedCommandOutputTarget() pToRestore->mErrorTarget = std::move( mErrorTarget ); } -DeformattedCommandOutputTarget::DeformattedCommandOutputTarget( CommandOutputTarget & target ) - : CommandOutputTarget() , +BriefCommandOutputTargets::BriefCommandOutputTargets( CommandOutputTargets & target ) + : CommandOutputTargets() , pToRestore( &target ) { mProgressTarget = std::move(target.mProgressTarget), - mStatusTarget = std::make_shared( *target.mStatusTarget.get() ), + mStatusTarget = std::make_shared( *target.mStatusTarget.get() ), mErrorTarget = std::move( target.mErrorTarget ); } -DeformattedCommandOutputTarget::~DeformattedCommandOutputTarget() +BriefCommandOutputTargets::~BriefCommandOutputTargets() { pToRestore->mProgressTarget = std::move( mProgressTarget ); //The status was never captured so does not need restoring. @@ -226,9 +230,6 @@ DeformattedCommandOutputTarget::~DeformattedCommandOutputTarget() - - -/// Dialog for long messages. class AUDACITY_DLL_API LongMessageDialog /* not final */ : public wxDialogWrapper { public: @@ -336,7 +337,10 @@ void LongMessageDialog::Flush() -/// Displays messages from a command in an AudacityMessageBox +/** +CommandMessageTarget that displays messages from a command in the +LongMessageDialog +*/ class MessageDialogTarget final : public CommandMessageTarget { public: @@ -365,8 +369,8 @@ public: -InteractiveOutputTarget::InteractiveOutputTarget() : - CommandOutputTarget( +InteractiveOutputTargets::InteractiveOutputTargets() : + CommandOutputTargets( ExtTargetFactory::ProgressDefault(), ExtTargetFactory::LongMessages(), ExtTargetFactory::MessageDefault() diff --git a/src/commands/CommandTargets.h b/src/commands/CommandTargets.h index 27bacd1c7..2560f9376 100644 --- a/src/commands/CommandTargets.h +++ b/src/commands/CommandTargets.h @@ -17,6 +17,39 @@ objects needn't be concerned with what happens to the information. Note: currently, reusing target objects is not generally safe - perhaps they should be reference-counted. +\class CommandMessageTargetDecorator +\brief CommandMessageTargetDecorator is a CommandOutputTarget that forwards +its work on to another one. Typically we derive from it to modify some +functionality and forward the rest. + +\class BriefCommandMessageTarget +\brief BriefCommandMessageTarget is a CommandOutputTarget that provides +status in a briefer listing + +\class LispyCommandMessageTarget +\brief LispyCommandMessageTarget is a CommandOutputTarget that provides status +in a lispy style. + +\class MessageDialogTarget +\brief MessageDialogTarget is a CommandOutputTarget that sends its status +to the LongMessageDialog. + +\class CommandOutputTargets +\brief CommandOutputTargets a mix of three output classes to output +progress indication, status messages and errors. + +\class BriefCommandOutputTargets +\brief BriefCommandOutputTargets is a CommandOutputTargets that replaces the +status message target with the BriefCommandMessageTarget version. + +\class LispifiedCommandOutputTargets +\brief LispifiedCommandOutputTargets is a CommandOutputTargets that replaces the +status message target with the LispyCommandMessageTarget version. + +\class ProgressToMessageTarget +\brief ProgressToMessageTarget formats the percentage complete text as a message +and sends it to that message target. + *//*******************************************************************/ #ifndef __COMMANDTARGETS__ @@ -89,10 +122,10 @@ public: virtual void AddField( const wxString &name="" )override; }; -class DeformattedCommandMessageTarget : public CommandMessageTargetDecorator /* not final */ +class BriefCommandMessageTarget : public CommandMessageTargetDecorator /* not final */ { public: - DeformattedCommandMessageTarget( CommandMessageTarget & target): CommandMessageTargetDecorator(target) {}; + BriefCommandMessageTarget( CommandMessageTarget & target): CommandMessageTargetDecorator(target) {}; virtual void StartArray() override; virtual void EndArray() override; virtual void StartStruct() override; @@ -223,8 +256,11 @@ public: }; -// By default, we ignore progress updates but display all other messages -// directly +/** +\class TargetFactory +\brief TargetFactory makes Command output targets. By default, we ignore progress +updates but display all other messages directly +*/ class TargetFactory { public: @@ -241,19 +277,19 @@ public: /// Used to aggregate the various output targets a command may have. /// Assumes responsibility for pointers passed into it. -class CommandOutputTarget +class CommandOutputTargets { public: std::unique_ptr mProgressTarget; std::shared_ptr mStatusTarget; std::shared_ptr mErrorTarget; public: - CommandOutputTarget(std::unique_ptr &&pt = TargetFactory::ProgressDefault(), + CommandOutputTargets(std::unique_ptr &&pt = TargetFactory::ProgressDefault(), std::shared_ptr &&st = TargetFactory::MessageDefault(), std::shared_ptr &&et = TargetFactory::MessageDefault()) : mProgressTarget(std::move(pt)), mStatusTarget(st), mErrorTarget(et) { } - ~CommandOutputTarget() + ~CommandOutputTargets() { } // Lots of forwarding... @@ -309,28 +345,28 @@ public: } }; -class LispifiedCommandOutputTarget : public CommandOutputTarget +class LispifiedCommandOutputTargets : public CommandOutputTargets { public : - LispifiedCommandOutputTarget( CommandOutputTarget & target ); - ~LispifiedCommandOutputTarget(); + LispifiedCommandOutputTargets( CommandOutputTargets & target ); + ~LispifiedCommandOutputTargets(); private: - CommandOutputTarget * pToRestore; + CommandOutputTargets * pToRestore; }; -class DeformattedCommandOutputTarget : public CommandOutputTarget +class BriefCommandOutputTargets : public CommandOutputTargets { public : - DeformattedCommandOutputTarget( CommandOutputTarget & target ); - ~DeformattedCommandOutputTarget(); + BriefCommandOutputTargets( CommandOutputTargets & target ); + ~BriefCommandOutputTargets(); private: - CommandOutputTarget * pToRestore; + CommandOutputTargets * pToRestore; }; -class InteractiveOutputTarget : public CommandOutputTarget +class InteractiveOutputTargets : public CommandOutputTargets { public: - InteractiveOutputTarget(); + InteractiveOutputTargets(); }; diff --git a/src/commands/CommandType.h b/src/commands/CommandType.h index 50c69ca52..2528f05a0 100644 --- a/src/commands/CommandType.h +++ b/src/commands/CommandType.h @@ -37,7 +37,7 @@ for its output. *******************************************************************/ using OldStyleCommandPointer = std::shared_ptr; -class CommandOutputTarget; +class CommandOutputTargets; class CommandSignature; class wxString; @@ -65,7 +65,7 @@ public: virtual void BuildSignature(CommandSignature &signature) = 0; // Create a command instance with the specified output target - virtual OldStyleCommandPointer Create(std::unique_ptr &&target) = 0; + virtual OldStyleCommandPointer Create(std::unique_ptr &&target) = 0; }; #endif /* End of include guard: __COMMANDTYPE__ */ diff --git a/src/commands/CompareAudioCommand.cpp b/src/commands/CompareAudioCommand.cpp index 1541f1e0d..35e687f6c 100644 --- a/src/commands/CompareAudioCommand.cpp +++ b/src/commands/CompareAudioCommand.cpp @@ -37,7 +37,7 @@ threshold of difference in two selected tracks extern void RegisterCompareAudio( Registrar & R){ R.AddCommand( make_movable() ); -// std::unique_ptr &&target +// std::unique_ptr &&target // return std::make_shared(*this, std::move(target)); } diff --git a/src/commands/GetInfoCommand.cpp b/src/commands/GetInfoCommand.cpp index e79482678..b0f22def0 100644 --- a/src/commands/GetInfoCommand.cpp +++ b/src/commands/GetInfoCommand.cpp @@ -4,16 +4,20 @@ Copyright 1999-2009 Audacity Team License: wxWidgets - Dan Horgan + James Crook ******************************************************************//** \file GetInfoCommand.cpp \brief Contains definitions for GetInfoCommand class. -This class now handles the GetAll script command, which can -- Get all keycodes -- Get all menus -- Get all boxes +This class now lists +- Commands +- Menus +- Tracks +- Clips +- Labels +- Keycodes +- Boxes *//*******************************************************************/ @@ -32,6 +36,7 @@ This class now handles the GetAll script command, which can #include "SelectCommand.h" #include "../Project.h" #include "../Track.h" +#include "../LabelTrack.h" #include "../ShuttleGui.h" #include "CommandContext.h" @@ -63,13 +68,13 @@ static const wxString kFormats[nFormats] = { XO("JSON"), XO("LISP"), - XO("Other") + XO("Brief") }; enum { kJson , kLisp, - kOther + kBrief }; @@ -104,18 +109,18 @@ bool GetInfoCommand::Apply(const CommandContext &context) { CommandContext LispyContext( *(context.GetProject()), - std::make_unique( *context.pOutput.get() ) + std::make_unique( *context.pOutput.get() ) ); return ApplyInner( LispyContext ); } - if( mFormat == kOther ) + if( mFormat == kBrief ) { - CommandContext DeformattedContext( + CommandContext BriefContext( *(context.GetProject()), - std::make_unique( *context.pOutput.get() ) + std::make_unique( *context.pOutput.get() ) ); - return ApplyInner( DeformattedContext ); + return ApplyInner( BriefContext ); } return false; @@ -271,13 +276,61 @@ bool GetInfoCommand::SendTracks(const CommandContext & context) bool GetInfoCommand::SendClips(const CommandContext &context) { - context.Status("Clips - Not yet"); + TrackList *tracks = context.GetProject()->GetTracks(); + TrackListIterator iter(tracks); + Track *t = iter.First(); + int i=0; + context.StartArray(); + while (t) { + if (t->GetKind() == Track::Wave) { + WaveTrack *waveTrack = static_cast(t); + for(const auto &clip : waveTrack->GetAllClips()) { + context.StartStruct(); + context.AddItem( (double)i, "track" ); + context.AddItem( clip->GetStartTime(), "start" ); + context.AddItem( clip->GetEndTime(), "end" ); + context.AddItem( clip->GetColourIndex(), "color" ); + context.EndStruct(); + } + } + t = iter.Next(); + i++; + } + context.EndArray(); + return true; } bool GetInfoCommand::SendLabels(const CommandContext &context) { - context.Status("Labels - Not yet"); + TrackList *tracks = context.GetProject()->GetTracks(); + TrackListIterator iter(tracks); + Track *t = iter.First(); + int i=0; + context.StartArray(); + while (t) { + if (t->GetKind() == Track::Label) { + LabelTrack *labelTrack = static_cast(t); + if( labelTrack ) + { + for (int nn = 0; nn< (int)labelTrack->mLabels.size(); nn++) { + const auto &label = labelTrack->mLabels[nn]; + context.StartStruct(); + context.AddItem( (double)i, "track" ); + context.AddItem( label.getT0(), "start" ); + context.AddItem( label.getT1(), "end" ); + context.AddItem( label.title, "text" ); + context.EndStruct(); + } + } + } + t = iter.Next(); + i++; + } + context.EndArray(); + + + return true; } diff --git a/src/commands/MessageCommand.cpp b/src/commands/MessageCommand.cpp index 116e1588e..8ebd20ba1 100644 --- a/src/commands/MessageCommand.cpp +++ b/src/commands/MessageCommand.cpp @@ -29,7 +29,7 @@ void MessageCommandType::BuildSignature(CommandSignature &signature) signature.AddParameter(wxT("MessageString"), wxT("Connected"), std::move(stringValidator)); } -OldStyleCommandPointer MessageCommandType::Create(std::unique_ptr &&target) +OldStyleCommandPointer MessageCommandType::Create(std::unique_ptr &&target) { return std::make_shared(*this); } diff --git a/src/commands/MessageCommand.h b/src/commands/MessageCommand.h index 9f5d75530..d0f53cde9 100644 --- a/src/commands/MessageCommand.h +++ b/src/commands/MessageCommand.h @@ -29,7 +29,7 @@ class MessageCommandType final : public OldStyleCommandType public: wxString BuildName() override; void BuildSignature(CommandSignature &signature) override; - OldStyleCommandPointer Create(std::unique_ptr &&target) override; + OldStyleCommandPointer Create(std::unique_ptr &&target) override; }; class MessageCommand final : public CommandImplementation diff --git a/src/commands/ScreenshotCommand.h b/src/commands/ScreenshotCommand.h index 64cdca5dd..52a71cd3e 100644 --- a/src/commands/ScreenshotCommand.h +++ b/src/commands/ScreenshotCommand.h @@ -22,7 +22,7 @@ class wxTopLevelWindow; class wxCommandEvent; class wxRect; class ToolManager; -class CommandOutputTarget; +class CommandOutputTargets; class TrackPanel; class AdornedRulerPanel; class AudacityProject; diff --git a/win/Projects/Audacity/Audacity.vcxproj b/win/Projects/Audacity/Audacity.vcxproj index d1df20878..b0004580e 100755 --- a/win/Projects/Audacity/Audacity.vcxproj +++ b/win/Projects/Audacity/Audacity.vcxproj @@ -406,7 +406,6 @@ - @@ -758,7 +757,6 @@ - diff --git a/win/Projects/Audacity/Audacity.vcxproj.filters b/win/Projects/Audacity/Audacity.vcxproj.filters index 8fad169d7..bb097b7b3 100755 --- a/win/Projects/Audacity/Audacity.vcxproj.filters +++ b/win/Projects/Audacity/Audacity.vcxproj.filters @@ -1037,9 +1037,6 @@ src\commands - - src\commands - src\commands @@ -2098,9 +2095,6 @@ src\commands - - src\commands - src\commands