Audacity  2.2.2
Public Member Functions | List of all members
PrefsPanel Class Referenceabstract

Used within the PrefsDialog, classes derived from this class include AudioIOPrefs, BatchPrefs, DirectoriesPrefs, FileFormatPrefs, GUIPrefs, KeyConfigPrefs, MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs. More...

#include <PrefsPanel.h>

Inheritance diagram for PrefsPanel:
wxPanelWrapper wxTabTraversalWrapper< wxPanel > BatchPrefs DevicePrefs DirectoriesPrefs EffectsPrefs ExtImportPrefs GUIPrefs ImportExportPrefs KeyConfigPrefs LibraryPrefs ModulePrefs MousePrefs PlaybackPrefs ProjectsPrefs QualityPrefs RecordingPrefs SpectrumPrefs ThemePrefs TracksBehaviorsPrefs TracksPrefs WarningsPrefs WaveformPrefs

Public Member Functions

 PrefsPanel (wxWindow *parent, wxWindowID winid, const wxString &title)
 
virtual ~PrefsPanel ()
 
virtual void Preview ()
 
virtual bool Commit ()=0
 
virtual bool ShowsPreviewButton ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
virtual wxString HelpPageName ()
 
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 wxString &name=_("Panel"))
 
bool Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const wxString &name=_("Panel"))
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxPanel >
 wxTabTraversalWrapper (Args &&...args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Detailed Description

Used within the PrefsDialog, classes derived from this class include AudioIOPrefs, BatchPrefs, DirectoriesPrefs, FileFormatPrefs, GUIPrefs, KeyConfigPrefs, MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs.

The interface works like this: Each panel in the preferences dialog must derive from PrefsPanel. You must override Apply() with code to validate fields (returning false if any are bad), updating the global preferences object gPrefs, and instructing the applicable parts of the program to re-read the preference options.

To actually add a the NEW panel, edit the PrefsDialog constructor to append the panel to its list of panels.

Definition at line 45 of file PrefsPanel.h.

Constructor & Destructor Documentation

PrefsPanel::PrefsPanel ( wxWindow *  parent,
wxWindowID  winid,
const wxString &  title 
)
inline

Definition at line 48 of file PrefsPanel.h.

49  : wxPanelWrapper(parent, winid)
50  {
51  SetLabel(title); // Provide visual label
52  SetName(title); // Provide audible label
53  }
PrefsPanel::~PrefsPanel ( )
virtual

Definition at line 627 of file PrefsDialog.cpp.

628 {
629 }

Member Function Documentation

void PrefsPanel::Cancel ( )
virtual

Reimplemented in KeyConfigPrefs.

Definition at line 631 of file PrefsDialog.cpp.

Referenced by PrefsDialog::OnCancel().

632 {
633 }
virtual bool PrefsPanel::Commit ( )
pure virtual
wxString PrefsPanel::HelpPageName ( )
virtual
virtual void PrefsPanel::PopulateOrExchange ( ShuttleGui WXUNUSEDS)
inlinevirtual

Definition at line 64 of file PrefsPanel.h.

Referenced by PrefsDialog::ShuttleAll().

64 {};
virtual void PrefsPanel::Preview ( )
inlinevirtual

Reimplemented in SpectrumPrefs.

Definition at line 58 of file PrefsPanel.h.

Referenced by PrefsDialog::OnOK(), and PrefsDialog::OnPreview().

58 {} // Make tentative changes
bool PrefsPanel::ShowsPreviewButton ( )
virtual

Reimplemented in SpectrumPrefs, and WaveformPrefs.

Definition at line 635 of file PrefsDialog.cpp.

Referenced by SetSelection().

636 {
637  return false;
638 }

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