pub struct SwipeTrackerBuilder { /* private fields */ }
Expand description

A builder-pattern type to construct SwipeTracker objects.

Implementations§

source§

impl SwipeTrackerBuilder

source

pub fn allow_long_swipes(self, allow_long_swipes: bool) -> Self

Whether to allow swiping for more than one snap point at a time.

If the value is FALSE, each swipe can only move to the adjacent snap points.

source

pub fn allow_mouse_drag(self, allow_mouse_drag: bool) -> Self

Whether to allow dragging with mouse pointer.

source

pub fn allow_window_handle(self, allow_window_handle: bool) -> Self

Available on crate feature v1_5 only.

Whether to allow touchscreen swiping from GtkWindowHandle.

This will make dragging the window impossible.

source

pub fn enabled(self, enabled: bool) -> Self

Whether the swipe tracker is enabled.

When it’s not enabled, no events will be processed. Usually widgets will want to expose this via a property.

source

pub fn lower_overshoot(self, lower_overshoot: bool) -> Self

Available on crate feature v1_4 only.

Whether to allow swiping past the first available snap point.

source

pub fn reversed(self, reversed: bool) -> Self

Whether to reverse the swipe direction.

If the swipe tracker is horizontal, it can be used for supporting RTL text direction.

source

pub fn swipeable(self, swipeable: &impl IsA<Swipeable>) -> Self

The widget the swipe tracker is attached to.

source

pub fn upper_overshoot(self, upper_overshoot: bool) -> Self

Available on crate feature v1_4 only.

Whether to allow swiping past the last available snap point.

source

pub fn orientation(self, orientation: Orientation) -> Self

The orientation of the orientable.

source

pub fn build(self) -> SwipeTracker

Build the SwipeTracker.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.