You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: masonry/src/event.rs
+21-13
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,6 @@ impl From<PointerButton> for PointerButtons {
181
181
// TODO - How can RenderRoot express "I started a drag-and-drop op"?
182
182
// TODO - Touchpad, Touch, AxisMotion
183
183
// TODO - How to handle CursorEntered?
184
-
// Note to self: Events like "pointerenter", "pointerleave" are handled differently at the Widget level. But that's weird because WidgetPod can distribute them. Need to think about this again.
185
184
#[derive(Debug,Clone)]
186
185
pubenumPointerEvent{
187
186
PointerDown(PointerButton,PointerState),
@@ -313,6 +312,7 @@ pub enum Update {
313
312
}
314
313
315
314
implPointerEvent{
315
+
/// Create a [`PointerEvent::PointerLeave`] event with dummy values.
316
316
pubfnnew_pointer_leave() -> Self{
317
317
// TODO - The fact we're creating so many dummy values might be
318
318
// a sign we should refactor that struct
@@ -328,6 +328,7 @@ impl PointerEvent {
328
328
PointerEvent::PointerLeave(pointer_state)
329
329
}
330
330
331
+
/// Returns the [`PointerState`] of the event.
331
332
pubfnpointer_state(&self) -> &PointerState{
332
333
matchself{
333
334
PointerEvent::PointerDown(_, state)
@@ -343,13 +344,17 @@ impl PointerEvent {
343
344
}
344
345
}
345
346
347
+
/// Returns the position of the pointer event, except for [`PointerEvent::PointerLeave`] and [`PointerEvent::HoverFileCancel`].
0 commit comments