Audacity  2.3.1
Demo.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  Demo.cpp
6 
7  James Crook
8 
9 *******************************************************************//****************************************************************//*******************************************************************/
21 
22 #include "../Audacity.h"
23 #include "Demo.h"
24 
25 #include <float.h>
26 
27 #include <wx/intl.h>
28 
29 #include "../ShuttleGui.h"
30 #include "../widgets/ErrorDialog.h"
31 #include "../widgets/valnum.h"
32 #include "../SampleFormat.h"
33 #include "../commands/Command.h"
34 #include "../commands/CommandContext.h"
35 
37  S.Define( delay, wxT("Delay"), 1.0f, 0.001f, FLT_MAX, 1.0f );
38  S.Define( decay, wxT("Decay"), 0.5f, 0.0f, FLT_MAX, 1.0f );
39  return true;
40 }
41 
42 bool DemoCommand::Apply(const CommandContext & context){
43  context.Status( "A Message");
44  return true;
45 }
46 
48 {
49  S.AddSpace(0, 5);
50 
51  S.StartMultiColumn(2, wxALIGN_CENTER);
52  {
53  S.TieTextBox(_("Delay time (seconds):"),delay);
54  S.TieTextBox(_("Decay factor:"),decay);
55  }
56  S.EndMultiColumn();
57 }
58 
59 
60 
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
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
double decay
Definition: Demo.h:40
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
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:338
_("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
double delay
Definition: Demo.h:36
void PopulateOrExchange(ShuttleGui &S) override
Definition: Demo.cpp:47
wxSizerItem * AddSpace(int width, int height)
bool DefineParams(ShuttleParams &S) override
Definition: Demo.cpp:36
wxTextCtrl * TieTextBox(const wxString &Prompt, WrappedType &WrappedRef, const int nChars)
virtual bool Apply()