Function freya::elements::events::onglobalmouseover
source · pub fn onglobalmouseover<'a>(
_cx: &'a ScopeState,
_f: impl FnMut(Event<MouseData>) + 'a
) -> Attribute<'a>
Expand description
The globalmouseover
event will fire when the user moves the mouse anywhere in the app.
Event Data: MouseData
Example:
fn app(cx: Scope) -> Element {
render!(
rect {
onglobalmouseover: |_| println!("Moving the mouse somewhere!")
}
rect {
width: "100",
height: "100",
background: "red",
onmousedown: |_| println!("Moving the mouse here!")
}
)
}