pub struct FileDropManager {
pub hovered_file: Option<AzString>,
pub dropped_file: Option<AzString>,
}Expand description
Manager for cursor state and hovered file tracking
Fields§
§hovered_file: Option<AzString>File being hovered during drag-and-drop operation
dropped_file: Option<AzString>File that was dropped (cleared after one frame)
Implementations§
Source§impl FileDropManager
impl FileDropManager
Sourcepub fn set_hovered_file(&mut self, file: Option<AzString>)
pub fn set_hovered_file(&mut self, file: Option<AzString>)
Set the currently hovered file during drag operation
Sourcepub fn get_hovered_file(&self) -> Option<&AzString>
pub fn get_hovered_file(&self) -> Option<&AzString>
Get the currently hovered file
Sourcepub fn set_dropped_file(&mut self, file: Option<AzString>)
pub fn set_dropped_file(&mut self, file: Option<AzString>)
Set the dropped file (should be cleared after one frame)
Sourcepub fn take_dropped_file(&mut self) -> Option<AzString>
pub fn take_dropped_file(&mut self) -> Option<AzString>
Get and clear the dropped file (one-shot event)
Trait Implementations§
Source§impl Clone for FileDropManager
impl Clone for FileDropManager
Source§fn clone(&self) -> FileDropManager
fn clone(&self) -> FileDropManager
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 moreSource§impl Debug for FileDropManager
impl Debug for FileDropManager
Source§impl Default for FileDropManager
impl Default for FileDropManager
Source§impl PartialEq for FileDropManager
impl PartialEq for FileDropManager
impl StructuralPartialEq for FileDropManager
Auto Trait Implementations§
impl Freeze for FileDropManager
impl RefUnwindSafe for FileDropManager
impl Send for FileDropManager
impl Sync for FileDropManager
impl Unpin for FileDropManager
impl UnwindSafe for FileDropManager
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