Trait ux::GestureActionExt [−][src]
pub trait GestureActionExt: 'static {}Show methods
pub fn cancel(&self); pub fn get_device(&self, point: u32) -> Option<InputDevice>; pub fn get_last_event(&self, point: u32) -> Option<Event>; pub fn get_motion_coords(&self, point: u32) -> (f32, f32); pub fn get_motion_delta(&self, point: u32) -> (f32, f32, f32); pub fn get_n_current_points(&self) -> u32; pub fn get_n_touch_points(&self) -> i32; pub fn get_press_coords(&self, point: u32) -> (f32, f32); pub fn get_release_coords(&self, point: u32) -> (f32, f32); pub fn get_sequence(&self, point: u32) -> Option<EventSequence>; pub fn get_threshold_trigger_distance(&self) -> (f32, f32); pub fn get_threshold_trigger_edge(&self) -> GestureTriggerEdge; pub fn get_velocity(&self, point: u32) -> (f32, f32, f32); pub fn set_n_touch_points(&self, nb_points: i32); pub fn set_threshold_trigger_distance(&self, x: f32, y: f32); pub fn set_threshold_trigger_edge(&self, edge: GestureTriggerEdge); pub fn get_property_threshold_trigger_distance_x(&self) -> f32; pub fn get_property_threshold_trigger_distance_y(&self) -> f32; pub fn connect_gesture_begin<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor) -> bool; pub fn connect_gesture_cancel<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor); pub fn connect_gesture_end<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor); pub fn connect_gesture_progress<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor) -> bool; pub fn connect_property_n_touch_points_notify<F>(
&self,
f: F
) -> SignalHandlerId
where
F: 'static + Fn(&Self);
Trait containing all GestureAction
methods.
Implementors
GestureAction
, PanAction
, RotateAction
, SwipeAction
, TapAction
, ZoomAction
Required methods
pub fn cancel(&self)
[src]
Cancel a GestureAction
before it begins
pub fn get_device(&self, point: u32) -> Option<InputDevice>
[src]
Retrieves the InputDevice
of a touch point.
point
the touch point index, with 0 being the first touch point received by the action
Returns
the InputDevice
of a touch point.
pub fn get_last_event(&self, point: u32) -> Option<Event>
[src]
Retrieves a reference to the last Event
for a touch point. Call
event_copy
if you need to store the reference somewhere.
point
index of a point currently active
Returns
the last Event
for a touch point.
pub fn get_motion_coords(&self, point: u32) -> (f32, f32)
[src]
Retrieves the coordinates, in stage space, of the latest motion event during the dragging.
point
the touch point index, with 0 being the first touch point received by the action
motion_x
return location for the latest motion event’s X coordinate
motion_y
return location for the latest motion event’s Y coordinate
pub fn get_motion_delta(&self, point: u32) -> (f32, f32, f32)
[src]
Retrieves the incremental delta since the last motion event during the dragging.
point
the touch point index, with 0 being the first touch point received by the action
delta_x
return location for the X axis component of the incremental motion delta
delta_y
return location for the Y axis component of the incremental motion delta
Returns
the distance since last motion event
pub fn get_n_current_points(&self) -> u32
[src]
pub fn get_n_touch_points(&self) -> i32
[src]
Retrieves the number of requested points to trigger the gesture.
Returns
the number of points to trigger the gesture.
pub fn get_press_coords(&self, point: u32) -> (f32, f32)
[src]
Retrieves the coordinates, in stage space, of the press event that started the dragging for a specific touch point.
point
the touch point index, with 0 being the first touch point received by the action
press_x
return location for the press event’s X coordinate
press_y
return location for the press event’s Y coordinate
pub fn get_release_coords(&self, point: u32) -> (f32, f32)
[src]
Retrieves the coordinates, in stage space, where the touch point was last released.
point
the touch point index, with 0 being the first touch point received by the action
release_x
return location for the X coordinate of the last release
release_y
return location for the Y coordinate of the last release
pub fn get_sequence(&self, point: u32) -> Option<EventSequence>
[src]
Retrieves the EventSequence
of a touch point.
point
index of a point currently active
Returns
the EventSequence
of a touch point.
pub fn get_threshold_trigger_distance(&self) -> (f32, f32)
[src]
Retrieves the threshold trigger distance of the gesture self
,
as set using GestureActionExt::set_threshold_trigger_distance
.
x
The return location for the horizontal distance, or None
y
The return location for the vertical distance, or None
pub fn get_threshold_trigger_edge(&self) -> GestureTriggerEdge
[src]
Retrieves the edge trigger of the gesture self
, as set using
GestureActionExt::set_threshold_trigger_edge
.
Returns
the edge trigger
pub fn get_velocity(&self, point: u32) -> (f32, f32, f32)
[src]
Retrieves the velocity, in stage pixels per millisecond, of the latest motion event during the dragging.
point
the touch point index, with 0 being the first touch point received by the action
velocity_x
return location for the latest motion event’s X velocity
velocity_y
return location for the latest motion event’s Y velocity
pub fn set_n_touch_points(&self, nb_points: i32)
[src]
pub fn set_threshold_trigger_distance(&self, x: f32, y: f32)
[src]
Sets the threshold trigger distance for the gesture drag threshold, if any.
This function should only be called by sub-classes of
GestureAction
during their construction phase.
x
the distance on the horizontal axis
y
the distance on the vertical axis
pub fn set_threshold_trigger_edge(&self, edge: GestureTriggerEdge)
[src]
Sets the edge trigger for the gesture drag threshold, if any.
This function should only be called by sub-classes of
GestureAction
during their construction phase.
edge
the GestureTriggerEdge
pub fn get_property_threshold_trigger_distance_x(&self) -> f32
[src]
The horizontal trigger distance to be used by the action to either
emit the GestureAction::gesture-begin
signal or to emit
the GestureAction::gesture-cancel
signal.
A negative value will be interpreted as the default drag threshold.
pub fn get_property_threshold_trigger_distance_y(&self) -> f32
[src]
The vertical trigger distance to be used by the action to either
emit the GestureAction::gesture-begin
signal or to emit
the GestureAction::gesture-cancel
signal.
A negative value will be interpreted as the default drag threshold.
pub fn connect_gesture_begin<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor) -> bool,
[src]
F: 'static + Fn(&Self, &Actor) -> bool,
The ::gesture_begin signal is emitted when the Actor
to which
a GestureAction
has been applied starts receiving a gesture.
actor
the Actor
attached to the action
Returns
true
if the gesture should start, and false
if
the gesture should be ignored.
pub fn connect_gesture_cancel<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor),
[src]
F: 'static + Fn(&Self, &Actor),
The ::gesture-cancel signal is emitted when the ongoing gesture gets
cancelled from the GestureAction::gesture-progress
signal handler.
This signal is emitted if and only if the GestureAction::gesture-begin
signal has been emitted first.
actor
the Actor
attached to the action
pub fn connect_gesture_end<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor),
[src]
F: 'static + Fn(&Self, &Actor),
The ::gesture-end signal is emitted at the end of the gesture gesture, when the pointer’s button is released
This signal is emitted if and only if the GestureAction::gesture-begin
signal has been emitted first.
actor
the Actor
attached to the action
pub fn connect_gesture_progress<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor) -> bool,
[src]
F: 'static + Fn(&Self, &Actor) -> bool,
The ::gesture-progress signal is emitted for each motion event after
the GestureAction::gesture-begin
signal has been emitted.
actor
the Actor
attached to the action
Returns
true
if the gesture should continue, and false
if
the gesture should be cancelled.
pub fn connect_property_n_touch_points_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self),
[src]
F: 'static + Fn(&Self),
Implementors
impl<O> GestureActionExt for O where
O: IsA<GestureAction>,
[src]
impl<O> GestureActionExt for O where
O: IsA<GestureAction>,
[src]pub fn cancel(&self)
[src]
pub fn get_device(&self, point: u32) -> Option<InputDevice>
[src]
pub fn get_last_event(&self, point: u32) -> Option<Event>
[src]
pub fn get_motion_coords(&self, point: u32) -> (f32, f32)
[src]
pub fn get_motion_delta(&self, point: u32) -> (f32, f32, f32)
[src]
pub fn get_n_current_points(&self) -> u32
[src]
pub fn get_n_touch_points(&self) -> i32
[src]
pub fn get_press_coords(&self, point: u32) -> (f32, f32)
[src]
pub fn get_release_coords(&self, point: u32) -> (f32, f32)
[src]
pub fn get_sequence(&self, point: u32) -> Option<EventSequence>
[src]
pub fn get_threshold_trigger_distance(&self) -> (f32, f32)
[src]
pub fn get_threshold_trigger_edge(&self) -> GestureTriggerEdge
[src]
pub fn get_velocity(&self, point: u32) -> (f32, f32, f32)
[src]
pub fn set_n_touch_points(&self, nb_points: i32)
[src]
pub fn set_threshold_trigger_distance(&self, x: f32, y: f32)
[src]
pub fn set_threshold_trigger_edge(&self, edge: GestureTriggerEdge)
[src]
pub fn get_property_threshold_trigger_distance_x(&self) -> f32
[src]
pub fn get_property_threshold_trigger_distance_y(&self) -> f32
[src]
pub fn connect_gesture_begin<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor) -> bool,
[src]
F: 'static + Fn(&O, &Actor) -> bool,
pub fn connect_gesture_cancel<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor),
[src]
F: 'static + Fn(&O, &Actor),
pub fn connect_gesture_end<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor),
[src]
F: 'static + Fn(&O, &Actor),
pub fn connect_gesture_progress<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor) -> bool,
[src]
F: 'static + Fn(&O, &Actor) -> bool,
pub fn connect_property_n_touch_points_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),