Audacity  3.0.3
Public Member Functions | Private Member Functions | List of all members
WarningsPrefs Class Referencefinal

A PrefsPanel to enable/disable certain warning messages. More...

#include <WarningsPrefs.h>

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

Public Member Functions

 WarningsPrefs (wxWindow *parent, wxWindowID winid)
 
 ~WarningsPrefs ()
 
ComponentInterfaceSymbol GetSymbol () override
 
TranslatableString GetDescription () override
 
bool Commit () override
 
ManualPageID HelpPageName () override
 If not empty string, the Help button is added below the panel. More...
 
- Public Member Functions inherited from PrefsPanel
 PrefsPanel (wxWindow *parent, wxWindowID winid, const TranslatableString &title)
 
virtual ~PrefsPanel ()
 
virtual void Preview ()
 
virtual PluginPath GetPath ()
 
virtual VendorSymbol GetVendor ()
 
virtual wxString GetVersion ()
 
virtual bool ShowsPreviewButton ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
virtual void Cancel ()
 
- Public Member Functions inherited from wxPanelWrapper
 wxPanelWrapper ()
 
 wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
bool Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
void SetLabel (const TranslatableString &label)
 
void SetName (const TranslatableString &name)
 
void SetToolTip (const TranslatableString &toolTip)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxPanel >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Member Functions

void Populate ()
 
void PopulateOrExchange (ShuttleGui &S) override
 

Additional Inherited Members

- Public Types inherited from PrefsPanel
using Factories = std::vector< PrefsPanel::PrefsNode >
 
using Factory = std::function< PrefsPanel *(wxWindow *parent, wxWindowID winid, AudacityProject *) >
 
- Static Public Member Functions inherited from PrefsPanel
static FactoriesDefaultFactories ()
 

Detailed Description

A PrefsPanel to enable/disable certain warning messages.

Definition at line 24 of file WarningsPrefs.h.

Constructor & Destructor Documentation

◆ WarningsPrefs()

WarningsPrefs::WarningsPrefs ( wxWindow *  parent,
wxWindowID  winid 
)

Definition at line 30 of file WarningsPrefs.cpp.

31 : PrefsPanel(parent, winid, XO("Warnings"))
32 {
33  Populate();
34 }

References Populate().

Here is the call graph for this function:

◆ ~WarningsPrefs()

WarningsPrefs::~WarningsPrefs ( )

Definition at line 36 of file WarningsPrefs.cpp.

37 {
38 }

Member Function Documentation

◆ Commit()

bool WarningsPrefs::Commit ( )
overridevirtual

Implements PrefsPanel.

Definition at line 97 of file WarningsPrefs.cpp.

98 {
101 
102  return true;
103 }

References eIsSavingToPrefs, and PopulateOrExchange().

Here is the call graph for this function:

◆ GetDescription()

TranslatableString WarningsPrefs::GetDescription ( )
overridevirtual

Implements ComponentInterface.

Definition at line 45 of file WarningsPrefs.cpp.

46 {
47  return XO("Preferences for Warnings");
48 }

References XO.

◆ GetSymbol()

ComponentInterfaceSymbol WarningsPrefs::GetSymbol ( )
overridevirtual

Implements ComponentInterface.

Definition at line 40 of file WarningsPrefs.cpp.

41 {
43 }

References WARNINGS_PREFS_PLUGIN_SYMBOL.

◆ HelpPageName()

ManualPageID WarningsPrefs::HelpPageName ( )
overridevirtual

If not empty string, the Help button is added below the panel.

Default returns empty string.

Reimplemented from PrefsPanel.

Definition at line 50 of file WarningsPrefs.cpp.

51 {
52  return "Warnings_Preferences";
53 }

◆ Populate()

void WarningsPrefs::Populate ( )
private

Definition at line 55 of file WarningsPrefs.cpp.

56 {
57  //------------------------- Main section --------------------
58  // Now construct the GUI itself.
59  // Use 'eIsCreatingFromPrefs' so that the GUI is
60  // initialised with values from gPrefs.
63  // ----------------------- End of main section --------------
64 }

References eIsCreatingFromPrefs, and PopulateOrExchange().

Referenced by WarningsPrefs().

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

◆ PopulateOrExchange()

void WarningsPrefs::PopulateOrExchange ( ShuttleGui S)
overrideprivate

Definition at line 66 of file WarningsPrefs.cpp.

67 {
68  S.SetBorder(2);
69  S.StartScroller();
70 
71  S.StartStatic(XO("Show Warnings/Prompts for"));
72  {
73  S.TieCheckBox(XXO("Saving &projects"),
74  {wxT("/Warnings/FirstProjectSave"),
75  true});
76  S.TieCheckBox(XXO("Saving &empty project"),
77  {wxT("/GUI/EmptyCanBeDirty"),
78  true});
79  S.TieCheckBox(XXO("Mixing down to &mono during export"),
80  {wxT("/Warnings/MixMono"),
81  true});
82  S.TieCheckBox(XXO("Mixing down to &stereo during export"),
83  {wxT("/Warnings/MixStereo"),
84  true});
85  S.TieCheckBox(XXO("Mixing down on export (&Custom FFmpeg or external program)"),
86  {wxT("/Warnings/MixUnknownChannels"),
87  true});
88  S.TieCheckBox(XXO("Missing file &name extension during export"),
89  {wxT("/Warnings/MissingExtension"),
90  true});
91  }
92  S.EndStatic();
93  S.EndScroller();
94 
95 }

References ShuttleGuiBase::EndScroller(), ShuttleGuiBase::EndStatic(), ShuttleGuiBase::SetBorder(), ShuttleGuiBase::StartScroller(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::TieCheckBox(), XO, and XXO.

Referenced by Commit(), and Populate().

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

The documentation for this class was generated from the following files:
ShuttleGuiBase::TieCheckBox
wxCheckBox * TieCheckBox(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1629
XO
#define XO(s)
Definition: Internat.h:31
ShuttleGuiBase::EndScroller
void EndScroller()
Definition: ShuttleGui.cpp:971
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::StartScroller
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:938
WARNINGS_PREFS_PLUGIN_SYMBOL
#define WARNINGS_PREFS_PLUGIN_SYMBOL
Definition: WarningsPrefs.h:22
WarningsPrefs::Populate
void Populate()
Definition: WarningsPrefs.cpp:55
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:893
eIsSavingToPrefs
@ eIsSavingToPrefs
Definition: ShuttleGui.h:48
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:489
WarningsPrefs::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: WarningsPrefs.cpp:66
eIsCreatingFromPrefs
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:47
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:922
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631
PrefsPanel::PrefsPanel
PrefsPanel(wxWindow *parent, wxWindowID winid, const TranslatableString &title)
Definition: PrefsPanel.h:90