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 #ifdef EXPERIMENTAL_SCROLLING_LIMITS
86  S.TieCheckBox(_("Enable scrolling left of &zero"),
89 #endif
90  S.TieCheckBox(_("Advanced &vertical zooming"),
91  wxT("/GUI/VerticalZooming"),
92  false);
93 
94  S.AddSpace(10);
95 
96  S.StartMultiColumn(2);
97  {
98  S.TieChoice(_("Solo &Button:"),
99  wxT("/GUI/Solo"),
100  wxT("Standard"),
101  mSoloChoices,
102  mSoloCodes);
104  }
105  S.EndMultiColumn();
106  }
107  S.EndStatic();
108  S.EndScroller();
109 }
110 
112 {
113  ShuttleGui S(this, eIsSavingToPrefs);
115 
116  return true;
117 }
118 
120 {
121  return "Tracks_Behaviors_Preferences";
122 }
123 
125 {
126 }
127 
128 PrefsPanel *TracksBehaviorsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
129 {
130  wxASSERT(parent); // to justify safenew
131  return safenew TracksBehaviorsPrefs(parent, winid);
132 }
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:366
A PrefsPanel for Tracks Behaviors settings.
void EndMultiColumn()
void EndScroller()
Definition: ShuttleGui.cpp:770
#define safenew
Definition: Audacity.h:223
void SetSizeHints(int minX=-1, int minY=-1)
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:733
TracksBehaviorsPrefs(wxWindow *parent, wxWindowID winid)
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:998
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:43
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
wxCheckBox * TieCheckBox(const wxString &Prompt, WrappedType &WrappedRef)
static bool ScrollingPreferenceDefault()
wxStaticBox * StartStatic(const wxString &Str, int iProp=0)
Definition: ShuttleGui.cpp:701
wxSizerItem * AddSpace(int width, int height)
void SetBorder(int Border)
Definition: ShuttleGui.h:251
void PopulateOrExchange(ShuttleGui &S)