MCPcopy Create free account
hub / github.com/VCVRack/Rack / doAction

Method doAction

src/ui/MenuItem.cpp:86–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void MenuItem::doAction(bool consume) {
87 widget::EventContext cAction;
88 ActionEvent eAction;
89 eAction.context = &cAction;
90 if (consume) {
91 eAction.consume(this);
92 }
93 onAction(eAction);
94 if (!cAction.consumed)
95 return;
96
97 // Close menu
98 MenuOverlay* overlay = getAncestorOfType<MenuOverlay>();
99 if (overlay) {
100 overlay->requestDelete();
101 }
102}
103
104
105void MenuItem::onAction(const ActionEvent& e) {

Callers 1

onActionMethod · 0.80

Calls 2

consumeMethod · 0.80
requestDeleteMethod · 0.80

Tested by

no test coverage detected