pub struct CallbacksOfHitTest {
pub nodes_with_callbacks: BTreeMap<DomId, Vec<CallbackToCall>>,
}Fields§
§nodes_with_callbacks: BTreeMap<DomId, Vec<CallbackToCall>>A BTreeMap where each item is already filtered by the proper hit-testing type, meaning in order to get the proper callbacks, you simply have to iterate through all node IDs
Implementations§
Source§impl CallbacksOfHitTest
impl CallbacksOfHitTest
Sourcepub fn new(
nodes_to_check: &NodesToCheck,
events: &Events,
layout_results: &[LayoutResult],
) -> Self
pub fn new( nodes_to_check: &NodesToCheck, events: &Events, layout_results: &[LayoutResult], ) -> Self
Determine which event / which callback(s) should be called and in which order
This function also updates / mutates the current window states focused_node
as well as the window_state.previous_state
Sourcepub fn call(
&mut self,
previous_window_state: &Option<FullWindowState>,
full_window_state: &FullWindowState,
raw_window_handle: &RawWindowHandle,
scroll_states: &BTreeMap<DomId, BTreeMap<NodeHierarchyItemId, ScrollPosition>>,
gl_context: &OptionGlContextPtr,
layout_results: &mut Vec<LayoutResult>,
modifiable_scroll_states: &mut ScrollStates,
image_cache: &mut ImageCache,
system_fonts: &mut FcFontCache,
system_callbacks: &ExternalSystemCallbacks,
renderer_resources: &RendererResources,
) -> CallCallbacksResult
pub fn call( &mut self, previous_window_state: &Option<FullWindowState>, full_window_state: &FullWindowState, raw_window_handle: &RawWindowHandle, scroll_states: &BTreeMap<DomId, BTreeMap<NodeHierarchyItemId, ScrollPosition>>, gl_context: &OptionGlContextPtr, layout_results: &mut Vec<LayoutResult>, modifiable_scroll_states: &mut ScrollStates, image_cache: &mut ImageCache, system_fonts: &mut FcFontCache, system_callbacks: &ExternalSystemCallbacks, renderer_resources: &RendererResources, ) -> CallCallbacksResult
The actual function that calls the callbacks in their proper hierarchy and order
Trait Implementations§
Source§impl Clone for CallbacksOfHitTest
impl Clone for CallbacksOfHitTest
Source§fn clone(&self) -> CallbacksOfHitTest
fn clone(&self) -> CallbacksOfHitTest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CallbacksOfHitTest
impl RefUnwindSafe for CallbacksOfHitTest
impl Send for CallbacksOfHitTest
impl Sync for CallbacksOfHitTest
impl Unpin for CallbacksOfHitTest
impl UnwindSafe for CallbacksOfHitTest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more