Audacity  2.2.2
AutomationCommands.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 
9 ******************************************************************//*******************************************************************/
19 
20 #ifndef __GETALLMENUCOMMANDS__
21 #define __GETALLMENUCOMMANDS__
22 
23 #include "Command.h"
24 #include "CommandType.h"
25 
26 class wxMenuBar;
27 class wxPoint;
28 
29 class AutomationCommandsType final : public CommandType
30 {
31 public:
32  AutomationCommandsType( const wxString & Name ) { mCustomName = Name;};
33  wxString mCustomName;
34  wxString BuildName() override;
35  void BuildSignature(CommandSignature &signature) override;
36  CommandHolder Create(std::unique_ptr<CommandOutputTarget> &&target) override;
37 };
38 
40 {
41 public:
43  std::unique_ptr<CommandOutputTarget> &&target)
44  : CommandImplementation(type, std::move(target))
45  { mMode = type.BuildName();}
46 
48  { }
49  bool Apply(CommandExecutionContext context) override;
50 
51 private:
52  wxString mMode;
53  bool SendMenus(CommandExecutionContext context);
55 
56  bool SendClips(CommandExecutionContext context);
58  bool SendBoxes(CommandExecutionContext context);
59  void ExploreMenu( wxMenu * pMenu, int Id, int depth );
61  wxPoint P, wxWindow * pWin, int Id, int depth );
63  wxPoint P, wxWindow * pWin, int Id, int depth );
64 
66  wxPoint P, wxWindow * pWin, int Id, int depth );
67 
68 };
69 
70 #endif /* End of include guard: __GETALLMENUCOMMANDS__ */
void BuildSignature(CommandSignature &signature) override
Postcondition: signature is a 'signature' map containing parameter.
bool SendMenusPlus(CommandExecutionContext context)
std::shared_ptr< Command > CommandHolder
bool SendClips(CommandExecutionContext context)
Contains declarations for CommandType class.
Contains declaration of Command base class.
void ExploreWindows(CommandExecutionContext context, wxPoint P, wxWindow *pWin, int Id, int depth)
wxString BuildName() override
bool SendBoxes(CommandExecutionContext context)
void ExploreMenu(wxMenu *pMenu, int Id, int depth)
AutomationCommandsType(const wxString &Name)
is derived from Command. It validates and applies the command. CommandImplementation::Apply() is over...
Definition: Command.h:118
void ExploreTrackPanel(CommandExecutionContext context, wxPoint P, wxWindow *pWin, int Id, int depth)
Base class for containing data common to all commands of a given type. Also acts as a factory...
Definition: CommandType.h:29
void ExploreAdornments(CommandExecutionContext context, wxPoint P, wxWindow *pWin, int Id, int depth)
virtual wxString BuildName()=0
AutomationCommands(CommandType &type, std::unique_ptr< CommandOutputTarget > &&target)
bool SendKeycodes(CommandExecutionContext context)
Represents a context to which a command may be applied.
Definition: Command.h:50
bool SendMenus(CommandExecutionContext context)
Command which outputs a list of available menu commands on the status channel.
CommandHolder Create(std::unique_ptr< CommandOutputTarget > &&target) override
Class that maps parameter names to default values and validators.
bool Apply(CommandExecutionContext context) override