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

Method createContextMenu

src/ui/TextField.cpp:438–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438void TextField::createContextMenu() {
439 ui::Menu* menu = createMenu();
440
441 TextFieldCutItem* cutItem = new TextFieldCutItem;
442 cutItem->text = string::translate("TextField.cut");
443 cutItem->rightText = widget::getKeyCommandName(GLFW_KEY_X, RACK_MOD_CTRL);
444 cutItem->textField = this;
445 menu->addChild(cutItem);
446
447 TextFieldCopyItem* copyItem = new TextFieldCopyItem;
448 copyItem->text = string::translate("TextField.copy");
449 copyItem->rightText = widget::getKeyCommandName(GLFW_KEY_C, RACK_MOD_CTRL);
450 copyItem->textField = this;
451 menu->addChild(copyItem);
452
453 TextFieldPasteItem* pasteItem = new TextFieldPasteItem;
454 pasteItem->text = string::translate("TextField.paste");
455 pasteItem->rightText = widget::getKeyCommandName(GLFW_KEY_V, RACK_MOD_CTRL);
456 pasteItem->textField = this;
457 menu->addChild(pasteItem);
458
459 TextFieldSelectAllItem* selectAllItem = new TextFieldSelectAllItem;
460 selectAllItem->text = string::translate("TextField.selectAll");
461 selectAllItem->rightText = widget::getKeyCommandName(GLFW_KEY_A, RACK_MOD_CTRL);
462 selectAllItem->textField = this;
463 menu->addChild(selectAllItem);
464}
465
466
467} // namespace ui

Callers

nothing calls this directly

Calls 4

createMenuFunction · 0.85
translateFunction · 0.85
getKeyCommandNameFunction · 0.85
addChildMethod · 0.80

Tested by

no test coverage detected