Audacity  2.2.2
Public Member Functions | Private Member Functions | List of all members
PlaybackPrefs Class Referencefinal

A PrefsPanel used to select playback options. More...

#include <PlaybackPrefs.h>

Inheritance diagram for PlaybackPrefs:
PrefsPanel wxPanelWrapper wxTabTraversalWrapper< wxPanel >

Public Member Functions

 PlaybackPrefs (wxWindow *parent, wxWindowID winid)
 
virtual ~PlaybackPrefs ()
 
bool Commit () override
 
wxString HelpPageName () override
 
void PopulateOrExchange (ShuttleGui &S) override
 
- Public Member Functions inherited from PrefsPanel
 PrefsPanel (wxWindow *parent, wxWindowID winid, const wxString &title)
 
virtual ~PrefsPanel ()
 
virtual void Preview ()
 
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 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
 

Private Member Functions

void Populate ()
 

Detailed Description

A PrefsPanel used to select playback options.

Presents interface for user to update the various playback options like previewing and seeking.

Definition at line 23 of file PlaybackPrefs.h.

Constructor & Destructor Documentation

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

Definition at line 31 of file PlaybackPrefs.cpp.

References Populate().

32 : PrefsPanel(parent, winid, _("Playback"))
33 {
34  Populate();
35 }
PrefsPanel(wxWindow *parent, wxWindowID winid, const wxString &title)
Definition: PrefsPanel.h:48
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
PlaybackPrefs::~PlaybackPrefs ( )
virtual

Definition at line 37 of file PlaybackPrefs.cpp.

38 {
39 }

Member Function Documentation

bool PlaybackPrefs::Commit ( )
overridevirtual

Implements PrefsPanel.

Definition at line 134 of file PlaybackPrefs.cpp.

References eIsSavingToPrefs, and PopulateOrExchange().

135 {
136  ShuttleGui S(this, eIsSavingToPrefs);
138 
139  return true;
140 }
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
void PopulateOrExchange(ShuttleGui &S) override
wxString PlaybackPrefs::HelpPageName ( )
overridevirtual

Reimplemented from PrefsPanel.

Definition at line 142 of file PlaybackPrefs.cpp.

143 {
144  return "Playback_Preferences";
145 }
void PlaybackPrefs::Populate ( )
private

Definition at line 41 of file PlaybackPrefs.cpp.

References eIsCreatingFromPrefs, and PopulateOrExchange().

Referenced by PlaybackPrefs().

42 {
43  //------------------------- Main section --------------------
44  // Now construct the GUI itself.
45  // Use 'eIsCreatingFromPrefs' so that the GUI is
46  // initialised with values from gPrefs.
49  // ----------------------- End of main section --------------
50 }
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
void PopulateOrExchange(ShuttleGui &S) override
void PlaybackPrefs::PopulateOrExchange ( ShuttleGui S)
override

Definition at line 52 of file PlaybackPrefs.cpp.

References _(), ShuttleGuiBase::AddUnits(), ShuttleGuiBase::EndScroller(), ShuttleGuiBase::EndStatic(), ShuttleGuiBase::EndThreeColumn(), ShuttleGuiBase::EndTwoColumn(), ShuttleGuiBase::SetBorder(), ShuttleGuiBase::StartScroller(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::StartThreeColumn(), ShuttleGuiBase::StartTwoColumn(), ShuttleGuiBase::TieCheckBox(), and ShuttleGuiBase::TieNumericTextBox().

Referenced by Commit(), and Populate().

53 {
54  wxTextCtrl *w;
55 
56  S.StartScroller();
57  S.SetBorder(2);
58 
59  S.StartStatic(_("Effects Preview"));
60  {
61  S.StartThreeColumn();
62  {
63  w = S.TieNumericTextBox(_("&Length:"),
64  wxT("/AudioIO/EffectsPreviewLen"),
65  6.0,
66  9);
67  S.AddUnits(_("seconds"));
68  if( w ) w->SetName(w->GetName() + wxT(" ") + _("seconds"));
69  }
70  S.EndThreeColumn();
71  }
72  S.EndStatic();
73 
74  /* i18n-hint: (noun) this is a preview of the cut */
75  S.StartStatic(_("Cut Preview"));
76  {
77  S.StartThreeColumn();
78  {
79  w = S.TieNumericTextBox(_("&Before cut region:"),
80  wxT("/AudioIO/CutPreviewBeforeLen"),
81  2.0,
82  9);
83  S.AddUnits(_("seconds"));
84  if( w ) w->SetName(w->GetName() + wxT(" ") + _("seconds"));
85 
86  w = S.TieNumericTextBox(_("&After cut region:"),
87  wxT("/AudioIO/CutPreviewAfterLen"),
88  1.0,
89  9);
90  S.AddUnits(_("seconds"));
91  if( w ) w->SetName(w->GetName() + wxT(" ") + _("seconds"));
92  }
93  S.EndThreeColumn();
94  }
95  S.EndStatic();
96 
97  S.StartStatic(_("Seek Time when playing"));
98  {
99  S.StartThreeColumn();
100  {
101  w = S.TieNumericTextBox(_("&Short period:"),
102  wxT("/AudioIO/SeekShortPeriod"),
103  1.0,
104  9);
105  S.AddUnits(_("seconds"));
106  if( w ) w->SetName(w->GetName() + wxT(" ") + _("seconds"));
107 
108  w = S.TieNumericTextBox(_("Lo&ng period:"),
109  wxT("/AudioIO/SeekLongPeriod"),
110  15.0,
111  9);
112  S.AddUnits(_("seconds"));
113  if( w ) w->SetName(w->GetName() + wxT(" ") + _("seconds"));
114  }
115  S.EndThreeColumn();
116  }
117  S.EndStatic();
118 
119  S.StartStatic(_("Options"));
120  {
121  S.StartTwoColumn();
122  {
123  S.TieCheckBox("&Vari-Speed Play", "/AudioIO/VariSpeedPlay", true);
124  }
125  S.EndTwoColumn();
126  }
127  S.EndStatic();
128 
129 
130  S.EndScroller();
131 
132 }
void EndThreeColumn()
Definition: ShuttleGui.h:139
void EndScroller()
Definition: ShuttleGui.cpp:828
void AddUnits(const wxString &Prompt)
Left aligned text string.
Definition: ShuttleGui.cpp:260
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:795
void StartTwoColumn()
Definition: ShuttleGui.h:136
wxTextCtrl * TieNumericTextBox(const wxString &Prompt, WrappedType &WrappedRef, const int nChars)
void StartThreeColumn()
Definition: ShuttleGui.h:138
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
wxCheckBox * TieCheckBox(const wxString &Prompt, WrappedType &WrappedRef)
wxStaticBox * StartStatic(const wxString &Str, int iProp=0)
Definition: ShuttleGui.cpp:763
void SetBorder(int Border)
Definition: ShuttleGui.h:286
void EndTwoColumn()
Definition: ShuttleGui.h:137

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