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

Method SendMenus

src/commands/GetInfoCommand.cpp:187–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187bool GetInfoCommand::SendMenus(const CommandContext &context)
188{
189 wxMenuBar * pBar = GetProjectFrame( context.project ).GetMenuBar();
190 if(!pBar ){
191 wxLogDebug("No menus");
192 return false;
193 }
194
195 size_t cnt = pBar->GetMenuCount();
196 size_t i;
197 wxString Label;
198 context.StartArray();
199 for(i=0;i<cnt;i++)
200 {
201 Label = pBar->GetMenuLabelText( i );
202 context.StartStruct();
203 context.AddItem( 0, "depth" );
204 context.AddItem( 0, "flags" );
205 context.AddItem( Label, "label" );
206 context.AddItem( "", "accel" );
207 context.EndStruct();
208 ExploreMenu( context, pBar->GetMenu( i ), pBar->GetId(), 1 );
209 }
210 context.EndArray();
211 return true;
212}
213
214#include "Prefs.h"
215

Callers

nothing calls this directly

Calls 7

GetMenuBarMethod · 0.80
GetIdMethod · 0.80
StartArrayMethod · 0.45
StartStructMethod · 0.45
AddItemMethod · 0.45
EndStructMethod · 0.45
EndArrayMethod · 0.45

Tested by

no test coverage detected