Audacity 3.2.0
Public Member Functions | Private Member Functions | List of all members
TracksBehaviorsPrefs Class Referencefinal

A PrefsPanel for Tracks Behaviors settings. More...

#include <TracksBehaviorsPrefs.h>

Inheritance diagram for TracksBehaviorsPrefs:
[legend]
Collaboration diagram for TracksBehaviorsPrefs:
[legend]

Public Member Functions

 TracksBehaviorsPrefs (wxWindow *parent, wxWindowID winid)
 
 ~TracksBehaviorsPrefs ()
 
ComponentInterfaceSymbol GetSymbol () const override
 
TranslatableString GetDescription () const override
 
bool Commit () override
 
ManualPageID HelpPageName () override
 If not empty string, the Help button is added below the panel. More...
 
- Public Member Functions inherited from PrefsPanel
 PrefsPanel (wxWindow *parent, wxWindowID winid, const TranslatableString &title)
 
virtual ~PrefsPanel ()
 
virtual void Preview ()
 
virtual bool Commit ()=0
 
virtual PluginPath GetPath () const override
 
virtual VendorSymbol GetVendor () const override
 
virtual wxString GetVersion () const override
 
virtual bool ShowsPreviewButton ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
virtual ManualPageID HelpPageName ()
 If not empty string, the Help button is added below the panel. More...
 
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 TranslatableString &name=XO("Panel"))
 
bool Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
void SetLabel (const TranslatableString &label)
 
void SetName (const TranslatableString &name)
 
void SetToolTip (const TranslatableString &toolTip)
 
void SetName ()
 
- 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 ()
 
void PopulateOrExchange (ShuttleGui &S) override
 

Additional Inherited Members

- Public Types inherited from PrefsPanel
using Factories = std::vector< PrefsPanel::PrefsNode >
 
using Factory = std::function< PrefsPanel *(wxWindow *parent, wxWindowID winid, AudacityProject *) >
 
- Static Public Member Functions inherited from PrefsPanel
static FactoriesDefaultFactories ()
 

Detailed Description

A PrefsPanel for Tracks Behaviors settings.

Definition at line 24 of file TracksBehaviorsPrefs.h.

Constructor & Destructor Documentation

◆ TracksBehaviorsPrefs()

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

Definition at line 30 of file TracksBehaviorsPrefs.cpp.

32: PrefsPanel(parent, winid, XO("Tracks Behaviors"))
33{
34 Populate();
35}
XO("Cut/Copy/Paste")
PrefsPanel(wxWindow *parent, wxWindowID winid, const TranslatableString &title)
Definition: PrefsPanel.h:94

References Populate().

Here is the call graph for this function:

◆ ~TracksBehaviorsPrefs()

TracksBehaviorsPrefs::~TracksBehaviorsPrefs ( )

Definition at line 37 of file TracksBehaviorsPrefs.cpp.

38{
39}

Member Function Documentation

◆ Commit()

bool TracksBehaviorsPrefs::Commit ( )
overridevirtual

Implements PrefsPanel.

Definition at line 187 of file TracksBehaviorsPrefs.cpp.

188{
193
194 return true;
195}
@ eIsSavingToPrefs
Definition: ShuttleGui.h:47
#define S(N)
Definition: ToChars.cpp:64
BoolSetting ScrollingPreference
Definition: ViewInfo.cpp:336
BoolSetting EditClipsCanMove
Definition: WaveTrack.cpp:2595
void Invalidate() override
Definition: Prefs.h:282
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:625
void PopulateOrExchange(ShuttleGui &S) override

References EditClipsCanMove, eIsSavingToPrefs, Setting< T >::Invalidate(), PopulateOrExchange(), S, and ScrollingPreference.

Here is the call graph for this function:

◆ GetDescription()

TranslatableString TracksBehaviorsPrefs::GetDescription ( ) const
overridevirtual

Implements ComponentInterface.

Definition at line 46 of file TracksBehaviorsPrefs.cpp.

47{
48 return XO("Preferences for TracksBehaviors");
49}

References XO().

Here is the call graph for this function:

◆ GetSymbol()

ComponentInterfaceSymbol TracksBehaviorsPrefs::GetSymbol ( ) const
overridevirtual

Implements ComponentInterface.

Definition at line 41 of file TracksBehaviorsPrefs.cpp.

42{
44}
#define TRACKS_BEHAVIORS_PREFS_PLUGIN_SYMBOL

References TRACKS_BEHAVIORS_PREFS_PLUGIN_SYMBOL.

◆ HelpPageName()

ManualPageID TracksBehaviorsPrefs::HelpPageName ( )
overridevirtual

If not empty string, the Help button is added below the panel.

Default returns empty string.

Reimplemented from PrefsPanel.

Definition at line 51 of file TracksBehaviorsPrefs.cpp.

