39#include "../ProjectSelectionManager.h"
40#include "../TrackPanel.h"
41#include "../Shuttle.h"
42#include "../ShuttleGui.h"
44#include "../effects/Effect.h"
59 { wxT(
"ProjectStart"),
XO(
"Project Start") },
61 { wxT(
"ProjectEnd"),
XO(
"Project End") },
62 { wxT(
"SelectionStart"),
XO(
"Selection Start") },
64 { wxT(
"SelectionEnd"),
XO(
"Selection End") }
71 S.OptionalY(
bHasT0 ).Define(
mT0, wxT(
"Start"), 0.0, -100.0, (
double)FLT_MAX);
72 S.OptionalY(
bHasT1 ).Define(
mT1, wxT(
"End"), 0.0, -100.0, (
double)FLT_MAX);
78 {
return VisitSettings<false>(
S); }
81 {
return VisitSettings<true>(
S); }
87 S.StartMultiColumn(3, wxEXPAND);
89 S.SetStretchyCol( 2 );
136 t0 =
mT0 + selectedRegion.t0();
137 t1 =
mT1 + selectedRegion.t0();
140 t0 =
mT0 + selectedRegion.t0();
141 t1 =
mT1 + selectedRegion.t1();
144 t0 = selectedRegion.t1() -
mT0;
145 t1 = selectedRegion.t1() -
mT1;
149 selectedRegion.setTimes( t0, t1 );
154{
XO(
"Select Frequencies") };
160 S.OptionalN(
bHasTop ).Define(
mTop, wxT(
"High"), 0.0, 0.0, (
double)FLT_MAX);
166 {
return VisitSettings<false>(
S); }
169 {
return VisitSettings<true>(
S); }
175 S.StartMultiColumn(3, wxEXPAND);
177 S.SetStretchyCol( 2 );
200{
XO(
"Select Tracks") };
225 {
return VisitSettings<false>(
S); }
228 {
return VisitSettings<true>(
S); }
234 S.StartMultiColumn(3, wxEXPAND);
236 S.SetStretchyCol( 2 );
241 S.StartMultiColumn(2, wxALIGN_CENTER);
268 for (
auto t : tracks.Leaders()) {
272 constexpr double fudge = 0.01;
273 for (
auto channel : channels) {
274 double track = index + fudge + term;
275 bool sel = first <= track && track <= last;
277 channel->SetSelected(sel);
279 else if(
mMode == 1 && sel ){
280 channel->SetSelected(sel);
282 else if(
mMode == 2 && sel ){
283 channel->SetSelected(!sel);
285 term += 1.0 / channels.size();
308 return VisitSettings<false>(
S);
313 return VisitSettings<true>(
S);
static const EnumValueSymbol kRelativeTo[nRelativeTos]
static const EnumValueSymbol kModes[nModes]
Declarations for SelectCommand and SelectCommandType classes.
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Convenience function often useful when adding choice controls.
declares abstract base class Track, TrackList, and iterators over TrackList
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
AudacityProject & project
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
static void IncEffectCounter()
static ProjectSelectionManager & Get(AudacityProject &project)
void SSBL_ModifySpectralSelection(double &bottom, double &top, bool done) override
bool VisitSettings(SettingsVisitorBase< Const > &S)
SelectFrequenciesCommand mSelFreq
SelectTracksCommand mSelTracks
static const ComponentInterfaceSymbol Symbol
SelectTimeCommand mSelTime
bool Apply(const CommandContext &context) override
void PopulateOrExchange(ShuttleGui &S) override
bool VisitSettings(SettingsVisitorBase< Const > &S)
static const ComponentInterfaceSymbol Symbol
bool Apply(const CommandContext &context) override
void PopulateOrExchange(ShuttleGui &S) override
static const ComponentInterfaceSymbol Symbol
bool VisitSettings(SettingsVisitorBase< Const > &S)
bool VisitSettings(SettingsVisitorBase< Const > &S)
static const ComponentInterfaceSymbol Symbol
bool Apply(const CommandContext &context) override
void PopulateOrExchange(ShuttleGui &S) override
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
double GetEndTime() const
static TrackList & Get(AudacityProject &project)
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
static TrackPanel & Get(AudacityProject &project)
NotifyingSelectedRegion selectedRegion
static ViewInfo & Get(AudacityProject &project)
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
BuiltinCommandsModule::Registration< SelectTracksCommand > reg3
BuiltinCommandsModule::Registration< SelectTimeCommand > reg
BuiltinCommandsModule::Registration< SelectFrequenciesCommand > reg2
BuiltinCommandsModule::Registration< SelectCommand > reg4