[]Struct gtk::GesturePan

pub struct GesturePan(_, _);

GesturePan is a Gesture implementation able to recognize pan gestures, those are drags that are locked to happen along one axis. The axis that a GesturePan handles is defined at construct time, and can be changed through GesturePan::set_orientation.

When the gesture starts to be recognized, GesturePan will attempt to determine as early as possible whether the sequence is moving in the expected direction, and denying the sequence if this does not happen.

Once a panning gesture along the expected axis is recognized, the GesturePan::pan signal will be emitted as input events are received, containing the offset in the given axis.

Implements

GestureDragExt, GestureSingleExt, GestureExt, EventControllerExt, glib::object::ObjectExt

Implementations

impl GesturePan[src]

pub fn new<P: IsA<Widget>>(widget: &P, orientation: Orientation) -> GesturePan[src]

Returns a newly created Gesture that recognizes pan gestures.

widget

a Widget

orientation

expected orientation

Returns

a newly created GesturePan

pub fn get_orientation(&self) -> Orientation[src]

Returns the orientation of the pan gestures that this self expects.

Returns

the expected orientation for pan gestures

pub fn set_orientation(&self, orientation: Orientation)[src]

Sets the orientation to be expected on pan gestures.

orientation

expected orientation

pub fn connect_pan<F: Fn(&GesturePan, PanDirection, f64) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

This signal is emitted once a panning gesture along the expected axis is detected.

direction

current direction of the pan gesture

offset

Offset along the gesture orientation

pub fn connect_property_orientation_notify<F: Fn(&GesturePan) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Trait Implementations

impl Clone for GesturePan

impl Debug for GesturePan

impl Display for GesturePan[src]

impl Eq for GesturePan

impl Hash for GesturePan

impl IsA<EventController> for GesturePan

impl IsA<Gesture> for GesturePan

impl IsA<GestureDrag> for GesturePan

impl IsA<GestureSingle> for GesturePan

impl Ord for GesturePan

impl<T: ObjectType> PartialEq<T> for GesturePan

impl<T: ObjectType> PartialOrd<T> for GesturePan

impl StaticType for GesturePan

Auto Trait Implementations

impl RefUnwindSafe for GesturePan

impl !Send for GesturePan

impl !Sync for GesturePan

impl Unpin for GesturePan

impl UnwindSafe for GesturePan

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.