![]() |
Audacity 3.2.0
|
Dialog that shows the current PrefsPanel in a tabbed divider. More...
#include <PrefsDialog.h>
Public Member Functions | |
| PrefsDialog (wxWindow *parent, AudacityProject *pProject, const TranslatableString &titlePrefix=XO("Preferences:"), PrefsPanel::Factories &factories=PrefsPanel::DefaultFactories()) | |
| virtual | ~PrefsDialog () |
| int | ShowModal () override |
| void | ShuttleAll (ShuttleGui &S) |
| void | OnCategoryChange (wxCommandEvent &e) |
| void | OnOK (wxCommandEvent &e) |
| void | OnCancel (wxCommandEvent &e) |
| void | OnPreview (wxCommandEvent &e) |
| void | OnHelp (wxCommandEvent &e) |
| void | OnTreeKeyDown (wxTreeEvent &e) |
| void | SelectPageByName (const wxString &pageName) |
| int | GetSelectedPage () const |
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 |
Protected Member Functions | |
| virtual long | GetPreferredPage ()=0 |
| virtual void | SavePreferredPage ()=0 |
Private Member Functions | |
| void | RecordExpansionState () |
| PrefsPanel * | GetCurrentPanel () |
Private Attributes | |
| wxTreebook * | mCategories {} |
| PrefsPanel * | mUniquePage {} |
| PrefsPanel::Factories & | mFactories |
| const TranslatableString | mTitlePrefix |
| std::unique_ptr< SettingTransaction > | mTransaction |
Dialog that shows the current PrefsPanel in a tabbed divider.
Definition at line 28 of file PrefsDialog.h.
| PrefsDialog::PrefsDialog | ( | wxWindow * | parent, |
| AudacityProject * | pProject, | ||
| const TranslatableString & | titlePrefix = XO("Preferences:"), |
||
| PrefsPanel::Factories & | factories = PrefsPanel::DefaultFactories() |
||
| ) |
Definition at line 441 of file PrefsDialog.cpp.
References _, eCancelButton, eHelpButton, eIsCreating, details::end(), entries, eOkButton, ePreviewButton, factory, gPrefs, mCategories, mTitlePrefix, mTransaction, mUniquePage, audacity::BasicSettings::Read(), S, safenew, PrefsPanel::ShowsPreviewButton(), and wxT().
Referenced by anonymous_namespace{SpectrumView.cpp}::SpectrogramSettingsHandler::OnSpectrogramSettings().
|
virtual |
Definition at line 599 of file PrefsDialog.cpp.
|
private |
Definition at line 649 of file PrefsDialog.cpp.
References mCategories, and mUniquePage.
Referenced by OnHelp(), and OnPreview().
|
protectedpure virtual |
Implemented in GlobalPrefsDialog, and anonymous_namespace{AudioSetupToolBar.cpp}::ViewDeviceSettingsDialog.
Referenced by anonymous_namespace{SpectrumView.cpp}::SpectrogramSettingsHandler::OnSpectrogramSettings(), and ShowModal().
| int PrefsDialog::GetSelectedPage | ( | ) | const |
Definition at line 809 of file PrefsDialog.cpp.
References mCategories.
Referenced by GlobalPrefsDialog::SavePreferredPage().
| void PrefsDialog::OnCancel | ( | wxCommandEvent & | e | ) |
Definition at line 626 of file PrefsDialog.cpp.
References PrefsPanel::Cancel(), Cancel, audacity::BasicSettings::Flush(), gPrefs, mCategories, mUniquePage, RecordExpansionState(), audacity::BasicSettings::Write(), and wxT().
| void PrefsDialog::OnCategoryChange | ( | wxCommandEvent & | e | ) |
| void PrefsDialog::OnHelp | ( | wxCommandEvent & | e | ) |
Definition at line 663 of file PrefsDialog.cpp.
References GetCurrentPanel(), and HelpSystem::ShowHelp().
| void PrefsDialog::OnOK | ( | wxCommandEvent & | e | ) |
Definition at line 697 of file PrefsDialog.cpp.
References PrefsListener::Broadcast(), PrefsPanel::Commit(), audacity::BasicSettings::Flush(), AudioIOBase::Get(), gPrefs, mCategories, mTransaction, mUniquePage, PrefsPanel::Preview(), RecordExpansionState(), SavePreferredPage(), audacity::BasicSettings::Write(), and wxT().
Referenced by DoReloadPreferences(), and OnTreeKeyDown().
| void PrefsDialog::OnPreview | ( | wxCommandEvent & | e | ) |
Definition at line 657 of file PrefsDialog.cpp.
References GetCurrentPanel().
| void PrefsDialog::OnTreeKeyDown | ( | wxTreeEvent & | e | ) |
Definition at line 689 of file PrefsDialog.cpp.
References OnOK().
|
private |
Definition at line 840 of file PrefsDialog.cpp.
References details::end(), mCategories, and mFactories.
Referenced by OnCancel(), and OnOK().
|
protectedpure virtual |
Implemented in GlobalPrefsDialog, and anonymous_namespace{AudioSetupToolBar.cpp}::ViewDeviceSettingsDialog.
Referenced by OnOK(), anonymous_namespace{SpectrumView.cpp}::SpectrogramSettingsHandler::OnSpectrogramSettings(), and SelectPageByName().
| void PrefsDialog::SelectPageByName | ( | const wxString & | pageName | ) |
Definition at line 790 of file PrefsDialog.cpp.
References mCategories, and SavePreferredPage().
Referenced by NoUpdatesAvailableDialog::NoUpdatesAvailableDialog(), UnwritableLocationErrorDialog::UnwritableLocationErrorDialog(), and UpdateNoticeDialog::UpdateNoticeDialog().
|
override |
Definition at line 603 of file PrefsDialog.cpp.
References GetPreferredPage(), TranslatableString::Join(), mCategories, mTitlePrefix, mUniquePage, wxDialogWrapper::SetName(), wxDialogWrapper::SetTitle(), Verbatim(), and wxT().
Referenced by AudacityApp::InitPart2(), AudacityApp::InitTempDir(), NoUpdatesAvailableDialog::NoUpdatesAvailableDialog(), AudacityApp::OnMenuPreferences(), anonymous_namespace{EditMenus.cpp}::OnPreferences(), UnwritableLocationErrorDialog::UnwritableLocationErrorDialog(), and UpdateNoticeDialog::UpdateNoticeDialog().
| void PrefsDialog::ShuttleAll | ( | ShuttleGui & | S | ) |
Definition at line 671 of file PrefsDialog.cpp.
References mCategories, mUniquePage, PrefsPanel::PopulateOrExchange(), and S.
Referenced by GetInfoCommand::SendPreferences().
|
private |
Definition at line 65 of file PrefsDialog.h.
Referenced by GetCurrentPanel(), GetSelectedPage(), OnCancel(), OnOK(), PrefsDialog(), RecordExpansionState(), SelectPageByName(), ShowModal(), and ShuttleAll().
|
private |
Definition at line 67 of file PrefsDialog.h.
Referenced by RecordExpansionState().
|
private |
Definition at line 68 of file PrefsDialog.h.
Referenced by PrefsDialog(), and ShowModal().
|
private |
Definition at line 70 of file PrefsDialog.h.
Referenced by OnOK(), and PrefsDialog().
|
private |
Definition at line 66 of file PrefsDialog.h.
Referenced by GetCurrentPanel(), OnCancel(), OnOK(), PrefsDialog(), ShowModal(), and ShuttleAll().