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§
§impl<T, W> Controller<T, W> for Click<T>where
T: Data,
W: Widget<T>,
impl<T, W> Controller<T, W> for Click<T>where T: Data, W: Widget<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§
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§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.