1 /**********************************************************************
2 
3   Audacity: A Digital Audio Editor
4 
5   Demo.cpp
6 
7   James Crook
8 
9 *******************************************************************//**
10 
11 \class DemoCommand
12 \brief An AudacityCommand that does nothing but provide
13 parameters.  It is for development purposes.
14 
15 *//****************************************************************//**
16 
17 \class DemoDialog
18 \brief DemoDialog used with DemoCommand
19 
20 *//*******************************************************************/
21 
22 
23 #include "Demo.h"
24 #include "LoadCommands.h"
25 
26 #include <float.h>
27 
28 #include <wx/intl.h>
29 
30 #include "../Shuttle.h"
31 #include "../ShuttleGui.h"
32 #include "../widgets/AudacityMessageBox.h"
33 #include "../widgets/valnum.h"
34 #include "../commands/CommandContext.h"
35 
36 const ComponentInterfaceSymbol DemoCommand::Symbol
37 { XO("Demo") };
38 
39 //Don't register the demo command.
40 //namespace{ BuiltinCommandsModule::Registration< DemoCommand > reg; }
41 
DefineParams(ShuttleParams & S)42 bool DemoCommand::DefineParams( ShuttleParams & S ){
43    S.Define( delay, wxT("Delay"), 1.0f, 0.001f,  FLT_MAX, 1.0f );
44    S.Define( decay, wxT("Decay"), 0.5f, 0.0f,    FLT_MAX, 1.0f  );
45    return true;
46 }
47 
Apply(const CommandContext & context)48 bool DemoCommand::Apply(const CommandContext & context){
49    context.Status( "A Message");
50    return true;
51 }
52 
PopulateOrExchange(ShuttleGui & S)53 void DemoCommand::PopulateOrExchange(ShuttleGui & S)
54 {
55    S.AddSpace(0, 5);
56 
57    S.StartMultiColumn(2, wxALIGN_CENTER);
58    {
59       S.TieTextBox(XXO("Delay time (seconds):"),delay);
60       S.TieTextBox(XXO("Decay factor:"),decay);
61    }
62    S.EndMultiColumn();
63 }
64 
65 
66 
67