| 1 |
/********************************************************************** |
| 2 |
|
| 3 |
Audacity: A Digital Audio Editor |
| 4 |
|
| 5 |
@file NoteTrackMenuItems.cpp |
| 6 |
@brief Injects menu items using NoteTrack but not the views of it |
| 7 |
|
| 8 |
Paul Licameli split from TrackMenus.cpp |
| 9 |
|
| 10 |
**********************************************************************/ |
| 11 |
|
| 12 |
/*! |
| 13 |
There is no "New Note Track" menu item corresponding to the other track types. Note tracks are created |
| 14 |
when importing MIDI files. |
| 15 |
*/ |
| 16 |
|
| 17 |
// Attach a menu item for diagnostic information |
| 18 |
|
| 19 |
#include "AudioIOBase.h" |
| 20 |
#include "CommandContext.h" |
| 21 |
#include "MenuRegistry.h" |
| 22 |
#include "CommonCommandFlags.h" |
| 23 |
#include "HelpUtilities.h" |
| 24 |
#include "NoteTrack.h" |
| 25 |
|
| 26 |
namespace { |
| 27 |
void OnMidiDeviceInfo(const CommandContext &context) |
| 28 |
{ |
| 29 |
auto &project = context.project; |
| 30 |
auto gAudioIO = AudioIOBase::Get(); |
| 31 |
auto info = GetMIDIDeviceInfo(); |
| 32 |
ShowDiagnostics( project, info, |
| 33 |
XO("MIDI Device Info"), wxT("midideviceinfo.txt") ); |
| 34 |
} |
| 35 |
|
| 36 |
using namespace MenuRegistry; |
| 37 |
AttachedItem sAttachment{ |
| 38 |
Command( wxT("MidiDeviceInfo"), XXO("&MIDI Device Info..."), |
| 39 |
OnMidiDeviceInfo, AudioIONotBusyFlag() ), |
| 40 |
{ wxT("Help/Other/Diagnostics"), |
| 41 |
{ OrderingHint::After, wxT("DeviceInfo") } } |
| 42 |
}; |
| 43 |
} |