Rework presenter dispatch_event to allow isolated propogation of individual MouseRegionEvent types Co-Authored-By: mikayla@zed.dev
This commit is contained in:
@@ -6,9 +6,8 @@ use crate::{
|
||||
},
|
||||
platform::CursorStyle,
|
||||
scene::{
|
||||
ClickRegionEvent, CursorRegion, DownOutRegionEvent, DownRegionEvent, DragOverRegionEvent,
|
||||
DragRegionEvent, HandlerSet, HoverRegionEvent, MoveRegionEvent, UpOutRegionEvent,
|
||||
UpRegionEvent,
|
||||
ClickRegionEvent, CursorRegion, DownOutRegionEvent, DownRegionEvent, DragRegionEvent,
|
||||
HandlerSet, HoverRegionEvent, MoveRegionEvent, UpOutRegionEvent, UpRegionEvent,
|
||||
},
|
||||
DebugContext, Element, ElementBox, Event, EventContext, LayoutContext, MeasurementContext,
|
||||
MouseButton, MouseRegion, MouseState, PaintContext, RenderContext, SizeConstraint, View,
|
||||
@@ -107,15 +106,6 @@ impl MouseEventHandler {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn on_drag_over(
|
||||
mut self,
|
||||
button: MouseButton,
|
||||
handler: impl Fn(DragOverRegionEvent, &mut EventContext) + 'static,
|
||||
) -> Self {
|
||||
self.handlers = self.handlers.on_drag_over(button, handler);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn on_hover(
|
||||
mut self,
|
||||
handler: impl Fn(HoverRegionEvent, &mut EventContext) + 'static,
|
||||
|
||||
Reference in New Issue
Block a user