52{
53 return "Tracks_Behaviors_Preferences";
54}

◆ Populate()

void TracksBehaviorsPrefs::Populate ( )
private

Definition at line 56 of file TracksBehaviorsPrefs.cpp.

57{
58 //------------------------- Main section --------------------
59 // Now construct the GUI itself.
62 // ----------------------- End of main section --------------
63}
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:46

References eIsCreatingFromPrefs, PopulateOrExchange(), and S.

Referenced by TracksBehaviorsPrefs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PopulateOrExchange()

void TracksBehaviorsPrefs::PopulateOrExchange ( ShuttleGui S)
overrideprivate

Definition at line 97 of file TracksBehaviorsPrefs.cpp.

98{
99 S.SetBorder(2);
100 S.StartScroller();
101
102 S.StartStatic(XO("Behaviors"));
103 {
104 S.TieCheckBox(XXO("&Select all audio, if selection required"),
105 {wxT("/GUI/SelectAllOnNone"),
106 false});
107 /* i18n-hint: Cut-lines are lines that can expand to show the cut audio.*/
108 S.TieCheckBox(XXO("Enable cut &lines"),
109 {wxT("/GUI/EnableCutLines"),
110 false});
111 S.TieCheckBox(XXO("Enable &dragging selection edges"),
112 {wxT("/GUI/AdjustSelectionEdges"),
113 true});
114 S
115 .TieCheckBox(XXO("Editing a clip can &move other clips"),
117 S.TieCheckBox(XXO("\"Move track focus\" c&ycles repeatedly through tracks"),
118 {wxT("/GUI/CircularTrackNavigation"),
119 false});
120 S.TieCheckBox(XXO("&Type to create a label"),
121 {wxT("/GUI/TypeToCreateLabel"),
122 false});
123 S.TieCheckBox(XXO("Use dialog for the &name of a new label"),
124 {wxT("/GUI/DialogForNameNewLabel"),
125 false});
126#ifdef EXPERIMENTAL_SCROLLING_LIMITS
127 S.TieCheckBox(XXO("Enable scrolling left of &zero"),
129#endif
130 S.TieCheckBox(XXO("Advanced &vertical zooming"),
131 {wxT("/GUI/VerticalZooming"),
132 false});
133
134 S.AddSpace(10);
135
136 S.StartMultiColumn(2);
137 {
138 S.TieChoice( XXO("Solo &Button:"), TracksBehaviorsSolo);
139 }
140 S.EndMultiColumn();
141 }
142 S.EndStatic();
143 auto pastedAudioBox = S.StartStatic(XO("Pasted audio"));
144 {
145 const auto header = S.AddVariableText(XO("Paste audio from other Audacity project as"));
146#if wxUSE_ACCESSIBILITY
147 if(pastedAudioBox != nullptr)
148 {
149 pastedAudioBox->SetName(header->GetLabel());
150 safenew WindowAccessible(pastedAudioBox);
151 }
152#endif
153 S.StartRadioButtonGroup(TracksBehaviorsAudioTrackPastePolicy);
154 for(int i = 0;
156 ++i)
157 {
158 S.StartHorizontalLay(wxALIGN_LEFT);
159 {
160 wxRadioButton* radioButton{};
161 S.StartVerticalLay(0);
162 {
163 radioButton =
164 S.Name(audioPasteModeText[i]).TieRadioButton();
165 S.AddSpace(0, 0, 1);
166 }
167 S.EndVerticalLay();
168
169 S.AddVariableText(audioPasteModeText[i])->Bind(
170 wxEVT_LEFT_UP, [=](auto)
171 {
172 radioButton->SetValue(true);
173 });
174 #if wxUSE_ACCESSIBILITY
175 safenew WindowAccessible(radioButton);
176 #endif
177 }
178 S.EndHorizontalLay();
179 }
180 S.EndRadioButtonGroup();
181 }
182 S.EndStatic();
183
184 S.EndScroller();
185}
wxT("CloseDown"))
XXO("&Cut/Copy/Paste Toolbar")
#define safenew
Definition: MemoryX.h:10
ChoiceSetting TracksBehaviorsSolo
ChoiceSetting TracksBehaviorsAudioTrackPastePolicy
const EnumValueSymbols & GetSymbols() const
Definition: Prefs.h:434
An alternative to using wxWindowAccessible, which in wxWidgets 3.1.1 contained GetParent() which was ...

References anonymous_namespace{TracksBehaviorsPrefs.cpp}::audioPasteModeText, EditClipsCanMove, ChoiceSetting::GetSymbols(), S, safenew, ScrollingPreference, size, TracksBehaviorsAudioTrackPastePolicy, TracksBehaviorsSolo, wxT(), XO(), and XXO().

Referenced by Commit(), and Populate().

Here is the call graph for this function:
Here is the caller graph for this function:

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