Trait ux::PanActionExt [−][src]
pub trait PanActionExt: 'static {}Show methods
pub fn get_acceleration_factor(&self) -> f64; pub fn get_constrained_motion_delta(&self, point: u32) -> (f32, f32, f32); pub fn get_deceleration(&self) -> f64; pub fn get_interpolate(&self) -> bool; pub fn get_interpolated_coords(&self) -> (f32, f32); pub fn get_interpolated_delta(&self) -> (f32, f32, f32); pub fn get_pan_axis(&self) -> PanAxis; pub fn set_acceleration_factor(&self, factor: f64); pub fn set_deceleration(&self, rate: f64); pub fn set_interpolate(&self, should_interpolate: bool); pub fn set_pan_axis(&self, axis: PanAxis); pub fn connect_pan<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor, bool) -> bool; pub fn connect_pan_stopped<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor); pub fn connect_property_acceleration_factor_notify<F>(
&self,
f: F
) -> SignalHandlerId
where
F: 'static + Fn(&Self); pub fn connect_property_deceleration_notify<F>(
&self,
f: F
) -> SignalHandlerId
where
F: 'static + Fn(&Self); pub fn connect_property_interpolate_notify<F>(
&self,
f: F
) -> SignalHandlerId
where
F: 'static + Fn(&Self); pub fn connect_property_pan_axis_notify<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self);
Required methods
pub fn get_acceleration_factor(&self) -> f64
[src]
Retrieves the initial acceleration factor for interpolated ::pan events.
Returns
The initial acceleration factor for interpolated events.
pub 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
pub fn get_deceleration(&self) -> f64
[src]
Retrieves the deceleration rate of interpolated ::pan events.
Returns
The deceleration rate of the interpolated events.
pub 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.
pub 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
pub 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
pub fn get_pan_axis(&self) -> PanAxis
[src]
pub 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
pub 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
pub 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
pub fn set_pan_axis(&self, axis: PanAxis)
[src]
pub fn connect_pan<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor, bool) -> bool,
[src]
F: 'static + Fn(&Self, &Actor, bool) -> bool,
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.
pub fn connect_pan_stopped<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor),
[src]
F: 'static + Fn(&Self, &Actor),
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
pub fn connect_property_acceleration_factor_notify<F>(
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&Self),
[src]
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&Self),
pub fn connect_property_deceleration_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self),
[src]
F: 'static + Fn(&Self),
pub fn connect_property_interpolate_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self),
[src]
F: 'static + Fn(&Self),
pub fn connect_property_pan_axis_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self),
[src]
F: 'static + Fn(&Self),
Implementors
impl<O> PanActionExt for O where
O: IsA<PanAction>,
[src]
impl<O> PanActionExt for O where
O: IsA<PanAction>,
[src]pub fn get_acceleration_factor(&self) -> f64
[src]
pub fn get_constrained_motion_delta(&self, point: u32) -> (f32, f32, f32)
[src]
pub fn get_deceleration(&self) -> f64
[src]
pub fn get_interpolate(&self) -> bool
[src]
pub fn get_interpolated_coords(&self) -> (f32, f32)
[src]
pub fn get_interpolated_delta(&self) -> (f32, f32, f32)
[src]
pub fn get_pan_axis(&self) -> PanAxis
[src]
pub fn set_acceleration_factor(&self, factor: f64)
[src]
pub fn set_deceleration(&self, rate: f64)
[src]
pub fn set_interpolate(&self, should_interpolate: bool)
[src]
pub fn set_pan_axis(&self, axis: PanAxis)
[src]
pub fn connect_pan<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor, bool) -> bool,
[src]
F: 'static + Fn(&O, &Actor, bool) -> bool,
pub fn connect_pan_stopped<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor),
[src]
F: 'static + Fn(&O, &Actor),
pub fn connect_property_acceleration_factor_notify<F>(
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),
pub fn connect_property_deceleration_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_interpolate_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_pan_axis_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),