Audacity  2.2.2
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 #include "../Audacity.h"
17 #include "MessageCommand.h"
18 #include "CommandType.h"
19 #include "CommandContext.h"
20 #include "../ShuttleGui.h"
21 
23  S.Define( mMessage, wxT("Text"), "Some message" );
24  return true;
25 }
26 
28 {
29  S.AddSpace(0, 5);
30 
31  S.StartMultiColumn(2, wxALIGN_CENTER);
32  {
33  S.TieTextBox(_("Text:"),mMessage,60);
34  }
35  S.EndMultiColumn();
36 }
37 
38 bool MessageCommand::Apply(const CommandContext & context){
39  context.Status( mMessage );
40  return true;
41 }
void PopulateOrExchange(ShuttleGui &S) override
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
bool DefineParams(ShuttleParams &S) override
Contains declarations for CommandType class.
void EndMultiColumn()
virtual void Status(const wxString &message, bool bFlush=false) const
CommandContext provides addiitonal information to an 'Apply()' command. It provides the project...
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:60
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
wxString mMessage
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:339
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
Contains definition of MessageCommand class.
wxSizerItem * AddSpace(int width, int height)
wxTextCtrl * TieTextBox(const wxString &Prompt, WrappedType &WrappedRef, const int nChars)
virtual bool Apply()