Trait components::DropActionExt [−][src]
pub trait DropActionExt: 'static {
pub fn connect_can_drop<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor, f32, f32) -> bool;
pub fn connect_drop<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor, f32, f32);
pub fn connect_drop_cancel<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor, f32, f32);
pub fn connect_over_in<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor);
pub fn connect_over_out<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor);
}Required methods
pub fn connect_can_drop<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor, f32, f32) -> bool, [src]
F: 'static + Fn(&Self, &Actor, f32, f32) -> bool,
The ::can-drop signal is emitted when the dragged actor is dropped
on actor. The return value of the ::can-drop signal will determine
whether or not the DropAction::drop signal is going to be
emitted on action.
The default implementation of DropAction returns true for
this signal.
actor
the Actor attached to the action
event_x
the X coordinate (in stage space) of the drop event
event_y
the Y coordinate (in stage space) of the drop event
Returns
true if the drop is accepted, and false otherwise
pub fn connect_drop<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor, f32, f32), [src]
F: 'static + Fn(&Self, &Actor, f32, f32),
The ::drop signal is emitted when the dragged actor is dropped
on actor. This signal is only emitted if at least an handler of
DropAction::can-drop returns true.
actor
the Actor attached to the action
event_x
the X coordinate (in stage space) of the drop event
event_y
the Y coordinate (in stage space) of the drop event
pub fn connect_drop_cancel<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor, f32, f32), [src]
F: 'static + Fn(&Self, &Actor, f32, f32),
The ::drop-cancel signal is emitted when the drop is refused
by an emission of the DropAction::can-drop signal.
After the ::drop-cancel signal is fired the active drag is terminated.
actor
the Actor attached to the action
event_x
the X coordinate (in stage space) of the drop event
event_y
the Y coordinate (in stage space) of the drop event
pub fn connect_over_in<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor), [src]
F: 'static + Fn(&Self, &Actor),
The ::over-in signal is emitted when the dragged actor crosses
into actor.
actor
the Actor attached to the action
pub fn connect_over_out<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor), [src]
F: 'static + Fn(&Self, &Actor),
The ::over-out signal is emitted when the dragged actor crosses
outside actor.
actor
the Actor attached to the action
Implementors
impl<O> DropActionExt for O where
O: IsA<DropAction>, [src]
impl<O> DropActionExt for O where
O: IsA<DropAction>, [src]pub fn connect_can_drop<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor, f32, f32) -> bool, [src]
F: 'static + Fn(&O, &Actor, f32, f32) -> bool,
pub fn connect_drop<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor, f32, f32), [src]
F: 'static + Fn(&O, &Actor, f32, f32),
pub fn connect_drop_cancel<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor, f32, f32), [src]
F: 'static + Fn(&O, &Actor, f32, f32),
pub fn connect_over_in<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor), [src]
F: 'static + Fn(&O, &Actor),
pub fn connect_over_out<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor), [src]
F: 'static + Fn(&O, &Actor),