[]Struct gtk::GestureZoom

pub struct GestureZoom(_, _);

GestureZoom is a Gesture implementation able to recognize pinch/zoom gestures, whenever the distance between both tracked sequences changes, the GestureZoom::scale-changed signal is emitted to report the scale factor.

Implements

GestureExt, EventControllerExt, glib::object::ObjectExt

Implementations

impl GestureZoom[src]

pub fn new<P: IsA<Widget>>(widget: &P) -> GestureZoom[src]

Returns a newly created Gesture that recognizes zoom in/out gestures (usually known as pinch/zoom).

widget

a Widget

Returns

a newly created GestureZoom

pub fn get_scale_delta(&self) -> f64[src]

If self is active, this function returns the zooming difference since the gesture was recognized (hence the starting point is considered 1:1). If self is not active, 1 is returned.

Returns

the scale delta

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

This signal is emitted whenever the distance between both tracked sequences changes.

scale

Scale delta, taking the initial state as 1:1

Trait Implementations

impl Clone for GestureZoom

impl Debug for GestureZoom

impl Display for GestureZoom[src]

impl Eq for GestureZoom

impl Hash for GestureZoom

impl IsA<EventController> for GestureZoom

impl IsA<Gesture> for GestureZoom

impl Ord for GestureZoom

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

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

impl StaticType for GestureZoom

Auto Trait Implementations

impl RefUnwindSafe for GestureZoom

impl !Send for GestureZoom

impl !Sync for GestureZoom

impl Unpin for GestureZoom

impl UnwindSafe for GestureZoom

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.