pub struct CallbacksOfHitTest {
pub nodes_with_callbacks: BTreeMap<NodeId, DetermineCallbackResult>,
pub needs_relayout_anyways: bool,
pub needs_redraw_anyways: bool,
}
Fields§
§nodes_with_callbacks: BTreeMap<NodeId, DetermineCallbackResult>
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
needs_relayout_anyways: bool
Same as needs_redraw_anyways
, but for reusing the layout from the previous frame.
Each :hover
and :active
group stores whether it modifies the layout, as
a performance optimization.
needs_redraw_anyways: bool
Whether the screen should be redrawn even if no Callback returns an UpdateScreen::Redraw
.
This is necessary for :hover
and :active
mouseovers - otherwise the screen would
only update on the next resize.
Implementations§
Source§impl CallbacksOfHitTest
impl CallbacksOfHitTest
Sourcepub fn should_call_callbacks(&self) -> bool
pub fn should_call_callbacks(&self) -> bool
Returns whether there is any
Trait Implementations§
Source§impl Debug for CallbacksOfHitTest
impl Debug for CallbacksOfHitTest
Auto 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