Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
AudioUnitEffectOptionsDialog Class Referencefinal

#include <AudioUnitEffectOptionsDialog.h>

Inheritance diagram for AudioUnitEffectOptionsDialog:
[legend]
Collaboration diagram for AudioUnitEffectOptionsDialog:
[legend]

Public Member Functions

 AudioUnitEffectOptionsDialog (const EffectDefinitionInterface &effect)
 
virtual ~AudioUnitEffectOptionsDialog ()
 
void PopulateOrExchange (ShuttleGui &S)
 
void OnOk (wxCommandEvent &evt)
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
void SetTitle (const TranslatableString &title)
 
void SetLabel (const TranslatableString &title)
 
void SetName (const TranslatableString &title)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Attributes

const EffectDefinitionInterfacemEffect
 
bool mUseLatency
 
TranslatableString mUITypeString
 

Detailed Description

Definition at line 30 of file AudioUnitEffectOptionsDialog.h.

Constructor & Destructor Documentation

◆ AudioUnitEffectOptionsDialog()

AudioUnitEffectOptionsDialog::AudioUnitEffectOptionsDialog ( const EffectDefinitionInterface effect)
explicit

Definition at line 30 of file AudioUnitEffectOptionsDialog.cpp.

32 : wxDialogWrapper{ nullptr, wxID_ANY, XO("Audio Unit Effect Options") }
33 , mEffect{ effect }
34{
35 // Consult preferences
36 // Decide mUseLatency, which affects GetLatency(), which is actually used
37 // so far only in destructive effect processing
39 mUseLatency, true);
40
41 wxString uiType;
43 uiType, FullValue.MSGID().GET() /* Config stores un-localized string */);
44 // Get the localization of the string for display to the user
45 mUITypeString = TranslatableString{ uiType, {} };
46
49}
constexpr auto OptionsKey
constexpr auto UseLatencyKey
static const auto FullValue
constexpr auto UITypeKey
XO("Cut/Copy/Paste")
@ eIsCreating
Definition: ShuttleGui.h:37
#define S(N)
Definition: ToChars.cpp:64
const EffectDefinitionInterface & mEffect
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Holds a msgid for the translation catalog; may also bind format arguments.
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)

References XO().

Here is the call graph for this function:

◆ ~AudioUnitEffectOptionsDialog()

AudioUnitEffectOptionsDialog::~AudioUnitEffectOptionsDialog ( )
virtual

Definition at line 51 of file AudioUnitEffectOptionsDialog.cpp.

52{
53}

Member Function Documentation

◆ OnOk()

void AudioUnitEffectOptionsDialog::OnOk ( wxCommandEvent &  evt)

Definition at line 117 of file AudioUnitEffectOptionsDialog.cpp.

118{
119 if (!Validate())
120 return;
121
122 // This re-visits the controls, not to create them but to transfer values out
125
126 // un-translate the type
127 auto uiType = mUITypeString.MSGID().GET();
128
129 // Save changed values to the config file
133
134 EndModal(wxID_OK);
135}
@ eIsGettingFromDialog
Definition: ShuttleGui.h:38
const wxString & GET() const
Explicit conversion to wxString, meant to be ugly-looking and demanding of a comment why it's correct...
Definition: Identifier.h:66
Identifier MSGID() const
MSGID is the English lookup key in the catalog, not necessarily for user's eyes if locale is some oth...
bool SetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, const Value &value)

References eIsGettingFromDialog, Identifier::GET(), mEffect, TranslatableString::MSGID(), mUITypeString, mUseLatency, OptionsKey, PopulateOrExchange(), S, PluginSettings::SetConfig(), PluginSettings::Shared, UITypeKey, and UseLatencyKey.

Here is the call graph for this function:

◆ PopulateOrExchange()

void AudioUnitEffectOptionsDialog::PopulateOrExchange ( ShuttleGui S)

Definition at line 55 of file AudioUnitEffectOptionsDialog.cpp.

56{
57 S.SetBorder(5);
58 S.StartHorizontalLay(wxEXPAND, 1);
59 {
60 S.StartVerticalLay(false);
61 {
62 S.StartStatic(XO("Latency Compensation"));
63 {
64 S.AddVariableText(XO(
65"As part of their processing, some Audio Unit effects must delay returning "
66"audio to Audacity. When not compensating for this delay, you will "
67"notice that small silences have been inserted into the audio. "
68"Enabling this option will provide that compensation, but it may "
69"not work for all Audio Unit effects."),
70 false, 0, 650);
71
72 S.StartHorizontalLay(wxALIGN_LEFT);
73 {
74 S.TieCheckBox(XXO("Enable &compensation"),
76 }
77 S.EndHorizontalLay();
78 }
79 S.EndStatic();
80
81 S.StartStatic(XO("User Interface"));
82 {
83 S.AddVariableText(XO(
84"Select \"Full\" to use the graphical interface if supplied by the Audio Unit."
85" Select \"Generic\" to use the system supplied generic interface."
86#if defined(HAVE_AUDIOUNIT_BASIC_SUPPORT)
87" Select \"Basic\" for a basic text-only interface."
88#endif
89" Reopen the effect for this to take effect."),
90 false, 0, 650);
91
92 S.StartHorizontalLay(wxALIGN_LEFT);
93 {
94 S.TieChoice(XXO("Select &interface"),
96 {
99#if defined(HAVE_AUDIOUNIT_BASIC_SUPPORT)
101#endif
102 });
103 }
104 S.EndHorizontalLay();
105 }
106 S.EndStatic();
107 }
108 S.EndVerticalLay();
109 }
110 S.EndHorizontalLay();
111 S.AddStandardButtons();
112 Layout();
113 Fit();
114 Center();
115}
static const auto BasicValue
static const auto GenericValue
XXO("&Cut/Copy/Paste Toolbar")

References BasicValue, FullValue, GenericValue, mUITypeString, mUseLatency, S, XO(), and XXO().

Referenced by OnOk().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mEffect

const EffectDefinitionInterface& AudioUnitEffectOptionsDialog::mEffect
private

Definition at line 39 of file AudioUnitEffectOptionsDialog.h.

Referenced by OnOk().

◆ mUITypeString

TranslatableString AudioUnitEffectOptionsDialog::mUITypeString
private

Definition at line 41 of file AudioUnitEffectOptionsDialog.h.

Referenced by OnOk(), and PopulateOrExchange().

◆ mUseLatency

bool AudioUnitEffectOptionsDialog::mUseLatency
private

Definition at line 40 of file AudioUnitEffectOptionsDialog.h.

Referenced by OnOk(), and PopulateOrExchange().


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