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

Method onButton

src/app/PortWidget.cpp:389–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387
388
389void PortWidget::onButton(const ButtonEvent& e) {
390 OpaqueWidget::onButton(e);
391
392 if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT) {
393 createContextMenu();
394 e.consume(this);
395 return;
396 }
397
398 if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT && (e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) {
399 deleteTopCableAction();
400 // Consume null so onDragStart isn't triggered
401 e.consume(NULL);
402 return;
403 }
404}
405
406
407void PortWidget::onEnter(const EnterEvent& e) {

Callers

nothing calls this directly

Calls 1

consumeMethod · 0.80

Tested by

no test coverage detected