cursive icon indicating copy to clipboard operation
cursive copied to clipboard

[FEATURE] Add support for mouse moved event

Open Peohta opened this issue 2 years ago • 2 comments

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).

Peohta avatar Jun 18 '22 05:06 Peohta

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.

gyscos avatar Jun 19 '22 19:06 gyscos

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.

sportzer avatar Jun 29 '22 02:06 sportzer