pub struct Click<T> { /* private fields */ }
Expand description
A clickable Controller
widget. Pass this and a child widget to a
ControllerHost
to make the child interactive. More conveniently, this is
available as an on_click
method via WidgetExt
.
This is an alternative to the standard Button
widget, for when you want
to make an arbitrary widget clickable.
The child widget will also be updated on LifeCycle::HotChanged
and
mouse down, which can be useful for painting based on ctx.is_active()
and ctx.is_hot()
.
Implementations§
Trait Implementations§
source§impl<T: Data, W: Widget<T>> Controller<T, W> for Click<T>
impl<T: Data, W: Widget<T>> Controller<T, W> for Click<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Click<T>
impl<T> !Send for Click<T>
impl<T> !Sync for Click<T>
impl<T> Unpin for Click<T>
impl<T> !UnwindSafe for Click<T>
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.