Audacity 3.2.0
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:
[legend]
Collaboration diagram for DemoCommand:
[legend]

Public Member Functions

ComponentInterfaceSymbol GetSymbol () const override
 
TranslatableString GetDescription () const override
 
template<bool Const>
bool VisitSettings (SettingsVisitorBase< Const > &S)
 
bool VisitSettings (SettingsVisitor &S) override
 
bool VisitSettings (ConstSettingsVisitor &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 () const override
 
VendorSymbol GetVendor () const override
 
wxString GetVersion () const override
 
ComponentInterfaceSymbol GetSymbol () const override=0
 
virtual TranslatableString GetDescription () const override
 
virtual ManualPageID ManualPage ()
 
virtual bool IsBatchProcessing () const
 
virtual void SetBatchProcessing (bool start)
 
virtual bool Apply (const CommandContext &WXUNUSED(context))
 
bool ShowInterface (wxWindow *parent, bool forceModal=false)
 
wxDialog * CreateUI (wxWindow *parent, AudacityCommand *client)
 
bool SaveSettingsAsString (wxString &parms)
 
bool LoadSettingsFromString (const wxString &parms)
 
bool DoAudacityCommand (const CommandContext &context, bool shouldPrompt=true)
 
int MessageBox (const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
 
virtual bool Init ()
 
virtual bool PromptUser (AudacityProject &)
 
virtual bool CheckWhetherSkipAudacityCommand ()
 
virtual void End ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
virtual bool TransferDataToWindow ()
 
virtual bool TransferDataFromWindow ()
 
virtual bool VisitSettings (SettingsVisitor &)
 
virtual bool VisitSettings (ConstSettingsVisitor &)
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
virtual PluginPath GetPath () const =0
 
virtual ComponentInterfaceSymbol GetSymbol () const =0
 
virtual VendorSymbol GetVendor () const =0
 
virtual wxString GetVersion () const =0
 
virtual TranslatableString GetDescription () const =0
 
TranslatableString GetName () const
 

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 }
 
- Protected Attributes inherited from AudacityCommand
ProgressDialogmProgress
 
wxDialog * mUIDialog
 
wxWindow * mUIParent
 

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)
override

Definition at line 53 of file Demo.cpp.

53 {
54 context.Status( "A Message");
55 return true;
56}
virtual void Status(const wxString &message, bool bFlush=false) const

References CommandContext::Status().

Here is the call graph for this function:

◆ GetDescription()

TranslatableString DemoCommand::GetDescription ( ) const
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 26 of file Demo.h.

26{return XO("Does the demo action.");};
XO("Cut/Copy/Paste")

References XO().

Here is the call graph for this function:

◆ GetSymbol()

ComponentInterfaceSymbol DemoCommand::GetSymbol ( ) const
inlineoverridevirtual

Implements AudacityCommand.

Definition at line 25 of file Demo.h.

25{return Symbol;};
static const ComponentInterfaceSymbol Symbol
Definition: Demo.h:22

References Symbol.

◆ ManualPage()

ManualPageID DemoCommand::ManualPage ( )
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 34 of file Demo.h.

34{return L"Extra_Menu:_Scriptables_I";}

◆ PopulateOrExchange()

void DemoCommand::PopulateOrExchange ( ShuttleGui S)
override

Definition at line 58 of file Demo.cpp.

59{
60 S.AddSpace(0, 5);
61
62 S.StartMultiColumn(2, wxALIGN_CENTER);
63 {
64 S.TieTextBox(XXO("Delay time (seconds):"),delay);
65 S.TieTextBox(XXO("Decay factor:"),decay);
66 }
67 S.EndMultiColumn();
68}
XXO("&Cut/Copy/Paste Toolbar")
#define S(N)
Definition: ToChars.cpp:64
double delay
Definition: Demo.h:37
double decay
Definition: Demo.h:38

References decay, delay, S, and XXO().

Here is the call graph for this function:

◆ VisitSettings() [1/3]

bool DemoCommand::VisitSettings ( ConstSettingsVisitor )
overridevirtual

Visit settings, if defined. false means no defined settings. Default implementation returns false

Reimplemented from AudacityCommand.

Definition at line 50 of file Demo.cpp.

51 { return VisitSettings<true>(S); }

References S.

◆ VisitSettings() [2/3]

bool DemoCommand::VisitSettings ( SettingsVisitor )
overridevirtual

Visit settings, if defined. false means no defined settings. Default implementation returns false

Reimplemented from AudacityCommand.

Definition at line 47 of file Demo.cpp.

48 { return VisitSettings<false>(S); }

References S.

◆ VisitSettings() [3/3]

template<bool Const>
bool DemoCommand::VisitSettings ( SettingsVisitorBase< Const > &  S)

Definition at line 41 of file Demo.cpp.

41 {
42 S.Define( delay, wxT("Delay"), 1.0f, 0.001f, FLT_MAX, 1.0f );
43 S.Define( decay, wxT("Decay"), 0.5f, 0.0f, FLT_MAX, 1.0f );
44 return true;
45}
wxT("CloseDown"))

References decay, delay, S, and wxT().

Here is the call graph for this function:

Member Data Documentation

◆ decay

double DemoCommand::decay
private

Definition at line 38 of file Demo.h.

Referenced by PopulateOrExchange(), and VisitSettings().

◆ delay

double DemoCommand::delay
private

Definition at line 37 of file Demo.h.

Referenced by PopulateOrExchange(), and VisitSettings().

◆ Symbol

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

Definition at line 22 of file Demo.h.

Referenced by GetSymbol().


The documentation for this class was generated from the following files: