[][src]Trait hobo::EventTarget

pub trait EventTarget: Element {
    fn event_handlers(&self) -> RefMut<Vec<EventHandler>>;

    fn add_on_click(&self, f: impl FnMut(MouseEvent) + 'static) { ... }
fn add_on_click_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) { ... }
fn on_click(self, f: impl FnMut(MouseEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_click_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_context_menu(&self, f: impl FnMut(MouseEvent) + 'static) { ... }
fn add_on_context_menu_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) { ... }
fn on_context_menu(self, f: impl FnMut(MouseEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_context_menu_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_dbl_click(&self, f: impl FnMut(MouseEvent) + 'static) { ... }
fn add_on_dbl_click_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) { ... }
fn on_dbl_click(self, f: impl FnMut(MouseEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_dbl_click_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_mouse_down(&self, f: impl FnMut(MouseEvent) + 'static) { ... }
fn add_on_mouse_down_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) { ... }
fn on_mouse_down(self, f: impl FnMut(MouseEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_mouse_down_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_mouse_enter(&self, f: impl FnMut(MouseEvent) + 'static) { ... }
fn add_on_mouse_enter_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) { ... }
fn on_mouse_enter(self, f: impl FnMut(MouseEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_mouse_enter_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_mouse_leave(&self, f: impl FnMut(MouseEvent) + 'static) { ... }
fn add_on_mouse_leave_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) { ... }
fn on_mouse_leave(self, f: impl FnMut(MouseEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_mouse_leave_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_mouse_move(&self, f: impl FnMut(MouseEvent) + 'static) { ... }
fn add_on_mouse_move_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) { ... }
fn on_mouse_move(self, f: impl FnMut(MouseEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_mouse_move_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_mouse_over(&self, f: impl FnMut(MouseEvent) + 'static) { ... }
fn add_on_mouse_over_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) { ... }
fn on_mouse_over(self, f: impl FnMut(MouseEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_mouse_over_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_mouse_out(&self, f: impl FnMut(MouseEvent) + 'static) { ... }
fn add_on_mouse_out_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) { ... }
fn on_mouse_out(self, f: impl FnMut(MouseEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_mouse_out_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_mouse_up(&self, f: impl FnMut(MouseEvent) + 'static) { ... }
fn add_on_mouse_up_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) { ... }
fn on_mouse_up(self, f: impl FnMut(MouseEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_mouse_up_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, MouseEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_key_down(&self, f: impl FnMut(KeyboardEvent) + 'static) { ... }
fn add_on_key_down_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, KeyboardEvent) + 'static
    ) { ... }
fn on_key_down(self, f: impl FnMut(KeyboardEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_key_down_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, KeyboardEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_key_up(&self, f: impl FnMut(KeyboardEvent) + 'static) { ... }
fn add_on_key_up_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, KeyboardEvent) + 'static
    ) { ... }
fn on_key_up(self, f: impl FnMut(KeyboardEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_key_up_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, KeyboardEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_change(&self, f: impl FnMut(Event) + 'static) { ... }
fn add_on_change_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, Event) + 'static
    ) { ... }
fn on_change(self, f: impl FnMut(Event) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_change_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, Event) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_scroll(&self, f: impl FnMut(Event) + 'static) { ... }
fn add_on_scroll_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, Event) + 'static
    ) { ... }
fn on_scroll(self, f: impl FnMut(Event) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_scroll_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, Event) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_blur(&self, f: impl FnMut(FocusEvent) + 'static) { ... }
fn add_on_blur_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, FocusEvent) + 'static
    ) { ... }
fn on_blur(self, f: impl FnMut(FocusEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_blur_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, FocusEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... }
fn add_on_focus(&self, f: impl FnMut(FocusEvent) + 'static) { ... }
fn add_on_focus_mut<T: 'static>(
        &self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, FocusEvent) + 'static
    ) { ... }
fn on_focus(self, f: impl FnMut(FocusEvent) + 'static) -> Self
    where
        Self: Sized
, { ... }
fn on_focus_mut<T: 'static>(
        self,
        this: &Rc<MaybeUninit<RefCell<T>>>,
        f: impl FnMut(&mut T, FocusEvent) + 'static
    ) -> Self
    where
        Self: Sized
, { ... } }

Trait for all hobo elements that can handle various browser events

Required methods

Loading content...

Provided methods

fn add_on_click(&self, f: impl FnMut(MouseEvent) + 'static)

fn add_on_click_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
)

fn on_click(self, f: impl FnMut(MouseEvent) + 'static) -> Self where
    Self: Sized

fn on_click_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_context_menu(&self, f: impl FnMut(MouseEvent) + 'static)

fn add_on_context_menu_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
)

fn on_context_menu(self, f: impl FnMut(MouseEvent) + 'static) -> Self where
    Self: Sized

fn on_context_menu_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_dbl_click(&self, f: impl FnMut(MouseEvent) + 'static)

fn add_on_dbl_click_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
)

fn on_dbl_click(self, f: impl FnMut(MouseEvent) + 'static) -> Self where
    Self: Sized

fn on_dbl_click_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_mouse_down(&self, f: impl FnMut(MouseEvent) + 'static)

fn add_on_mouse_down_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
)

fn on_mouse_down(self, f: impl FnMut(MouseEvent) + 'static) -> Self where
    Self: Sized

fn on_mouse_down_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_mouse_enter(&self, f: impl FnMut(MouseEvent) + 'static)

fn add_on_mouse_enter_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
)

fn on_mouse_enter(self, f: impl FnMut(MouseEvent) + 'static) -> Self where
    Self: Sized

fn on_mouse_enter_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_mouse_leave(&self, f: impl FnMut(MouseEvent) + 'static)

fn add_on_mouse_leave_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
)

fn on_mouse_leave(self, f: impl FnMut(MouseEvent) + 'static) -> Self where
    Self: Sized

fn on_mouse_leave_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_mouse_move(&self, f: impl FnMut(MouseEvent) + 'static)

fn add_on_mouse_move_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
)

fn on_mouse_move(self, f: impl FnMut(MouseEvent) + 'static) -> Self where
    Self: Sized

fn on_mouse_move_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_mouse_over(&self, f: impl FnMut(MouseEvent) + 'static)

fn add_on_mouse_over_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
)

fn on_mouse_over(self, f: impl FnMut(MouseEvent) + 'static) -> Self where
    Self: Sized

fn on_mouse_over_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_mouse_out(&self, f: impl FnMut(MouseEvent) + 'static)

fn add_on_mouse_out_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
)

fn on_mouse_out(self, f: impl FnMut(MouseEvent) + 'static) -> Self where
    Self: Sized

fn on_mouse_out_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_mouse_up(&self, f: impl FnMut(MouseEvent) + 'static)

fn add_on_mouse_up_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
)

fn on_mouse_up(self, f: impl FnMut(MouseEvent) + 'static) -> Self where
    Self: Sized

fn on_mouse_up_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, MouseEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_key_down(&self, f: impl FnMut(KeyboardEvent) + 'static)

fn add_on_key_down_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, KeyboardEvent) + 'static
)

fn on_key_down(self, f: impl FnMut(KeyboardEvent) + 'static) -> Self where
    Self: Sized

fn on_key_down_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, KeyboardEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_key_up(&self, f: impl FnMut(KeyboardEvent) + 'static)

fn add_on_key_up_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, KeyboardEvent) + 'static
)

fn on_key_up(self, f: impl FnMut(KeyboardEvent) + 'static) -> Self where
    Self: Sized

fn on_key_up_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, KeyboardEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_change(&self, f: impl FnMut(Event) + 'static)

fn add_on_change_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, Event) + 'static
)

fn on_change(self, f: impl FnMut(Event) + 'static) -> Self where
    Self: Sized

fn on_change_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, Event) + 'static
) -> Self where
    Self: Sized

fn add_on_scroll(&self, f: impl FnMut(Event) + 'static)

fn add_on_scroll_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, Event) + 'static
)

fn on_scroll(self, f: impl FnMut(Event) + 'static) -> Self where
    Self: Sized

fn on_scroll_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, Event) + 'static
) -> Self where
    Self: Sized

fn add_on_blur(&self, f: impl FnMut(FocusEvent) + 'static)

fn add_on_blur_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, FocusEvent) + 'static
)

fn on_blur(self, f: impl FnMut(FocusEvent) + 'static) -> Self where
    Self: Sized

fn on_blur_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, FocusEvent) + 'static
) -> Self where
    Self: Sized

fn add_on_focus(&self, f: impl FnMut(FocusEvent) + 'static)

fn add_on_focus_mut<T: 'static>(
    &self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, FocusEvent) + 'static
)

fn on_focus(self, f: impl FnMut(FocusEvent) + 'static) -> Self where
    Self: Sized

fn on_focus_mut<T: 'static>(
    self,
    this: &Rc<MaybeUninit<RefCell<T>>>,
    f: impl FnMut(&mut T, FocusEvent) + 'static
) -> Self where
    Self: Sized

Loading content...

Implementations on Foreign Types

impl<T: EventTarget> EventTarget for Rc<RefCell<T>>[src]

Loading content...

Implementors

impl<T: AsRef<Element> + 'static> EventTarget for BasicElement<T>[src]

Loading content...