[][src]Struct libhandy4::SwipeTracker

pub struct SwipeTracker(_);

Implementations

impl SwipeTracker[src]

pub fn new<P: IsA<Swipeable>>(swipeable: &P) -> SwipeTracker[src]

Create a new SwipeTracker object on widget.

swipeable

a gtk::Widget to add the tracker on

Returns

the newly created SwipeTracker object

pub fn get_allow_mouse_drag(&self) -> bool[src]

Get whether self can be dragged with mouse pointer.

Returns

true is mouse dragging is allowed

pub fn get_enabled(&self) -> bool[src]

Get whether self is enabled. When it's not enabled, no events will be processed. Generally widgets will want to expose this via a property.

Returns

true if self is enabled

pub fn get_reversed(&self) -> bool[src]

Get whether self is reversing the swipe direction.

Returns

true is the direction is reversed

pub fn get_swipeable(&self) -> Option<Swipeable>[src]

Get self's swipeable widget.

Returns

the swipeable widget

pub fn set_allow_mouse_drag(&self, allow_mouse_drag: bool)[src]

Set whether self can be dragged with mouse pointer. This should usually be false.

allow_mouse_drag

whether to allow mouse dragging

pub fn set_enabled(&self, enabled: bool)[src]

Set whether self is enabled. When it's not enabled, no events will be processed. Usually widgets will want to expose this via a property.

enabled

whether to enable to swipe tracker

pub fn set_reversed(&self, reversed: bool)[src]

Set whether to reverse the swipe direction. If self is horizontal, can be used for supporting RTL text direction.

reversed

whether to reverse the swipe direction

pub fn shift_position(&self, delta: f64)[src]

Move the current progress value by delta. This can be used to adjust the current position if snap points move during the gesture.

delta

the position delta

pub fn connect_end_swipe<F: Fn(&SwipeTracker, i64, f64) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

This signal is emitted as soon as the gesture has stopped.

duration

Snap-back animation duration in milliseconds

to

The progress value to animate to

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

This signal is emitted every time the progress value changes.

progress

The current animation progress value

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

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

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

Trait Implementations

impl Clone for SwipeTracker[src]

impl Debug for SwipeTracker[src]

impl Display for SwipeTracker[src]

impl Eq for SwipeTracker[src]

impl Hash for SwipeTracker[src]

impl IsA<Orientable> for SwipeTracker[src]

impl Ord for SwipeTracker[src]

impl ParentClassIs for SwipeTracker[src]

type Parent = Object

impl<T: ObjectType> PartialEq<T> for SwipeTracker[src]

impl<T: ObjectType> PartialOrd<T> for SwipeTracker[src]

impl StaticType for SwipeTracker[src]

impl StructuralEq for SwipeTracker[src]

Auto Trait Implementations

impl RefUnwindSafe for SwipeTracker[src]

impl !Send for SwipeTracker[src]

impl !Sync for SwipeTracker[src]

impl Unpin for SwipeTracker[src]

impl UnwindSafe for SwipeTracker[src]

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<O> OrientableExt for O where
    O: IsA<Orientable>, 

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.