Audacity  3.0.3
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
DemoCommand Class Referencefinal

An AudacityCommand that does nothing but provide parameters. It is for development purposes. More...

#include <Demo.h>

Inheritance diagram for DemoCommand:
Collaboration diagram for DemoCommand:

Public Member Functions

ComponentInterfaceSymbol GetSymbol () override
TranslatableString GetDescription () override
bool DefineParams (ShuttleParams &S) override
void PopulateOrExchange (ShuttleGui &S) override
bool Apply (const CommandContext &context) override
ManualPageID ManualPage () override
- Public Member Functions inherited from AudacityCommand
 AudacityCommand ()
virtual ~AudacityCommand ()
PluginPath GetPath () override
VendorSymbol GetVendor () override
wxString GetVersion () override
virtual bool IsBatchProcessing ()
virtual void SetBatchProcessing (bool start)
virtual bool Apply (const CommandContext &WXUNUSED(context))
bool ShowInterface (wxWindow *parent, bool forceModal=false)
virtual void SetHostUI (EffectUIHostInterface *WXUNUSED(host))
wxDialog * CreateUI (wxWindow *parent, AudacityCommand *client)
virtual bool GetAutomationParameters (wxString &parms)
virtual bool SetAutomationParameters (const wxString &parms)
bool DoAudacityCommand (wxWindow *parent, const CommandContext &context, bool shouldPrompt=true)
int MessageBox (const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
virtual bool Init ()
virtual bool PromptUser (wxWindow *parent)
virtual bool CheckWhetherSkipAudacityCommand ()
virtual void End ()
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
virtual bool TransferDataToWindow ()
virtual bool TransferDataFromWindow ()
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
TranslatableString GetName ()
virtual bool DefineParams (ShuttleParams &WXUNUSED(S))

Static Public Attributes

static const ComponentInterfaceSymbol Symbol { XO("Demo") }

Private Attributes

double delay
double decay

Additional Inherited Members

- Public Types inherited from AudacityCommand
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
using VetoDialogHook = bool(*)(wxDialog *)
- Static Public Member Functions inherited from AudacityCommand
static VetoDialogHook SetVetoDialogHook (VetoDialogHook hook)
- Protected Attributes inherited from AudacityCommand
wxDialog * mUIDialog
wxWindow * mUIParent
int mUIResultID

Detailed Description

An AudacityCommand that does nothing but provide parameters. It is for development purposes.

Definition at line 19 of file Demo.h.

Member Function Documentation

◆ Apply()

bool DemoCommand::Apply ( const CommandContext context)

Definition at line 48 of file Demo.cpp.

48  {
49  context.Status( "A Message");
50  return true;
51 }

References CommandContext::Status().

Here is the call graph for this function:

◆ DefineParams()

bool DemoCommand::DefineParams ( ShuttleParams S)

Definition at line 42 of file Demo.cpp.

42  {
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 }

References decay, ShuttleParams::Define(), and delay.

Here is the call graph for this function:

◆ GetDescription()

TranslatableString DemoCommand::GetDescription ( )

Reimplemented from AudacityCommand.

Definition at line 26 of file Demo.h.

26 {return XO("Does the demo action.");};

References XO.

◆ GetSymbol()

ComponentInterfaceSymbol DemoCommand::GetSymbol ( )

Implements AudacityCommand.

Definition at line 25 of file Demo.h.

25 {return Symbol;};

References Symbol.

◆ ManualPage()

ManualPageID DemoCommand::ManualPage ( )

Reimplemented from AudacityCommand.

Definition at line 32 of file Demo.h.

32 {return L"Extra_Menu:_Scriptables_I";}

◆ PopulateOrExchange()

void DemoCommand::PopulateOrExchange ( ShuttleGui S)

Definition at line 53 of file Demo.cpp.

54 {
55  S.AddSpace(0, 5);
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 }

References ShuttleGui::AddSpace(), decay, delay, ShuttleGuiBase::EndMultiColumn(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::TieTextBox(), and XXO.

Here is the call graph for this function:

Member Data Documentation

◆ decay

double DemoCommand::decay

Definition at line 36 of file Demo.h.

Referenced by DefineParams(), and PopulateOrExchange().

◆ delay

double DemoCommand::delay

Definition at line 35 of file Demo.h.

Referenced by DefineParams(), and PopulateOrExchange().

◆ Symbol

const ComponentInterfaceSymbol DemoCommand::Symbol { XO("Demo") }

Definition at line 22 of file Demo.h.

Referenced by GetSymbol().

The documentation for this class was generated from the following files:
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2459
#define XO(s)
Definition: Internat.h:31
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
static const ComponentInterfaceSymbol Symbol
Definition: Demo.h:22
wxTextCtrl * TieTextBox(const TranslatableString &Caption, wxString &Value, const int nChars=0)
Definition: ShuttleGui.cpp:1652
virtual void Status(const wxString &message, bool bFlush=false) const
Definition: CommandContext.cpp:63
#define XXO(s)
Definition: Internat.h:44
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
double decay
Definition: Demo.h:36
double delay
Definition: Demo.h:35
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