MCPcopy Create free account
hub / github.com/audacity/audacity / CursorMenu

Function CursorMenu

src/menus/SelectMenus.cpp:1091–1130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1089
1090namespace {
1091auto CursorMenu()
1092{
1093 static const auto CanStopFlags = AudioIONotBusyFlag() | CanStopAudioStreamFlag();
1094
1095 // JKC: ANSWER-ME: How is 'cursor to' different to 'Skip To' and how is it
1096 // useful?
1097 // GA: 'Skip to' moves the viewpoint to center of the track and preserves the
1098 // selection. 'Cursor to' does neither. 'Center at' might describe it better
1099 // than 'Skip'.
1100 static auto menu = std::shared_ptr{
1101 ( FinderScope{ findCommandHandler },
1102 Menu( wxT("Cursor"), XXO("&Cursor to"),
1103 Command( wxT("CursSelStart"), XXO("Selection Star&t"),
1104 FN(OnCursorSelStart),
1105 TimeSelectedFlag(),
1106 Options{}.LongName( XO("Cursor to Selection Start") ) ),
1107 Command( wxT("CursSelEnd"), XXO("Selection En&d"),
1108 FN(OnCursorSelEnd),
1109 TimeSelectedFlag(),
1110 Options{}.LongName( XO("Cursor to Selection End") ) ),
1111
1112 Command( wxT("CursTrackStart"), XXO("Track &Start"),
1113 FN(OnCursorTrackStart),
1114 EditableTracksSelectedFlag(),
1115 Options{ wxT("J"), XO("Cursor to Track Start") } ),
1116 Command( wxT("CursTrackEnd"), XXO("Track &End"),
1117 FN(OnCursorTrackEnd),
1118 EditableTracksSelectedFlag(),
1119 Options{ wxT("K"), XO("Cursor to Track End") } ),
1120
1121 Command( wxT("CursProjectStart"), XXO("&Project Start"),
1122 FN(OnSkipStart),
1123 CanStopFlags,
1124 Options{ wxT("Home"), XO("Cursor to Project Start") } ),
1125 Command( wxT("CursProjectEnd"), XXO("Project E&nd"), FN(OnSkipEnd),
1126 CanStopFlags,
1127 Options{ wxT("End"), XO("Cursor to Project End") } )
1128 ) ) };
1129 return menu;
1130}
1131
1132AttachedItem sAttachment0{ Indirect(CursorMenu()),
1133 wxT("Transport/Basic")

Callers 1

SelectMenus.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected