Camera:onDrop(kind, content)event

widget only

This event is only available when the ui module is loaded before capture and Camera is used as a widget.
This event is fired when the user drops content onto the Camera widget. The Camera.allowdrop property must be set to true for this event to fire.

Parameters

kind

A string representing the kind of content dropped: "text", "files", or "unknown".

content

The dropped content. Type depends on kind:

kindcontent
"text"string
"files"table (list of File and Directory)
"unknown"nil

Return value

The event returns no value.

Example

--! luart-extensions import ui, capture local win = ui.Window("Camera:onDrop() sample", "fixed", 640, 520) local cam = ui.Camera(win, 10, 10, 620, 460) cam.allowdrop = true function cam:onDrop(kind, content) ui.info("Dropped "..kind.." on Camera") end await win:showasync()