Trait animate::DropActionExt [−][src]
pub trait DropActionExt: 'static { fn connect_can_drop<F: Fn(&Self, &Actor, f32, f32) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_drop<F: Fn(&Self, &Actor, f32, f32) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_drop_cancel<F: Fn(&Self, &Actor, f32, f32) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_over_in<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_over_out<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId; }
Required methods
fn connect_can_drop<F: Fn(&Self, &Actor, f32, f32) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
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
fn connect_drop<F: Fn(&Self, &Actor, f32, f32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
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
fn connect_drop_cancel<F: Fn(&Self, &Actor, f32, f32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
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
fn connect_over_in<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
The ::over-in signal is emitted when the dragged actor crosses
into actor
.
actor
the Actor
attached to the action
fn connect_over_out<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
The ::over-out signal is emitted when the dragged actor crosses
outside actor
.
actor
the Actor
attached to the action
Implementors
impl<O: IsA<DropAction>> DropActionExt for O
[src]
impl<O: IsA<DropAction>> DropActionExt for O
[src]fn connect_can_drop<F: Fn(&Self, &Actor, f32, f32) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_drop<F: Fn(&Self, &Actor, f32, f32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_drop_cancel<F: Fn(&Self, &Actor, f32, f32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_over_in<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_over_out<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId