cursive
cursive copied to clipboard
[FEATURE] Add support for mouse moved event
When writing editors with Cursive, it would be really desirable to have a mouse Moved
event to get the current mouse position. Currently it is only possible to get the mouse position when a button is pressed or scrolled, so there is no way to know which column/row the mouse is hovering at at any time. It would be really useful if, on backends that support it, cursive reported such event (on backends that do not support it, such event would never be reported).
Hi, and thanks for the report!
Initially I did not turn this on because it was really spamming events. I'll try again to see if the performance is acceptable, otherwise we'll need to think a bit how to improve that. But right now any event triggers new layout and drawing phases, so that may need to change.
I'd also like to have this feature. It seems like View::on_event
returning EventResult::Ignored
should imply that the view doesn't need to be redrawn but I guess that assumes the on_event
implementation is well behaved.