Start work on dragging entries in the project panel

This commit is contained in:
Max Brunsfeld 2023-12-11 15:52:58 -08:00
parent a208229a2c
commit cbce49ff68
3 changed files with 137 additions and 80 deletions

View file

@ -54,6 +54,14 @@ impl ListItem {
self
}
pub fn on_drag(
mut self,
handler: impl Fn(&MouseDownEvent, &mut WindowContext) + 'static,
) -> Self {
self.on_secondary_mouse_down = Some(Box::new(handler));
self
}
pub fn tooltip(mut self, tooltip: impl Fn(&mut WindowContext) -> AnyView + 'static) -> Self {
self.tooltip = Some(Box::new(tooltip));
self