Skip to main content

set_file_drop_callback

Function set_file_drop_callback 

Source
pub fn set_file_drop_callback(
    callback: impl FnMut(&[PathBuf]) + Send + Sync + 'static,
)
Expand description

Sets a callback that is invoked when files are dropped onto the polyscope window.

The callback receives a slice of file paths that were dropped.

ยงExample

polyscope_rs::set_file_drop_callback(|paths| {
    for path in paths {
        println!("Dropped: {}", path.display());
    }
});