MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / glfw_drop_callback

Function glfw_drop_callback

source/MRViewer/MRViewer.cpp:318–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318static void glfw_drop_callback( [[maybe_unused]] GLFWwindow *window, int count, const char **filenames )
319{
320 std::vector<std::filesystem::path> paths( count );
321 for ( int i = 0; i < count; ++i )
322 {
323 paths[i] = MR::pathFromUtf8( filenames[i] );
324 }
325 auto viewer = &MR::getViewerInstance();
326 viewer->emplaceEvent( "Drop", [paths, viewer] ()
327 {
328 viewer->dragDrop( paths );
329 } );
330 viewer->postEmptyEvent();
331}
332
333namespace MR
334{

Callers

nothing calls this directly

Calls 4

pathFromUtf8Function · 0.85
emplaceEventMethod · 0.80
dragDropMethod · 0.80
postEmptyEventMethod · 0.80

Tested by

no test coverage detected