Audacity  3.0.3
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
MessageCommand Class Reference

Command to get a message response. Used for testing, and used internally to create messages for forwarding. More...

#include <MessageCommand.h>

Inheritance diagram for MessageCommand:
Collaboration diagram for MessageCommand:

Public Member Functions

ComponentInterfaceSymbol GetSymbol () override
TranslatableString GetDescription () override
bool DefineParams (ShuttleParams &S) override
void PopulateOrExchange (ShuttleGui &S) override
bool Apply (const CommandContext &context) override
ManualPageID ManualPage () override
- Public Member Functions inherited from AudacityCommand
 AudacityCommand ()
virtual ~AudacityCommand ()
PluginPath GetPath () override
VendorSymbol GetVendor () override
wxString GetVersion () override
virtual bool IsBatchProcessing ()
virtual void SetBatchProcessing (bool start)
virtual bool Apply (const CommandContext &WXUNUSED(context))
bool ShowInterface (wxWindow *parent, bool forceModal=false)
virtual void SetHostUI (EffectUIHostInterface *WXUNUSED(host))
wxDialog * CreateUI (wxWindow *parent, AudacityCommand *client)
virtual bool GetAutomationParameters (wxString &parms)
virtual bool SetAutomationParameters (const wxString &parms)
bool DoAudacityCommand (wxWindow *parent, const CommandContext &context, bool shouldPrompt=true)
int MessageBox (const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
virtual bool Init ()
virtual bool PromptUser (wxWindow *parent)
virtual bool CheckWhetherSkipAudacityCommand ()
virtual void End ()
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
virtual bool TransferDataToWindow ()
virtual bool TransferDataFromWindow ()
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
TranslatableString GetName ()
virtual bool DefineParams (ShuttleParams &WXUNUSED(S))

Public Attributes

wxString mMessage

Static Public Attributes

static const ComponentInterfaceSymbol Symbol { XO("Message") }

Additional Inherited Members

- Public Types inherited from AudacityCommand
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
using VetoDialogHook = bool(*)(wxDialog *)
- Static Public Member Functions inherited from AudacityCommand
static VetoDialogHook SetVetoDialogHook (VetoDialogHook hook)
- Protected Attributes inherited from AudacityCommand
wxDialog * mUIDialog
wxWindow * mUIParent
int mUIResultID

Detailed Description

Command to get a message response. Used for testing, and used internally to create messages for forwarding.

Command to send a message (currently on the status channel)

Definition at line 27 of file MessageCommand.h.

Member Function Documentation

◆ Apply()

bool MessageCommand::Apply ( const CommandContext context)

Definition at line 45 of file MessageCommand.cpp.

45  {
46  context.Status( mMessage );
47  return true;
48 }

References mMessage, and CommandContext::Status().

Here is the call graph for this function:

◆ DefineParams()

bool MessageCommand::DefineParams ( ShuttleParams S)

Definition at line 29 of file MessageCommand.cpp.

29  {
30  S.Define( mMessage, wxT("Text"), "Some message" );
31  return true;
32 }

References ShuttleParams::Define(), and mMessage.

Here is the call graph for this function:

◆ GetDescription()

TranslatableString MessageCommand::GetDescription ( )

Reimplemented from AudacityCommand.

Definition at line 34 of file MessageCommand.h.

34 {return XO("Echos a message.");};

References XO.

◆ GetSymbol()

ComponentInterfaceSymbol MessageCommand::GetSymbol ( )

Implements AudacityCommand.

Definition at line 33 of file MessageCommand.h.

33 {return Symbol;};

References Symbol.

◆ ManualPage()

ManualPageID MessageCommand::ManualPage ( )

Reimplemented from AudacityCommand.

Definition at line 40 of file MessageCommand.h.

40 {return L"Extra_Menu:_Scriptables_II#message";}

◆ PopulateOrExchange()

void MessageCommand::PopulateOrExchange ( ShuttleGui S)

Definition at line 34 of file MessageCommand.cpp.

35 {
36  S.AddSpace(0, 5);
38  S.StartMultiColumn(2, wxALIGN_CENTER);
39  {
40  S.TieTextBox(XXO("Text:"),mMessage,60);
41  }
42  S.EndMultiColumn();
43 }

References ShuttleGui::AddSpace(), ShuttleGuiBase::EndMultiColumn(), mMessage, ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::TieTextBox(), and XXO.

Here is the call graph for this function:

Member Data Documentation

◆ mMessage

wxString MessageCommand::mMessage

Definition at line 42 of file MessageCommand.h.

Referenced by Apply(), DefineParams(), and PopulateOrExchange().

◆ Symbol

const ComponentInterfaceSymbol MessageCommand::Symbol { XO("Message") }

Definition at line 30 of file MessageCommand.h.

Referenced by GetSymbol().

The documentation for this class was generated from the following files:
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2459
#define XO(s)
Definition: Internat.h:31
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
wxTextCtrl * TieTextBox(const TranslatableString &Caption, wxString &Value, const int nChars=0)
Definition: ShuttleGui.cpp:1652
virtual void Status(const wxString &message, bool bFlush=false) const
Definition: CommandContext.cpp:63
#define XXO(s)
Definition: Internat.h:44
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
wxString mMessage
Definition: MessageCommand.h:42
static const ComponentInterfaceSymbol Symbol
Definition: MessageCommand.h:30
virtual void Define(bool &var, const wxChar *key, const bool vdefault, const bool vmin=false, const bool vmax=false, const bool vscl=false)
Definition: Shuttle.cpp:332