MCPcopy Create free account
hub / github.com/Tracktion/choc / setFileDropCallback

Method setFileDropCallback

choc/gui/choc_DesktopWindow.h:459–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457 }
458
459 void setFileDropCallback (FileDropCallback handler)
460 {
461 CHOC_AUTORELEASE_BEGIN
462
463 if (handler)
464 {
465 fileDropCallback = std::move (handler);
466 auto types = objc::callClass<id> ("NSArray", "arrayWithObject:", objc::getNSString ("NSFilenamesPboardType"));
467 objc::call<void> (window, "registerForDraggedTypes:", types);
468 }
469 else
470 {
471 fileDropCallback = {};
472 objc::call<void> (window, "unregisterDraggedTypes");
473 }
474
475 CHOC_AUTORELEASE_END
476 }

Callers

nothing calls this directly

Calls 2

DynamicLibraryClass · 0.85
findFunctionMethod · 0.45

Tested by

no test coverage detected