Audacity  2.2.2
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
TracksBehaviorsPrefs Class Referencefinal

A PrefsPanel for Tracks Behaviors settings. More...

#include <TracksBehaviorsPrefs.h>

Inheritance diagram for TracksBehaviorsPrefs:
PrefsPanel wxPanelWrapper wxTabTraversalWrapper< wxPanel >

Public Member Functions

 TracksBehaviorsPrefs (wxWindow *parent, wxWindowID winid)
 
 ~TracksBehaviorsPrefs ()
 
bool Commit () override
 
wxString HelpPageName () 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
 

Static Public Member Functions

static const wxChar * ScrollingPreferenceKey ()
 
static bool ScrollingPreferenceDefault ()
 

Private Member Functions

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

Private Attributes

wxArrayString mSoloCodes
 
wxArrayString mSoloChoices
 

Detailed Description

A PrefsPanel for Tracks Behaviors settings.

Definition at line 21 of file TracksBehaviorsPrefs.h.

Constructor & Destructor Documentation

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

Definition at line 25 of file TracksBehaviorsPrefs.cpp.

References Populate().

27 : PrefsPanel(parent, winid, _("Tracks Behaviors"))
28 {
29  Populate();
30 }
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
TracksBehaviorsPrefs::~TracksBehaviorsPrefs ( )

Definition at line 32 of file TracksBehaviorsPrefs.cpp.

33 {
34 }

Member Function Documentation

bool TracksBehaviorsPrefs::Commit ( )
overridevirtual

Implements PrefsPanel.

Definition at line 113 of file TracksBehaviorsPrefs.cpp.

References eIsSavingToPrefs, and PopulateOrExchange().

114 {
115  ShuttleGui S(this, eIsSavingToPrefs);
117 
118  return true;
119 }
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
void PopulateOrExchange(ShuttleGui &S) override
wxString TracksBehaviorsPrefs::HelpPageName ( )
overridevirtual

Reimplemented from PrefsPanel.

Definition at line 121 of file TracksBehaviorsPrefs.cpp.

122 {
123  return "Tracks_Behaviors_Preferences";
124 }
void TracksBehaviorsPrefs::Populate ( )
private

Definition at line 42 of file TracksBehaviorsPrefs.cpp.

References _(), eIsCreatingFromPrefs, mSoloChoices, mSoloCodes, and PopulateOrExchange().

Referenced by TracksBehaviorsPrefs().

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 }
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
_("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
void TracksBehaviorsPrefs::PopulateOrExchange ( ShuttleGui S)
overrideprivate

Definition at line 59 of file TracksBehaviorsPrefs.cpp.

References _(), ShuttleGui::AddSpace(), ShuttleGuiBase::EndMultiColumn(), ShuttleGuiBase::EndScroller(), ShuttleGuiBase::EndStatic(), mSoloChoices, mSoloCodes, ScrollingPreferenceDefault(), ScrollingPreferenceKey(), ShuttleGuiBase::SetBorder(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::StartScroller(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::TieCheckBox(), and ShuttleGuiBase::TieChoice().

Referenced by Commit(), and Populate().

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 }
wxChoice * TieChoice(const wxString &Prompt, WrappedType &WrappedRef, const wxArrayString *pChoices)
static const wxChar * ScrollingPreferenceKey()
void EndMultiColumn()
void EndScroller()
Definition: ShuttleGui.cpp:828
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:795
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
_("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)
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
static bool TracksBehaviorsPrefs::ScrollingPreferenceDefault ( )
inlinestatic

Definition at line 30 of file TracksBehaviorsPrefs.h.

Referenced by PopulateOrExchange(), ViewInfo::UpdatePrefs(), and AdornedRulerPanel::UpdatePrefs().

30 { return false; }
const wxChar * TracksBehaviorsPrefs::ScrollingPreferenceKey ( )
static

Definition at line 36 of file TracksBehaviorsPrefs.cpp.

Referenced by PopulateOrExchange(), ViewInfo::UpdatePrefs(), and AdornedRulerPanel::UpdatePrefs().

37 {
38  static auto string = wxT("/GUI/ScrollBeyondZero");
39  return string;
40 }

Member Data Documentation

wxArrayString TracksBehaviorsPrefs::mSoloChoices
private

Definition at line 37 of file TracksBehaviorsPrefs.h.

Referenced by Populate(), and PopulateOrExchange().

wxArrayString TracksBehaviorsPrefs::mSoloCodes
private

Definition at line 36 of file TracksBehaviorsPrefs.h.

Referenced by Populate(), and PopulateOrExchange().


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