1 /**********************************************************************
2 
3    Audacity - A Digital Audio Editor
4    Copyright 1999-2018 Audacity Team
5    License: wxWidgets
6 
7    James Crook
8 
9 ******************************************************************//**
10 
11 \file GetInfoCommand.h
12 \brief Contains declaration of GetInfoCommand class.
13 
14 \class GetInfoCommand
15 \brief Command which outputs a list of available menu commands on the status
16 channel.
17 
18 *//*******************************************************************/
19 
20 #ifndef __GET_INFO_COMMAND__
21 #define __GET_INFO_COMMAND__
22 
23 #include "Command.h"
24 #include "CommandType.h"
25 
26 class wxMenuBar;
27 class wxPoint;
28 
29 class GetInfoCommand : public AudacityCommand
30 {
31 public:
32    static const ComponentInterfaceSymbol Symbol;
33 
34    // ComponentInterface overrides
GetSymbol()35    ComponentInterfaceSymbol GetSymbol() override {return Symbol;};
GetDescription()36    TranslatableString GetDescription() override {return XO("Gets information in JSON format.");};
37    bool DefineParams( ShuttleParams & S ) override;
38    void PopulateOrExchange(ShuttleGui & S) override;
39 
40    // AudacityCommand overrides
ManualPage()41    ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_II#get_info";}
42    bool Apply(const CommandContext &context) override;
43    bool ApplyInner(const CommandContext &context);
44 
45 public:
46    int mInfoType;
47    int mFormat;
48 
49 private:
50    bool SendCommands(const CommandContext & context, int flags);
51    bool SendMenus(const CommandContext & context);
52    bool SendPreferences(const CommandContext & context);
53    bool SendTracks(const CommandContext & context);
54    bool SendLabels(const CommandContext & context);
55    bool SendClips(const CommandContext & context);
56    bool SendEnvelopes(const CommandContext & context);
57    bool SendBoxes(const CommandContext & context);
58 
59    void ExploreMenu( const CommandContext &context, wxMenu * pMenu, int Id, int depth );
60    void ExploreTrackPanel( const CommandContext & context,
61       wxPoint P, int depth );
62    void ExploreAdornments( const CommandContext & context,
63       wxPoint P, wxWindow * pWin, int Id, int depth );
64    void ExploreWindows( const CommandContext & context,
65       wxPoint P, wxWindow * pWin, int Id, int depth );
66 
67 };
68 
69 #endif /* End of include guard: __GET_INFO_COMMAND__ */
70