Audacity  2.2.2
TracksBehaviorsPrefs.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  TracksBehaviorsPrefs.cpp
6 
7  Steve Daulton
8 
9 
10 *******************************************************************//*******************************************************************/
16 
17 #include "../Audacity.h"
18 #include "TracksBehaviorsPrefs.h"
19 
20 #include "../Prefs.h"
21 #include "../ShuttleGui.h"
22 #include "../Experimental.h"
23 #include "../Internat.h"
24 
25 TracksBehaviorsPrefs::TracksBehaviorsPrefs(wxWindow * parent, wxWindowID winid)
26 /* i18n-hint: two nouns */
27 : PrefsPanel(parent, winid, _("Tracks Behaviors"))
28 {
29  Populate();
30 }
31 
33 {
34 }
35 
37 {
38  static auto string = wxT("/GUI/ScrollBeyondZero");
39  return string;
40 }
41 
43 {
44  mSoloCodes.Add(wxT("Simple"));
45  mSoloCodes.Add(wxT("Multi"));
46  mSoloCodes.Add(wxT("None"));
47 
48  mSoloChoices.Add(_("Simple"));
49  mSoloChoices.Add(_("Multi-track"));
50  mSoloChoices.Add(_("None"));
51 
52  //------------------------- Main section --------------------
53  // Now construct the GUI itself.
56  // ----------------------- End of main section --------------
57 }
58 
60 {
61  S.SetBorder(2);
62  S.StartScroller();
63 
64  S.StartStatic(_("Behaviors"));
65  {
66  S.TieCheckBox(_("A&uto-select, if selection required"),
67  wxT("/GUI/SelectAllOnNone"),
68  false);
69  /* i18n-hint: Cut-lines are lines that can expand to show the cut audio.*/
70  S.TieCheckBox(_("Enable cut &lines"),
71  wxT("/GUI/EnableCutLines"),
72  false);
73  S.TieCheckBox(_("Enable &dragging selection edges"),
74  wxT("/GUI/AdjustSelectionEdges"),
75  true);
76  S.TieCheckBox(_("Editing a clip can &move other clips"),
77  wxT("/GUI/EditClipCanMove"),
78  true);
79  S.TieCheckBox(_("\"Move track focus\" c&ycles repeatedly through tracks"),
80  wxT("/GUI/CircularTrackNavigation"),
81  false);
82  S.TieCheckBox(_("&Type to create a label"),
83  wxT("/GUI/TypeToCreateLabel"),
84  true);
85  S.TieCheckBox(_("Use dialog for the &name of a new label"),
86  wxT("/GUI/DialogForNameNewLabel"),
87  false);
88 #ifdef EXPERIMENTAL_SCROLLING_LIMITS
89  S.TieCheckBox(_("Enable scrolling left of &zero"),
92 #endif
93  S.TieCheckBox(_("Advanced &vertical zooming"),
94  wxT("/GUI/VerticalZooming"),
95  false);
96 
97  S.AddSpace(10);
98 
99  S.StartMultiColumn(2);
100  {
101  S.TieChoice(_("Solo &Button:"),
102  wxT("/GUI/Solo"),
103  wxT("Standard"),
104  mSoloChoices,
105  mSoloCodes);
106  }
107  S.EndMultiColumn();
108  }
109  S.EndStatic();
110  S.EndScroller();
111 }
112 
114 {
115  ShuttleGui S(this, eIsSavingToPrefs);
117 
118  return true;
119 }
120 
122 {
123  return "Tracks_Behaviors_Preferences";
124 }
125 
127 {
128 }
129 
130 PrefsPanel *TracksBehaviorsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
131 {
132  wxASSERT(parent); // to justify safenew
133  return safenew TracksBehaviorsPrefs(parent, winid);
134 }
wxChoice * TieChoice(const wxString &Prompt, WrappedType &WrappedRef, const wxArrayString *pChoices)
static const wxChar * ScrollingPreferenceKey()
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
A PrefsPanel for Tracks Behaviors settings.
void EndMultiColumn()
void EndScroller()
Definition: ShuttleGui.cpp:828
#define safenew
Definition: Audacity.h:230
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:795
TracksBehaviorsPrefs(wxWindow *parent, wxWindowID winid)
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
wxString HelpPageName() override
PrefsPanel * operator()(wxWindow *parent, wxWindowID winid) override
Used within the PrefsDialog, classes derived from this class include AudioIOPrefs, BatchPrefs, DirectoriesPrefs, FileFormatPrefs, GUIPrefs, KeyConfigPrefs, MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs.
Definition: PrefsPanel.h:45
_("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
void PopulateOrExchange(ShuttleGui &S) override
wxCheckBox * TieCheckBox(const wxString &Prompt, WrappedType &WrappedRef)
static bool ScrollingPreferenceDefault()
wxStaticBox * StartStatic(const wxString &Str, int iProp=0)
Definition: ShuttleGui.cpp:763
wxSizerItem * AddSpace(int width, int height)
void SetBorder(int Border)
Definition: ShuttleGui.h:286