wip new mouse region events
This commit is contained in:
parent
4b945f5694
commit
53add253b6
2 changed files with 30 additions and 0 deletions
|
@ -1022,6 +1022,19 @@ impl Pane {
|
|||
cx.dispatch_action(ActivateItem(ix));
|
||||
})
|
||||
.on_click(MouseButton::Middle, close_tab_callback)
|
||||
.on_drag(MouseButton::Left, |_, cx| {
|
||||
cx.global::<DragAndDrop>().dragging(some view handle)
|
||||
})
|
||||
.on_mouse_up_out(MouseButton::Left, |_, cx| {
|
||||
cx.global::<DragAndDrop>().stopped_dragging(some view handle)
|
||||
})
|
||||
.on_drag_over(MouseButton::Left, |started, _, cx| {
|
||||
if started {
|
||||
if let Some(tab) = cx.global::<DragAndDrop>().current_dragged::<Tab>() {
|
||||
cx.dispatch_action(ReceivingTab)
|
||||
}
|
||||
}
|
||||
})
|
||||
.boxed()
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue