pub struct PointerOverPreProcessor { /* private fields */ }Expand description
Tracks which element the pointer is over for one input root, raising the pointer entered and exited events as it changes.
It observes the raw input of the input manager (subscribe it to
IInputManager::pre_process) and is
told by its host when the scene changed under a resting pointer.
Implementations§
Source§impl PointerOverPreProcessor
impl PointerOverPreProcessor
Sourcepub fn new(input_root: Rc<dyn IInputRoot>) -> Self
pub fn new(input_root: Rc<dyn IInputRoot>) -> Self
Creates the pre-processor for an input root.
Sourcepub fn last_position(&self) -> Option<PixelPoint>
pub fn last_position(&self) -> Option<PixelPoint>
The last known position of the pointer, in screen coordinates.
Sourcepub fn scene_invalidated(&self, dirty_rect: Rect)
pub fn scene_invalidated(&self, dirty_rect: Rect)
Called by the host when the part of the scene within dirty_rect
changed: re-evaluates which element a resting pointer is over.
Trait Implementations§
Source§impl IObserver<Rc<dyn IRawInputEventArgs>> for PointerOverPreProcessor
impl IObserver<Rc<dyn IRawInputEventArgs>> for PointerOverPreProcessor
Auto Trait Implementations§
impl !Freeze for PointerOverPreProcessor
impl !RefUnwindSafe for PointerOverPreProcessor
impl !Send for PointerOverPreProcessor
impl !Sync for PointerOverPreProcessor
impl !UnwindSafe for PointerOverPreProcessor
impl Unpin for PointerOverPreProcessor
impl UnsafeUnpin for PointerOverPreProcessor
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more