Audacity  2.2.0
CommandHandler.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity - A Digital Audio Editor
4  Copyright 1999-2009 Audacity Team
5  File License: wxWidgets
6 
7  Dan Horgan
8 
9 ******************************************************************//******************************************************************/
15 
16 #ifndef __COMMANDHANDLER__
17 #define __COMMANDHANDLER__
18 
19 #include "../MemoryX.h"
20 class AudacityApp;
21 class AudacityProject;
22 class AppCommandEvent;
24 
26 {
27  private:
28  std::unique_ptr<CommandExecutionContext> mCurrentContext;
29 
30  public:
33 
34  // This should only be used during initialization
35  void SetProject(AudacityProject *proj);
36 
37  // Whenever a command is received, process it.
38  void OnReceiveCommand(AppCommandEvent &event);
39 };
40 
41 #endif /* End of include guard: __COMMANDHANDLER__ */
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:161
Contains methods for applying commands that are passed to it.
Definition: CommandHandler.h:25
CommandHandler(AudacityApp &app)
Definition: CommandHandler.cpp:27
AudacityApp is the 'main' class for Audacity.
Definition: AudacityApp.h:59
An event 'envelope' for sending Command objects through the wxwidgets event loop. ...
Definition: AppCommandEvent.h:28
void OnReceiveCommand(AppCommandEvent &event)
Definition: CommandHandler.cpp:42
Represents a context to which a command may be applied.
Definition: Command.h:50
void SetProject(AudacityProject *proj)
Definition: CommandHandler.cpp:36
~CommandHandler()
Definition: CommandHandler.cpp:32
std::unique_ptr< CommandExecutionContext > mCurrentContext
Definition: CommandHandler.h:28