pub trait InteractiveElement: Sized + Element {
Show 24 methods // Required method fn interactivity(&mut self) -> &mut Interactivity; // Provided methods fn group(self, group: impl Into<SharedString>) -> Self { ... } fn id(self, id: impl Into<ElementId>) -> Stateful<Self> { ... } fn track_focus(self, focus_handle: &FocusHandle) -> Focusable<Self> { ... } fn key_context<C, E>(self, key_context: C) -> Self where C: TryInto<KeyContext, Error = E>, E: Debug { ... } fn hover(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self { ... } fn group_hover( self, group_name: impl Into<SharedString>, f: impl FnOnce(StyleRefinement) -> StyleRefinement ) -> Self { ... } fn on_mouse_down( self, button: MouseButton, listener: impl Fn(&MouseDownEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn on_any_mouse_down( self, listener: impl Fn(&MouseDownEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn on_mouse_up( self, button: MouseButton, listener: impl Fn(&MouseUpEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn on_any_mouse_up( self, listener: impl Fn(&MouseUpEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn on_mouse_down_out( self, listener: impl Fn(&MouseDownEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn on_mouse_up_out( self, button: MouseButton, listener: impl Fn(&MouseUpEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn on_mouse_move( self, listener: impl Fn(&MouseMoveEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn on_scroll_wheel( self, listener: impl Fn(&ScrollWheelEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn capture_action<A: Action>( self, listener: impl Fn(&A, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn on_action<A: Action>( self, listener: impl Fn(&A, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn on_key_down( self, listener: impl Fn(&KeyDownEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn capture_key_down( self, listener: impl Fn(&KeyDownEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn on_key_up( self, listener: impl Fn(&KeyUpEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn capture_key_up( self, listener: impl Fn(&KeyUpEvent, &mut WindowContext<'_>) + 'static ) -> Self { ... } fn drag_over<S: 'static>( self, f: impl FnOnce(StyleRefinement) -> StyleRefinement ) -> Self { ... } fn group_drag_over<S: 'static>( self, group_name: impl Into<SharedString>, f: impl FnOnce(StyleRefinement) -> StyleRefinement ) -> Self { ... } fn on_drop<W: 'static>( self, listener: impl Fn(&View<W>, &mut WindowContext<'_>) + 'static ) -> Self { ... }
}

Required Methods§

source

fn interactivity(&mut self) -> &mut Interactivity

Provided Methods§

source

fn group(self, group: impl Into<SharedString>) -> Self

source

fn id(self, id: impl Into<ElementId>) -> Stateful<Self>

source

fn track_focus(self, focus_handle: &FocusHandle) -> Focusable<Self>

source

fn key_context<C, E>(self, key_context: C) -> Selfwhere C: TryInto<KeyContext, Error = E>, E: Debug,

source

fn hover(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self

source

fn group_hover( self, group_name: impl Into<SharedString>, f: impl FnOnce(StyleRefinement) -> StyleRefinement ) -> Self

source

fn on_mouse_down( self, button: MouseButton, listener: impl Fn(&MouseDownEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn on_any_mouse_down( self, listener: impl Fn(&MouseDownEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn on_mouse_up( self, button: MouseButton, listener: impl Fn(&MouseUpEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn on_any_mouse_up( self, listener: impl Fn(&MouseUpEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn on_mouse_down_out( self, listener: impl Fn(&MouseDownEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn on_mouse_up_out( self, button: MouseButton, listener: impl Fn(&MouseUpEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn on_mouse_move( self, listener: impl Fn(&MouseMoveEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn on_scroll_wheel( self, listener: impl Fn(&ScrollWheelEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn capture_action<A: Action>( self, listener: impl Fn(&A, &mut WindowContext<'_>) + 'static ) -> Self

Capture the given action, before normal action dispatch can fire

source

fn on_action<A: Action>( self, listener: impl Fn(&A, &mut WindowContext<'_>) + 'static ) -> Self

Add a listener for the given action, fires during the bubble event phase

source

fn on_key_down( self, listener: impl Fn(&KeyDownEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn capture_key_down( self, listener: impl Fn(&KeyDownEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn on_key_up( self, listener: impl Fn(&KeyUpEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn capture_key_up( self, listener: impl Fn(&KeyUpEvent, &mut WindowContext<'_>) + 'static ) -> Self

source

fn drag_over<S: 'static>( self, f: impl FnOnce(StyleRefinement) -> StyleRefinement ) -> Self

source

fn group_drag_over<S: 'static>( self, group_name: impl Into<SharedString>, f: impl FnOnce(StyleRefinement) -> StyleRefinement ) -> Self

source

fn on_drop<W: 'static>( self, listener: impl Fn(&View<W>, &mut WindowContext<'_>) + 'static ) -> Self

Implementors§