Audacity 3.2.0
SelectCommand.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity - A Digital Audio Editor
4 Copyright 1999-2018 Audacity Team
5 License: GPL v2 or later - see LICENSE.txt
6
7 Dan Horgan
8 James Crook
9
10******************************************************************//*******************************************************************/
16
17#ifndef __SELECT_COMMAND__
18#define __SELECT_COMMAND__
19
20
21
22#include "CommandType.h"
23#include "Command.h"
24
25//#include "../commands/AudacityCommand.h"
26
28{
29public:
31
32 // ComponentInterface overrides
33 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
34 TranslatableString GetDescription() const override {return XO("Selects a time range.");};
35 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
36 bool VisitSettings( SettingsVisitor & S ) override;
37 bool VisitSettings( ConstSettingsVisitor & S ) override;
38 void PopulateOrExchange(ShuttleGui & S) override;
39 bool Apply(const CommandContext & context) override;
40
41 // AudacityCommand overrides
42 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_I#select_time";}
43
44 bool bHasT0;
45 bool bHasT1;
48
49 double mT0;
50 double mT1;
53};
54
56{
57public:
59
60 // ComponentInterface overrides
61 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
62 TranslatableString GetDescription() const override {return XO("Selects a frequency range.");};
63 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
64 bool VisitSettings( SettingsVisitor & S ) override;
65 bool VisitSettings( ConstSettingsVisitor & S ) override;
66 void PopulateOrExchange(ShuttleGui & S) override;
67 bool Apply(const CommandContext & context) override;
68
69 // AudacityCommand overrides
70 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_I#select_frequencies";}
71
73 bool bHasTop;
74
75 double mBottom;
76 double mTop;
77};
78
79
81{
82public:
84
85 // ComponentInterface overrides
86 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
87 TranslatableString GetDescription() const override {return XO("Selects a range of tracks.");};
88 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
89 bool VisitSettings( SettingsVisitor & S ) override;
90 bool VisitSettings( ConstSettingsVisitor & S ) override;
91 void PopulateOrExchange(ShuttleGui & S) override;
92 bool Apply(const CommandContext & context) override;
93 // AudacityCommand overrides
94 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_I#select_tracks";}
95
99
102 int mMode;
103};
104
105
107{
108public:
110
111 // ComponentInterface overrides
112 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;};
113 TranslatableString GetDescription() const override {return XO("Selects Audio.");};
114 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
115 bool VisitSettings( SettingsVisitor & S ) override;
116 bool VisitSettings( ConstSettingsVisitor & S ) override;
117 void PopulateOrExchange(ShuttleGui & S) override {
121 };
122 bool Apply(const CommandContext & context) override {
123 return
124 mSelTime.Apply(context) &&
125 mSelFreq.Apply( context )&&
126 mSelTracks.Apply(context);
127 }
128 // AudacityCommand overrides
129 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_II#select";}
130private:
134
135
136};
137
138#endif /* End of include guard: __SELECT_COMMAND__ */
Contains declaration of Command base class.
Contains declarations for CommandType class.
XO("Cut/Copy/Paste")
#define S(N)
Definition: ToChars.cpp:64
Base class for command in Audacity.
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Command for changing time, frequency and track selection. This class is a little baroque,...
bool VisitSettings(SettingsVisitorBase< Const > &S)
SelectFrequenciesCommand mSelFreq
SelectTracksCommand mSelTracks
ComponentInterfaceSymbol GetSymbol() const override
static const ComponentInterfaceSymbol Symbol
TranslatableString GetDescription() const override
SelectTimeCommand mSelTime
void PopulateOrExchange(ShuttleGui &S) override
ManualPageID ManualPage() override
bool Apply(const CommandContext &context) override
Command for changing the frequency selection.
Definition: SelectCommand.h:56
ManualPageID ManualPage() override
Definition: SelectCommand.h:70
TranslatableString GetDescription() const override
Definition: SelectCommand.h:62
ComponentInterfaceSymbol GetSymbol() const override
Definition: SelectCommand.h:61
bool Apply(const CommandContext &context) override
void PopulateOrExchange(ShuttleGui &S) override
bool VisitSettings(SettingsVisitorBase< Const > &S)
static const ComponentInterfaceSymbol Symbol
Definition: SelectCommand.h:58
Command for changing the time selection.
Definition: SelectCommand.h:28
bool Apply(const CommandContext &context) override
ComponentInterfaceSymbol GetSymbol() const override
Definition: SelectCommand.h:33
TranslatableString GetDescription() const override
Definition: SelectCommand.h:34
void PopulateOrExchange(ShuttleGui &S) override
ManualPageID ManualPage() override
Definition: SelectCommand.h:42
static const ComponentInterfaceSymbol Symbol
Definition: SelectCommand.h:30
bool VisitSettings(SettingsVisitorBase< Const > &S)
Command for changing the selection of tracks.
Definition: SelectCommand.h:81
bool VisitSettings(SettingsVisitorBase< Const > &S)
static const ComponentInterfaceSymbol Symbol
Definition: SelectCommand.h:83
ManualPageID ManualPage() override
Definition: SelectCommand.h:94
ComponentInterfaceSymbol GetSymbol() const override
Definition: SelectCommand.h:86
bool Apply(const CommandContext &context) override
TranslatableString GetDescription() const override
Definition: SelectCommand.h:87
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.
Definition: ShuttleGui.h:640
Holds a msgid for the translation catalog; may also bind format arguments.