Audacity  2.2.2
CompareAudioCommand.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity - A Digital Audio Editor
4  Copyright 1999-2009 Audacity Team
5  License: wxwidgets
6 
7  Dan Horgan
8  James Crook
9 
10 ******************************************************************//*******************************************************************/
17 
18 #ifndef __COMPAREAUDIOCOMMAND__
19 #define __COMPAREAUDIOCOMMAND__
20 
21 #include "Command.h"
22 #include "CommandType.h"
23 
24 class WaveTrack;
25 
26 #define COMPARE_AUDIO_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Compare Audio") }
27 
29 {
30 public:
31  // CommandDefinitionInterface overrides
32  IdentInterfaceSymbol GetSymbol() override {return XO("Compare Audio");}
33  wxString GetDescription() override {return _("Compares a range on two tracks.");};
34  bool DefineParams( ShuttleParams & S ) override;
35  void PopulateOrExchange(ShuttleGui & S) override;
36  bool Apply() override;
37 
38  // AudacityCommand overrides
39  wxString ManualPage() override {return wxT("Compare_Audio");};
40  bool Apply(const CommandContext &context) override;
41 
42 
43 private:
45  double mT0, mT1;
48 
49  // Update member variables with project selection data (and validate)
50  bool GetSelection(const CommandContext &context, AudacityProject &proj);
51 
52 protected:
53  double CompareSample(double value1, double value2) /* not override */;
54 
55 };
56 
57 #endif /* End of include guard: __COMPAREAUDIOCOMMAND__ */
const WaveTrack * mTrack1
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
void PopulateOrExchange(ShuttleGui &S) override
double CompareSample(double value1, double value2)
bool DefineParams(ShuttleParams &S) override
wxString GetDescription() override
Contains declarations for CommandType class.
Contains declaration of Command base class.
#define XO(s)
Definition: Internat.h:33
CommandContext provides addiitonal information to an 'Apply()' command. It provides the project...
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:60
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:176
const WaveTrack * mTrack0
wxString ManualPage() override
A Track that contains audio waveform data.
Definition: WaveTrack.h:60
IdentInterfaceSymbol pairs a persistent string identifier used internally with an optional...
Base class for command in Audacity.
IdentInterfaceSymbol GetSymbol() override
_("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
bool GetSelection(const CommandContext &context, AudacityProject &proj)
Returns information about the amount of audio that is about a certain threshold of difference in two ...