332 {
334 if ( !pCurrentMenu ) {
335
336
337 wxASSERT( false );
338 return;
339 }
340 auto pItem = &item;
341 if (const auto pCommand =
344 pCommand->name, pCommand->label_in,
345 pCommand->finder, pCommand->callback,
346 pCommand->flags, pCommand->options
347 );
348 }
349 else
350 if (const auto pCommandList =
353 pCommandList->items.data(), pCommandList->items.size(),
354 pCommandList->finder, pCommandList->callback,
355 pCommandList->flags, pCommandList->isEffect);
356 }
357 else
358 if (const auto pSpecial =
360 wxASSERT( pCurrentMenu );
361 pSpecial->fn(
project, *pCurrentMenu );
362 }
363 else
364 wxASSERT( false );
365 }
void AddItemList(const CommandID &name, const ComponentInterfaceSymbol items[], size_t nItems, CommandHandlerFinder finder, CommandFunctorPointer callback, CommandFlag flags, bool bIsEffect=false)
wxMenu * CurrentMenu() const
void AddItem(AudacityProject &project, const CommandID &name, const TranslatableString &label_in, CommandHandlerFinder finder, CommandFunctorPointer callback, CommandFlag flags, const Options &options={})