pub struct CardScope { /* private fields */ }Expand description
A Card and its builder.
Implementations§
Source§impl CardScope
impl CardScope
Sourcepub fn on_pointer(
self,
kinds: PointerKinds,
handler: impl FnMut(PointerEvent) + 'static,
) -> Self
pub fn on_pointer( self, kinds: PointerKinds, handler: impl FnMut(PointerEvent) + 'static, ) -> Self
Subscribes the node to the kinds of pointer input in kinds. The handler runs
on the same call as the input; calling consume on the event keeps it from
the nearest subscribed ancestor and from the Renderer’s own handling.
A node that never calls this has no pointer input at all, and costs nothing.
Source§impl CardScope
impl CardScope
Sourcepub fn on_click(self, handler: impl FnMut() + 'static) -> Self
pub fn on_click(self, handler: impl FnMut() + 'static) -> Self
Makes the container a button. The Renderer gives it keyboard focus, runs the handler on a click and on Enter or Space, announces it to assistive technology as a button, and shows hover, pressed and focus state.
A container that never calls this is not a control and costs nothing.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CardScope
impl !Send for CardScope
impl !Sync for CardScope
impl !UnwindSafe for CardScope
impl Freeze for CardScope
impl Unpin for CardScope
impl UnsafeUnpin for CardScope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more