Skip to main content

NoSplash

Struct NoSplash 

Source
pub struct NoSplash { /* private fields */ }
Expand description

An InteractiveInkFeature that doesn’t paint a splash.

Use NoSplash::splash_factory to defeat the default ink splash drawn by an InkWell or ButtonStyle. For example, to create an ElevatedButton that does not draw the default “ripple” ink splash when it’s tapped:

ElevatedButton::new()
    .style(ElevatedButton::style_from().splash_factory(NoSplash::splash_factory()))
    .on_pressed(..)
    .child(Text::new("Run"))

Implementations§

Source§

impl NoSplash

Source

pub fn new( app: &mut App, controller: AnyMaterialInkController, reference_box: AnyRenderBox, color: Color, on_removed: Option<Listener>, ) -> Ref<NoSplash>

Create an InteractiveInkFeature that doesn’t paint a splash.

Source

pub fn splash_factory() -> InteractiveInkFeatureFactoryRef

Used to specify this type of ink splash for an InkWell, InkResponse, material Theme, or ButtonStyle.

Dart’s static const: every call hands out the same factory, so they compare equal.

Trait Implementations§

Source§

impl InkFeatureLeaf for NoSplash

Source§

fn paint_feature( self: Handle<Self>, _app: &mut App, _canvas: &mut Canvas, _transform: &Matrix4, )

Override this method to paint the ink feature. Read more
Source§

fn dispose(self: Handle<Self>, app: &mut App)

Free up the resources associated with this ink feature. Read more
Source§

impl InkFeatureLeafData for NoSplash

Source§

fn ink_feature(&self) -> &InkFeatureData

The leaf’s InkFeature bag.
Source§

fn ink_feature_mut(&mut self) -> &mut InkFeatureData

The leaf’s InkFeature bag, mutably.
Source§

impl InteractiveInkFeatureLeaf for NoSplash

Source§

fn confirm(self: Handle<Self>, app: &mut App)

Called when the user input that triggered this feature’s appearance was confirmed. Read more
Source§

fn cancel(self: Handle<Self>, app: &mut App)

Called when the user input that triggered this feature’s appearance was canceled. Read more
Source§

impl InteractiveInkFeatureLeafData for NoSplash

Auto Trait Implementations§

§

impl !RefUnwindSafe for NoSplash

§

impl !Send for NoSplash

§

impl !Sync for NoSplash

§

impl !UnwindSafe for NoSplash

§

impl Forget for NoSplash

§

impl Freeze for NoSplash
where NonZero<u32>: Freeze, PhantomData<fn() -> RenderInkFeatures>: Freeze, &'static RenderBoxVTable: Freeze, *const RcInner<dyn Fn(&mut App)> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App)>>: Freeze, *const (): Freeze, *const RcInner<dyn ShapeBorder> is !null: Freeze, PhantomData<RcInner<dyn ShapeBorder>>: Freeze,

§

impl Move for NoSplash

§

impl Unpin for NoSplash
where NonZero<u32>: Unpin, &'static RenderBoxVTable: Unpin, Rc<dyn Fn(&mut App)>: Unpin, *const (): Unpin, Rc<dyn ShapeBorder>: Unpin,

§

impl UnsafeUnpin for NoSplash
where NonZeroU32Inner: UnsafeUnpin, PhantomData<fn() -> RenderInkFeatures>: UnsafeUnpin, &'static RenderBoxVTable: UnsafeUnpin, *const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin, *const (): UnsafeUnpin, *const RcInner<dyn ShapeBorder> is !null: UnsafeUnpin, PhantomData<RcInner<dyn ShapeBorder>>: UnsafeUnpin,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<F> InkFeatureObject for F
where F: InkFeatureLeaf,

Source§

fn as_ink_feature(self: Handle<F>) -> AnyInkFeature

This feature as the erased AnyInkFeature — what to pass where a Dart API takes an InkFeature.
Source§

impl<F> InteractiveInkFeatureObject for F

Source§

fn as_interactive_ink_feature(self: Handle<F>) -> AnyInteractiveInkFeature

This feature as the erased AnyInteractiveInkFeature — what to pass where a Dart API takes an InteractiveInkFeature.
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>