Audacity 3.2.0
|
#include <EffectUI.h>
Public Member Functions | |
EffectUIHost (wxWindow *parent, AudacityProject &project, EffectBase &effect, EffectUIServices &client, std::shared_ptr< EffectInstance > &pInstance, EffectSettingsAccess &access, const std::shared_ptr< RealtimeEffectState > &pPriorState={}) | |
virtual | ~EffectUIHost () |
bool | TransferDataToWindow () override |
bool | TransferDataFromWindow () override |
int | ShowModal () override |
bool | Initialize () |
EffectEditor * | GetEditor () const |
bool | HandleCommandKeystrokes () override |
void | SetClosed () |
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 | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Public Member Functions inherited from TopLevelKeystrokeHandlingWindow | |
virtual | ~TopLevelKeystrokeHandlingWindow () |
virtual bool | HandleCommandKeystrokes () |
Private Member Functions | |
std::shared_ptr< EffectInstance > | InitializeInstance () |
void | BuildTopBar (ShuttleGui &S) |
void | OnInitDialog (wxInitDialogEvent &evt) |
void | OnErase (wxEraseEvent &evt) |
void | OnPaint (wxPaintEvent &evt) |
void | OnClose (wxCloseEvent &evt) |
void | OnApply (wxCommandEvent &evt) |
void | DoCancel () |
void | OnCancel (wxCommandEvent &evt) |
void | OnDebug (wxCommandEvent &evt) |
void | OnMenu (wxCommandEvent &evt) |
void | OnEnable (wxCommandEvent &evt) |
void | OnPlay (wxCommandEvent &evt) |
void | OnPlayback (AudioIOEvent) |
void | OnCapture (AudioIOEvent) |
void | OnUserPreset (wxCommandEvent &evt) |
void | OnFactoryPreset (wxCommandEvent &evt) |
void | OnDeletePreset (wxCommandEvent &evt) |
void | OnSaveAs (wxCommandEvent &evt) |
void | OnImport (wxCommandEvent &evt) |
void | OnExport (wxCommandEvent &evt) |
void | OnOptions (wxCommandEvent &evt) |
void | OnDefaults (wxCommandEvent &evt) |
void | OnIdle (wxIdleEvent &evt) |
void | OnCharHook (wxKeyEvent &evt) |
bool | IsOpenedFromEffectPanel () const |
void | UpdateControls () |
wxBitmap | CreateBitmap (const char *const xpm[], bool up, bool pusher) |
void | LoadUserPresets () |
void | CleanupRealtime () |
Private Attributes | |
Observer::Subscription | mAudioIOSubscription |
Observer::Subscription | mEffectStateSubscription |
AudacityProject & | mProject |
wxWindow *const | mParent |
EffectBase & | mEffectUIHost |
EffectUIServices & | mClient |
const EffectPlugin::EffectSettingsAccessPtr | mpGivenAccess |
EffectPlugin::EffectSettingsAccessPtr | mpAccess |
EffectPlugin::EffectSettingsAccessPtr | mpAccess2 |
std::weak_ptr< RealtimeEffectState > | mwState {} |
std::shared_ptr< RealtimeEffectState > | mpTempProjectState {} |
RegistryPaths | mUserPresets |
bool | mInitialized { false } |
const bool | mSupportsRealtime |
bool | mIsGUI {} |
bool | mIsBatch {} |
wxButton * | mApplyBtn {} |
wxButton * | mMenuBtn {} |
AButton * | mEnableBtn {} |
wxButton * | mDebugBtn {} |
bool | mEnabled { true } |
bool | mCapturing {} |
SelectedRegion | mRegion |
double | mPlayPos { 0.0 } |
bool | mDismissed {} |
const bool | mHadPriorState |
const std::shared_ptr< EffectInstance > | mpInstance |
const EffectOutputs *const | mpOutputs |
std::unique_ptr< EffectEditor > | mpEditor |
Definition at line 43 of file EffectUI.h.
EffectUIHost::EffectUIHost | ( | wxWindow * | parent, |
AudacityProject & | project, | ||
EffectBase & | effect, | ||
EffectUIServices & | client, | ||
std::shared_ptr< EffectInstance > & | pInstance, | ||
EffectSettingsAccess & | access, | ||
const std::shared_ptr< RealtimeEffectState > & | pPriorState = {} |
||
) |
Definition at line 228 of file EffectUI.cpp.
References EffectPlugin::GetDefinition(), ComponentInterface::GetName(), MacMakeWindowFloating(), mpInstance, and wxDialogWrapper::SetName().
|
virtual |
Definition at line 263 of file EffectUI.cpp.
References mpEditor.
|
private |
Definition at line 356 of file EffectUI.cpp.
References eDebugID, EffectDefinitionInterface::EnablesDebug(), EffectPlugin::GetDefinition(), ThemeBase::Image(), anonymous_namespace{EffectUI.cpp}::InnerMargin, IsOpenedFromEffectPanel(), kMenuID, anonymous_namespace{EffectUI.cpp}::MakeBitmapToggleButton(), mDebugBtn, mEffectUIHost, mEnableBtn, mMenuBtn, S, theTheme, XO(), and XXO().
Referenced by Initialize().
|
private |
Definition at line 1091 of file EffectUI.cpp.
References AudioIO::Get(), IsOpenedFromEffectPanel(), mAudioIOSubscription, mEffectStateSubscription, mInitialized, mProject, mpTempProjectState, mSupportsRealtime, AudioIO::RemoveState(), and Observer::Subscription::Reset().
Referenced by OnClose().
|
private |
Definition at line 977 of file EffectUI.cpp.
|
private |
Definition at line 607 of file EffectUI.cpp.
References CurrentSettingsGroup(), EffectPlugin::GetDefinition(), mDismissed, mEffectUIHost, mHadPriorState, mpAccess, and settings().
Referenced by OnCancel(), and OnClose().
|
inline |
|
overridevirtual |
By default returns true, meaning that keystrokes should be handled by associated CommandManager.
Reimplemented from TopLevelKeystrokeHandlingWindow.
Definition at line 488 of file EffectUI.cpp.
bool EffectUIHost::Initialize | ( | ) |
Definition at line 395 of file EffectUI.cpp.
References BuildTopBar(), EffectTypeAnalyze, EffectTypeTool, eIsCreating, EffectPlugin::GetDefinition(), EffectDefinitionInterface::GetType(), anonymous_namespace{EffectUI.cpp}::InnerMargin, EffectPlugin::IsBatchProcessing(), IsOpenedFromEffectPanel(), kPlayID, LoadUserPresets(), mApplyBtn, mClient, mEffectUIHost, mEnabled, mIsBatch, mIsGUI, mpAccess, mParent, mpEditor, mpInstance, mpOutputs, EffectUIServices::PopulateUI(), RTL_WORKAROUND, S, safenew, UpdateControls(), XO(), and XXO().
|
private |
Definition at line 1038 of file EffectUI.cpp.
References AudioIO::AddState(), EffectOn, EffectBase::FindInstance(), AudioIO::Get(), GetID(), mAudioIOSubscription, mCapturing, mEffectStateSubscription, mEffectUIHost, mEnabled, mInitialized, mpAccess, mpAccess2, mProject, mpTempProjectState, mSupportsRealtime, mwState, Observer::Publisher< Message, NotifyAll >::Subscribe(), AudioIOEvent::type, and UpdateControls().
|
private |
Definition at line 972 of file EffectUI.cpp.
References mpTempProjectState, and mSupportsRealtime.
Referenced by BuildTopBar(), CleanupRealtime(), Initialize(), OnCharHook(), and UpdateControls().
|
private |
Definition at line 1026 of file EffectUI.cpp.
References PluginSettings::GetConfigSubgroups(), EffectPlugin::GetDefinition(), mEffectUIHost, mUserPresets, PluginSettings::Private, and UserPresetsGroup().
Referenced by Initialize(), OnDeletePreset(), OnImport(), OnMenu(), and OnSaveAs().
|
private |
Definition at line 545 of file EffectUI.cpp.
References AlwaysEnabledFlag, CurrentSettingsGroup(), EffectUI::DoEffect(), EffectTypeGenerate, EffectTypeTool, CommandManager::Get(), ViewInfo::Get(), EffectPlugin::GetDefinition(), GetID(), ComponentInterface::GetName(), EffectDefinitionInterface::GetType(), NotifyingSelectedRegion::isPoint(), EffectManager::kConfigured, mApplyBtn, mDismissed, mEffectUIHost, mIsBatch, mpAccess, mProject, CommandContext::project, project, CommandManager::ReportIfActionNotAllowed(), EffectSettingsManager::SaveUserPreset(), ViewInfo::selectedRegion, TimeSelectedFlag(), TransferDataFromWindow(), and WaveTracksSelectedFlag().
Referenced by OnDebug().
|
private |
Definition at line 628 of file EffectUI.cpp.
References DoCancel().
Referenced by OnCharHook().
|
private |
Definition at line 772 of file EffectUI.cpp.
References mCapturing, mProject, AudioIOEvent::on, AudioIOEvent::pProject, and UpdateControls().
|
private |
Definition at line 954 of file EffectUI.cpp.
References IsOpenedFromEffectPanel(), OnCancel(), and wxEVT_COMMAND_BUTTON_CLICKED.
|
private |
Definition at line 529 of file EffectUI.cpp.
References CleanupRealtime(), DoCancel(), and mpEditor.
|
private |
Definition at line 634 of file EffectUI.cpp.
References OnApply().
|
private |
Definition at line 936 of file EffectUI.cpp.
References EffectPlugin::GetDefinition(), mEffectUIHost, mpAccess, settings(), and TransferDataToWindow().
|
private |
Definition at line 808 of file EffectUI.cpp.
References AudacityMessageBox(), EffectPlugin::GetDefinition(), kDeletePresetID, LoadUserPresets(), mEffectUIHost, mUserPresets, preset, PluginSettings::Private, PluginSettings::RemoveConfigSubgroup(), UserPresetsGroup(), and XO().
|
private |
Definition at line 745 of file EffectUI.cpp.
References UndoManager::Get(), AButton::IsDown(), UndoManager::MarkUnsaved(), mEnableBtn, mEnabled, mProject, mwState, and UpdateControls().
|
private |
Definition at line 517 of file EffectUI.cpp.
|
private |
Definition at line 919 of file EffectUI.cpp.
References EffectUIServices::ExportPresets(), mClient, mEffectUIHost, mpAccess, and TransferDataFromWindow().
|
private |
ignore failure
Definition at line 797 of file EffectUI.cpp.
References EffectPlugin::GetDefinition(), kFactoryPresetsID, mEffectUIHost, mpAccess, settings(), and TransferDataToWindow().
|
private |
Definition at line 947 of file EffectUI.cpp.
References mpAccess.
|
private |
Definition at line 907 of file EffectUI.cpp.
References EffectUIServices::ImportPresets(), LoadUserPresets(), mClient, mEffectUIHost, mpAccess, settings(), and TransferDataToWindow().
|
private |
Definition at line 494 of file EffectUI.cpp.
References BasicUI::FindFocus().
|
private |
Definition at line 650 of file EffectUI.cpp.
References _, EffectPlugin::CanExportPresets(), TranslatableString::empty(), factory, EffectPlugin::GetDefinition(), EffectSettingsManager::GetFactoryPresets(), anonymous_namespace{EffectUI.cpp}::GetVersionForDisplay(), EffectPlugin::HasOptions(), kDefaultsID, kDeletePresetDummyID, kDeletePresetID, kDummyID, kExportID, kFactoryPresetsID, kImportID, kMenuID, kOptionsID, kSaveAsID, kUserPresetsDummyID, kUserPresetsID, label, LoadUserPresets(), mEffectUIHost, mUserPresets, and BasicMenu::Handle::Popup().
|
private |
Definition at line 929 of file EffectUI.cpp.
References mClient, mEffectUIHost, and EffectUIServices::ShowOptions().
|
private |
Definition at line 522 of file EffectUI.cpp.
|
private |
Definition at line 758 of file EffectUI.cpp.
References EffectPreview(), mEffectUIHost, mpAccess, TransferDataFromWindow(), TransferDataToWindow(), and updater.
|
private |
|
private |
Definition at line 827 of file EffectUI.cpp.
References eIsCreating, EffectPlugin::GetDefinition(), LoadUserPresets(), make_iterator_range(), mEffectUIHost, mpAccess, mUserPresets, name, S, EffectSettingsManager::SaveUserPreset(), TransferDataFromWindow(), UserPresetsGroup(), XO(), and XXO().
|
private |
Definition at line 784 of file EffectUI.cpp.
References EffectPlugin::GetDefinition(), kUserPresetsID, mEffectUIHost, mpAccess, mUserPresets, preset, settings(), TransferDataToWindow(), and UserPresetsGroup().
|
inline |
Definition at line 70 of file EffectUI.h.
|
override |
Definition at line 328 of file EffectUI.cpp.
References EffectTypeGenerate, EffectPlugin::GetDefinition(), EffectDefinitionInterface::GetType(), mApplyBtn, mEffectUIHost, and XXO().
|
override |
Do validations of any wxValidator objects
Do transfers of any wxValidator objects
Do other custom validation and transfer actions
Definition at line 287 of file EffectUI.cpp.
References CurrentSettingsGroup(), EffectSettingsExtra::DurationKey(), EffectTypeGenerate, EffectPlugin::GetDefinition(), mEffectUIHost, mpAccess, mpEditor, PluginSettings::Private, PluginSettings::SetConfig(), and settings().
Referenced by OnApply(), OnExport(), OnPlay(), and OnSaveAs().
|
override |
Do other appearance updates
Do validators
Definition at line 275 of file EffectUI.cpp.
References mEffectUIHost, mpAccess, and mpEditor.
Referenced by OnDefaults(), OnFactoryPreset(), OnImport(), OnPlay(), and OnUserPreset().
|
private |
Definition at line 1010 of file EffectUI.cpp.
References IsOpenedFromEffectPanel(), mApplyBtn, mCapturing, mEnableBtn, mEnabled, mIsBatch, AButton::PopUp(), and AButton::PushDown().
Referenced by Initialize(), InitializeInstance(), OnCapture(), and OnEnable().
|
private |
Definition at line 134 of file EffectUI.h.
Referenced by Initialize(), OnApply(), ShowModal(), and UpdateControls().
|
private |
Definition at line 114 of file EffectUI.h.
Referenced by CleanupRealtime(), and InitializeInstance().
|
private |
Definition at line 141 of file EffectUI.h.
Referenced by InitializeInstance(), OnCapture(), and UpdateControls().
|
private |
Definition at line 119 of file EffectUI.h.
Referenced by Initialize(), OnExport(), OnImport(), and OnOptions().
|
private |
Definition at line 137 of file EffectUI.h.
Referenced by BuildTopBar().
|
private |
Definition at line 146 of file EffectUI.h.
Referenced by DoCancel(), and OnApply().
|
private |
Definition at line 114 of file EffectUI.h.
Referenced by CleanupRealtime(), and InitializeInstance().
|
private |
Definition at line 118 of file EffectUI.h.
Referenced by BuildTopBar(), DoCancel(), Initialize(), InitializeInstance(), LoadUserPresets(), OnApply(), OnDefaults(), OnDeletePreset(), OnExport(), OnFactoryPreset(), OnImport(), OnMenu(), OnOptions(), OnPlay(), OnSaveAs(), OnUserPreset(), ShowModal(), TransferDataFromWindow(), and TransferDataToWindow().
|
private |
Definition at line 136 of file EffectUI.h.
Referenced by BuildTopBar(), OnEnable(), and UpdateControls().
|
private |
Definition at line 139 of file EffectUI.h.
Referenced by Initialize(), InitializeInstance(), OnEnable(), and UpdateControls().
|
private |
Definition at line 147 of file EffectUI.h.
Referenced by DoCancel().
|
private |
Definition at line 129 of file EffectUI.h.
Referenced by CleanupRealtime(), and InitializeInstance().
|
private |
Definition at line 132 of file EffectUI.h.
Referenced by Initialize(), OnApply(), and UpdateControls().
|
private |
Definition at line 131 of file EffectUI.h.
Referenced by Initialize().
|
private |
Definition at line 135 of file EffectUI.h.
Referenced by BuildTopBar().
|
private |
Definition at line 122 of file EffectUI.h.
Referenced by DoCancel(), Initialize(), InitializeInstance(), OnApply(), OnDefaults(), OnExport(), OnFactoryPreset(), OnIdle(), OnImport(), OnPlay(), OnSaveAs(), OnUserPreset(), TransferDataFromWindow(), and TransferDataToWindow().
|
private |
Definition at line 123 of file EffectUI.h.
Referenced by InitializeInstance().
|
private |
Definition at line 117 of file EffectUI.h.
Referenced by Initialize().
|
private |
Definition at line 157 of file EffectUI.h.
Referenced by GetEditor(), Initialize(), OnClose(), TransferDataFromWindow(), TransferDataToWindow(), and ~EffectUIHost().
|
private |
Definition at line 121 of file EffectUI.h.
|
private |
Definition at line 154 of file EffectUI.h.
Referenced by EffectUIHost(), and Initialize().
|
private |
Definition at line 144 of file EffectUI.h.
|
private |
Definition at line 155 of file EffectUI.h.
Referenced by Initialize().
|
private |
Definition at line 116 of file EffectUI.h.
Referenced by CleanupRealtime(), InitializeInstance(), OnApply(), OnCapture(), and OnEnable().
|
private |
Definition at line 126 of file EffectUI.h.
Referenced by CleanupRealtime(), InitializeInstance(), and IsOpenedFromEffectPanel().
|
private |
Definition at line 143 of file EffectUI.h.
|
private |
Definition at line 130 of file EffectUI.h.
Referenced by CleanupRealtime(), InitializeInstance(), and IsOpenedFromEffectPanel().
|
private |
Definition at line 128 of file EffectUI.h.
Referenced by LoadUserPresets(), OnDeletePreset(), OnMenu(), OnSaveAs(), and OnUserPreset().
|
private |
Definition at line 124 of file EffectUI.h.
Referenced by InitializeInstance(), and OnEnable().