Audacity  3.0.3
MessageCommand.cpp
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 
9 ******************************************************************//*******************************************************************/
15 
16 
17 #include "MessageCommand.h"
18 
19 #include "LoadCommands.h"
20 #include "CommandContext.h"
21 #include "../Shuttle.h"
22 #include "../ShuttleGui.h"
23 
25 { XO("Message") };
26 
28 
30  S.Define( mMessage, wxT("Text"), "Some message" );
31  return true;
32 }
33 
35 {
36  S.AddSpace(0, 5);
37 
38  S.StartMultiColumn(2, wxALIGN_CENTER);
39  {
40  S.TieTextBox(XXO("Text:"),mMessage,60);
41  }
42  S.EndMultiColumn();
43 }
44 
45 bool MessageCommand::Apply(const CommandContext & context){
46  context.Status( mMessage );
47  return true;
48 }
LoadCommands.h
anonymous_namespace{MessageCommand.cpp}::reg
BuiltinCommandsModule::Registration< MessageCommand > reg
Definition: MessageCommand.cpp:27
MessageCommand.h
Contains definition of MessageCommand class.
MessageCommand::DefineParams
bool DefineParams(ShuttleParams &S) override
Definition: MessageCommand.cpp:29
ShuttleGui::AddSpace
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2421
XO
#define XO(s)
Definition: Internat.h:32
MessageCommand::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: MessageCommand.cpp:34
ShuttleParams
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:61
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1212
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterface.h:60
ShuttleGuiBase::TieTextBox
wxTextCtrl * TieTextBox(const TranslatableString &Caption, wxString &Value, const int nChars=0)
Definition: ShuttleGui.cpp:1626
BuiltinCommandsModule::Registration
Definition: LoadCommands.h:41
MessageCommand::Apply
bool Apply(const CommandContext &context) override
Definition: MessageCommand.cpp:45
CommandContext::Status
virtual void Status(const wxString &message, bool bFlush=false) const
Definition: CommandContext.cpp:63
CommandContext.h
XXO
#define XXO(s)
Definition: Internat.h:45
CommandContext
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
Definition: CommandContext.h:22
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1203
MessageCommand::mMessage
wxString mMessage
Definition: MessageCommand.h:40
MessageCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: MessageCommand.h:30
ShuttleParams::Define
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
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:638