Audacity  3.0.3
ShuttleGetDefinition.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  ShuttleGetDefinition.h
6 
7  Paul Licameli split this out of Shuttle.h
8 
9 **********************************************************************/
10 
11 #ifndef __AUDACITY_SHUTTLE_GET_DEFINITION__
12 #define __AUDACITY_SHUTTLE_GET_DEFINITION__
13 
14 #include "Shuttle.h" // to inherit
15 #include "commands/CommandTargets.h" // to inherit
16 
17 /**************************************************************************/
20 class AUDACITY_DLL_API ShuttleGetDefinition final
22 {
23 public:
25  wxString Result;
26  bool IsOptional();
27  ShuttleParams & Optional( bool & var ) override;
28  void Define( bool & var, const wxChar * key, const bool vdefault, const bool vmin, const bool vmax, const bool vscl ) override;
29  void Define( int & var, const wxChar * key, const int vdefault, const int vmin, const int vmax, const int vscl ) override;
30  void Define( size_t & var, const wxChar * key, const int vdefault, const int vmin, const int vmax, const int vscl ) override;
31  void Define( float & var, const wxChar * key, const float vdefault, const float vmin, const float vmax, const float vscl ) override;
32  void Define( double & var, const wxChar * key, const float vdefault, const float vmin, const float vmax, const float vscl ) override;
33  void Define( double & var, const wxChar * key, const double vdefault, const double vmin, const double vmax, const double vscl ) override;
34  void Define( wxString &var, const wxChar * key, const wxString vdefault, const wxString vmin, const wxString vmax, const wxString vscl ) override;
35  void DefineEnum( int &var, const wxChar * key, const int vdefault,
36  const EnumValueSymbol strings[], size_t nStrings ) override;
37 };
38 
39 #endif
ShuttleParams
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:62
CommandMessageTarget
Interface for objects that can receive (string) messages from a command.
Definition: CommandTargets.h:75
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
CommandMessageTargetDecorator
CommandMessageTargetDecorator is a CommandOutputTarget that forwards its work on to another one....
Definition: CommandTargets.h:95
ShuttleGetDefinition::Result
wxString Result
Definition: ShuttleGetDefinition.h:25
ShuttleParams::DefineEnum
virtual void DefineEnum(int &var, const wxChar *key, const int vdefault, const EnumValueSymbol strings[], size_t nStrings)
Definition: Shuttle.cpp:339
CommandTargets.h
key
static const AudacityProject::AttachedObjects::RegisteredFactory key
Definition: CommandManager.cpp:201
Shuttle.h
ShuttleGetDefinition
Shuttle that retrieves a JSON format definition of a command's parameters.
Definition: ShuttleGetDefinition.h:22
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
ShuttleParams::Optional
virtual ShuttleParams & Optional(bool &WXUNUSED(var))
Definition: Shuttle.h:70