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

Function createBoolPtrMenuItem

include/helpers.hpp:313–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311*/
312template <typename T>
313ui::MenuItem* createBoolPtrMenuItem(std::string text, std::string rightText, T* ptr) {
314 return createBoolMenuItem(text, rightText,
315 [=]() {
316 return ptr ? *ptr : false;
317 },
318 [=](T val) {
319 if (ptr)
320 *ptr = val;
321 }
322 );
323}
324
325
326/** Creates a MenuItem that opens a submenu.

Callers 7

appendContextMenuMethod · 0.85
appendContextMenuMethod · 0.85
appendContextMenuMethod · 0.85
appendContextMenuMethod · 0.85
appendContextMenuMethod · 0.85
appendContextMenuMethod · 0.85
onActionMethod · 0.85

Calls 1

createBoolMenuItemFunction · 0.85

Tested by

no test coverage detected