mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-22 06:22:58 +02:00
Make Message command into an AudacityCommand.
This commit is contained in:
committed by
Paul Licameli
parent
edf90d6e2c
commit
f7fe295651
@@ -17,26 +17,25 @@
|
||||
#include "MessageCommand.h"
|
||||
#include "CommandType.h"
|
||||
#include "CommandContext.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
wxString MessageCommandType::BuildName()
|
||||
{
|
||||
return wxT("Message");
|
||||
}
|
||||
|
||||
void MessageCommandType::BuildSignature(CommandSignature &signature)
|
||||
{
|
||||
auto stringValidator = make_movable<DefaultValidator>();
|
||||
signature.AddParameter(wxT("MessageString"), wxT("Connected"), std::move(stringValidator));
|
||||
}
|
||||
|
||||
OldStyleCommandPointer MessageCommandType::Create(std::unique_ptr<CommandOutputTargets> &&target)
|
||||
{
|
||||
return std::make_shared<MessageCommand>(*this);
|
||||
}
|
||||
|
||||
bool MessageCommand::Apply(const CommandContext & context)
|
||||
{
|
||||
wxString message = GetString(wxT("MessageString"));
|
||||
context.Status(message);
|
||||
bool MessageCommand::DefineParams( ShuttleParams & S ){
|
||||
S.Define( mMessage, wxT("Text"), "Some message" );
|
||||
return true;
|
||||
}
|
||||
|
||||
void MessageCommand::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
S.AddSpace(0, 5);
|
||||
|
||||
S.StartMultiColumn(2, wxALIGN_CENTER);
|
||||
{
|
||||
S.TieTextBox(_("Text:"),mMessage,60);
|
||||
}
|
||||
S.EndMultiColumn();
|
||||
}
|
||||
|
||||
bool MessageCommand::Apply(const CommandContext & context){
|
||||
context.Status( mMessage );
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user