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

Method Popup

src/widgets/BasicMenu.cpp:209–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209void Handle::Popup( const BasicUI::WindowPlacement &window, const Point &pos )
210{
211 wxMenu *const pMenu = mpMenu;
212 if ( !pMenu )
213 return;
214
215 if ( auto pWindow = wxWidgetsWindowPlacement::GetParent( window ) ) {
216 sHandledEvent = false;
217
218 // Put the menu pointers where the event filter can find them
219 sMenuStack.push_back( FindDescendants( *pMenu ) );
220 auto cleanup = finally( []{ sMenuStack.pop_back(); } );
221
222 if ( Journal::IsReplaying() )
223 ReplayPopup( pMenu );
224 else
225 pWindow->PopupMenu( pMenu, { pos.x, pos.y } );
226
227 if ( !sHandledEvent )
228 // Menu popped but no command was selected. Record that.
229 Journal::Output( JournalCode );
230 }
231}
232
233}

Callers 15

ShowMenuMethod · 0.45
ShowScrubMenuMethod · 0.45
OnMenuMethod · 0.45
ShowContextMenuMethod · 0.45
ReleaseMethod · 0.45
DoReleaseMethod · 0.45
ReleaseMethod · 0.45
DoContextMenuMethod · 0.45
DoContextMenuMethod · 0.45
OnAudioSetupMethod · 0.45
OnPopupMethod · 0.45

Calls 7

GetParentFunction · 0.85
FindDescendantsFunction · 0.85
finallyFunction · 0.85
IsReplayingFunction · 0.85
ReplayPopupFunction · 0.85
OutputFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected