Trait droom_ui::callback::callbacks::DropFilesCb [] [src]

pub trait DropFilesCb where Self: Element + 'static {
    fn set_dropfiles_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self, PathBuf, usize, i32, i32)> { ... }
    fn remove_dropfiles_cb(&mut self)
                           -> Option<Box<Callback<(Self, PathBuf, usize, i32, i32)>>> { ... } }

Action called when a file is dropped into the control.

When several files are dropped at once, the callback is called several times, once for each file.

If defined after the element is mapped then the attribute DROPFILESTARGET must be set to YES.

The third parameter of the callback is the number index of the dropped file. If several files are dropped, it is the index of the dropped file starting from total-1 to 0. The fourth and fifth parameters are x,y coordinate of the point where the user released the mouse button.

if CallbackReturn::Ignore is returned the callback will not be called for the next dropped files, and the processing of dropped files will be interrupted.

[Windows and GTK Only] (GTK 2.6)

Provided Methods

Implementors