Trait animate::PanActionExt [−][src]
pub trait PanActionExt: 'static {}Show methods
fn get_acceleration_factor(&self) -> f64; fn get_constrained_motion_delta(&self, point: u32) -> (f32, f32, f32); fn get_deceleration(&self) -> f64; fn get_interpolate(&self) -> bool; fn get_interpolated_coords(&self) -> (f32, f32); fn get_interpolated_delta(&self) -> (f32, f32, f32); fn get_pan_axis(&self) -> PanAxis; fn set_acceleration_factor(&self, factor: f64); fn set_deceleration(&self, rate: f64); fn set_interpolate(&self, should_interpolate: bool); fn set_pan_axis(&self, axis: PanAxis); fn connect_pan<F: Fn(&Self, &Actor, bool) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_pan_stopped<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_acceleration_factor_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_deceleration_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_interpolate_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_pan_axis_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
Required methods
fn get_acceleration_factor(&self) -> f64
[src]
Retrieves the initial acceleration factor for interpolated ::pan events.
Returns
The initial acceleration factor for interpolated events.
fn get_constrained_motion_delta(&self, point: u32) -> (f32, f32, f32)
[src]
Retrieves the delta, in stage space, dependent on the current state
of the PanAction
, and respecting the constraint specified by the
PanAction:pan-axis
property.
point
the touch point index, with 0 being the first touch point received by the action
delta_x
return location for the X delta
delta_y
return location for the Y delta
Returns
the distance since last motion event
fn get_deceleration(&self) -> f64
[src]
Retrieves the deceleration rate of interpolated ::pan events.
Returns
The deceleration rate of the interpolated events.
fn get_interpolate(&self) -> bool
[src]
Checks if the action should emit ::pan events even after releasing the pointer during a panning gesture, to emulate some kind of kinetic inertia.
Returns
true
if interpolated events emission is active.
fn get_interpolated_coords(&self) -> (f32, f32)
[src]
Retrieves the coordinates, in stage space, of the latest interpolated
event, analogous to GestureActionExt::get_motion_coords
.
interpolated_x
return location for the latest interpolated event’s X coordinate
interpolated_y
return location for the latest interpolated event’s Y coordinate
fn get_interpolated_delta(&self) -> (f32, f32, f32)
[src]
Retrieves the delta, in stage space, since the latest interpolated
event, analogous to GestureActionExt::get_motion_delta
.
delta_x
return location for the X delta since the latest interpolated event
delta_y
return location for the Y delta since the latest interpolated event
Returns
the distance since the latest interpolated event
fn get_pan_axis(&self) -> PanAxis
[src]
fn set_acceleration_factor(&self, factor: f64)
[src]
Factor applied to the momentum velocity at the time of releasing the pointer when generating interpolated ::pan events.
factor
The acceleration factor
fn set_deceleration(&self, rate: f64)
[src]
Sets the deceleration rate of the interpolated ::pan events generated after a pan gesture. This is approximately the value that the momentum at the time of releasing the pointer is divided by every 60th of a second.
rate
The deceleration rate
fn set_interpolate(&self, should_interpolate: bool)
[src]
Sets whether the action should emit interpolated ::pan events after the drag has ended, to emulate the gesture kinetic inertia.
should_interpolate
whether to enable interpolated pan events
fn set_pan_axis(&self, axis: PanAxis)
[src]
fn connect_pan<F: Fn(&Self, &Actor, bool) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
The ::pan signal is emitted to keep track of the motion during
a pan gesture. is_interpolated
is set to true
during the
interpolation phase of the pan, after the drag has ended and
the :interpolate property was set to true
.
actor
the Actor
attached to the action
is_interpolated
if the event is the result of interpolating the motion velocity at the end of the drag
Returns
true
if the pan should continue, and false
if
the pan should be cancelled.
fn connect_pan_stopped<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
The ::pan-stopped signal is emitted at the end of the interpolation
phase of the pan action, only when :interpolate is set to true
.
actor
the Actor
attached to the action
fn connect_property_acceleration_factor_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_deceleration_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_interpolate_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_pan_axis_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<PanAction>> PanActionExt for O
[src]
impl<O: IsA<PanAction>> PanActionExt for O
[src]fn get_acceleration_factor(&self) -> f64
[src]
fn get_constrained_motion_delta(&self, point: u32) -> (f32, f32, f32)
[src]
fn get_deceleration(&self) -> f64
[src]
fn get_interpolate(&self) -> bool
[src]
fn get_interpolated_coords(&self) -> (f32, f32)
[src]
fn get_interpolated_delta(&self) -> (f32, f32, f32)
[src]
fn get_pan_axis(&self) -> PanAxis
[src]
fn set_acceleration_factor(&self, factor: f64)
[src]
fn set_deceleration(&self, rate: f64)
[src]
fn set_interpolate(&self, should_interpolate: bool)
[src]
fn set_pan_axis(&self, axis: PanAxis)
[src]
fn connect_pan<F: Fn(&Self, &Actor, bool) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_pan_stopped<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_acceleration_factor_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_deceleration_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_interpolate_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_pan_axis_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId