Skip to content

Instantly share code, notes, and snippets.

@Kielan
Last active January 17, 2025 15:04
Show Gist options
  • Save Kielan/7e87d7ef8c2dec2f8e1eaa61e39099de to your computer and use it in GitHub Desktop.
Save Kielan/7e87d7ef8c2dec2f8e1eaa61e39099de to your computer and use it in GitHub Desktop.
Where the Click Capturing Interaces with Codebase File List
https://github.com/lapce/floem/blob/3e25a60645cab6f0f837fdba488782d5d0a5ea7d/src/event.rs
https://github.com/lapce/floem/blob/3e25a60645cab6f0f837fdba488782d5d0a5ea7d/src/app_handle.rs
https://github.com/lapce/floem/blob/3e25a60645cab6f0f837fdba488782d5d0a5ea7d/src/pointer.rs
https://github.com/lapce/floem/blob/3e25a60645cab6f0f837fdba488782d5d0a5ea7d/src/app_delegate.rs
https://github.com/lapce/floem/blob/3e25a60645cab6f0f837fdba488782d5d0a5ea7d/examples/layout/src/right_sidebar.rs
https://github.com/lapce/floem/blob/3e25a60645cab6f0f837fdba488782d5d0a5ea7d/src/views/virtual_list.rs
https://github.com/lapce/floem/blob/3e25a60645cab6f0f837fdba488782d5d0a5ea7d/examples/widget-gallery/src/draggable.rs
https://github.com/lapce/floem/blob/3e25a60645cab6f0f837fdba488782d5d0a5ea7d/src/app_state.rs
- pub(crate) clicking: HashSet<ViewId>,
https://github.com/lapce/floem/blob/3e25a60645cab6f0f837fdba488782d5d0a5ea7d/src/views/editor/view.rs
https://github.com/lapce/floem/blob/main/src/context.rs
- 97 /// Internal method used by Floem. This can be called from parent `View`s to propagate an event to the child `View`.
pub(crate) fn unconditional_view_event(
- 136 if !disable_default
&& !is_pointer_none
&& view
.borrow_mut()
.event_before_children(self, &event)
.is_processed()
{
if let Event::PointerDown(event) = &event {
if self.app_state.keyboard_navigable.contains(&view_id) {
let rect = view_id.get_size().unwrap_or_default().to_rect();
let now_focused = rect.contains(event.pos);
if now_focused {
self.app_state.update_focus(view_id, false);
}
}
}
return (EventPropagation::Stop, PointerEventConsumed::Yes);
}
https://github.com/lapce/floem/blob/3e25a60645cab6f0f837fdba488782d5d0a5ea7d/src/views/editor/visual_line.rs#L309
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment