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 171 of file TracksBehaviorsPrefs.cpp.

172{
176
177 return true;
178}
@ eIsSavingToPrefs
Definition: ShuttleGui.h:47
#define S(N)
Definition: ToChars.cpp:64
BoolSetting EditClipsCanMove
Definition: WaveTrack.cpp:3417
void Invalidate() override
Definition: Prefs.h:289
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
void PopulateOrExchange(ShuttleGui &S) override

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

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 87 of file TracksBehaviorsPrefs.cpp.

88{
89 S.SetBorder(2);
90 S.StartScroller();
91
92 S.StartStatic(XO("Behaviors"));
93 {
94 S.TieCheckBox(XXO("&Select all audio, if selection required"),
95 {wxT("/GUI/SelectAllOnNone"),
96 false});
97 /* i18n-hint: Cut-lines are lines that can expand to show the cut audio.*/
98 S.TieCheckBox(XXO("Enable cut &lines"),
99 {wxT("/GUI/EnableCutLines"),
100 false});
101 S.TieCheckBox(XXO("Editing a clip can &move other clips"),
103 S.TieCheckBox(
104 XXO("&Always paste audio as new clips"),
105 { wxT("/GUI/PasteAsNewClips"), false });
106 S.TieCheckBox(XXO("\"Move track focus\" c&ycles repeatedly through tracks"),
107 {wxT("/GUI/CircularTrackNavigation"),
108 false});
109 S.TieCheckBox(XXO("&Type to create a label"),
110 {wxT("/GUI/TypeToCreateLabel"),
111 false});
112 S.TieCheckBox(XXO("Use dialog for the &name of a new label"),
113 {wxT("/GUI/DialogForNameNewLabel"),
114 false});
115
116 S.AddSpace(10);
117
118 S.StartMultiColumn(2);
119 {
120 S.TieChoice( XXO("Solo &Button:"), TracksBehaviorsSolo);
121 }
122 S.EndMultiColumn();
123 }
124 S.EndStatic();
125 auto pastedAudioBox = S.StartStatic(XO("Pasted audio"));
126 {
127 const auto header = S.AddVariableText(XO("Paste audio from other Audacity project as"));
128#if wxUSE_ACCESSIBILITY
129 if(pastedAudioBox != nullptr)
130 {
131 pastedAudioBox->SetName(header->GetLabel());
132 safenew WindowAccessible(pastedAudioBox);
133 }
134#endif
135 S.StartRadioButtonGroup(TracksBehaviorsAudioTrackPastePolicy);
136 for(int i = 0;
138 ++i)
139 {
140 S.StartHorizontalLay(wxALIGN_LEFT);
141 {
142 wxRadioButton* radioButton{};
143 S.StartVerticalLay(0);
144 {
145 radioButton =
146 S.Name(audioPasteModeText[i]).TieRadioButton();
147 S.AddSpace(0, 0, 1);
148 }
149 S.EndVerticalLay();
150
151 if (auto pText = S.AddVariableText(audioPasteModeText[i])) {
152 pText->Bind(
153 wxEVT_LEFT_UP, [=](auto)
154 {
155 radioButton->SetValue(true);
156 });
157 }
158 #if wxUSE_ACCESSIBILITY
159 safenew WindowAccessible(radioButton);
160 #endif
161 }
162 S.EndHorizontalLay();
163 }
164 S.EndRadioButtonGroup();
165 }
166 S.EndStatic();
167
168 S.EndScroller();
169}
wxT("CloseDown"))
XXO("&Cut/Copy/Paste Toolbar")
#define safenew
Definition: MemoryX.h:10
EnumSetting< SoloBehavior > TracksBehaviorsSolo
ChoiceSetting TracksBehaviorsAudioTrackPastePolicy
const EnumValueSymbols & GetSymbols() const
Definition: Prefs.h:441
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, 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: