pub struct EyedropperState { /* private fields */ }Expand description
What an Eyedropper and an EyedropperArea share, and how a color reaches them: from
the area, or from whoever knows the color under the pointer through pick.
Nothing here can read the screen, so the color always comes from the caller.
Implementations§
Source§impl EyedropperState
impl EyedropperState
Sourcepub fn new() -> EyedropperState
pub fn new() -> EyedropperState
Not armed, with no color yet.
Sourcepub fn on_pick(self, handler: impl Fn(Color) + 'static) -> EyedropperState
pub fn on_pick(self, handler: impl Fn(Color) + 'static) -> EyedropperState
Runs handler with each color picked.
Sourcepub fn stay_armed(self, stay: bool) -> EyedropperState
pub fn stay_armed(self, stay: bool) -> EyedropperState
Stays armed after a pick, to take several in a row (by default it disarms).
Trait Implementations§
Source§impl Clone for EyedropperState
impl Clone for EyedropperState
Source§fn clone(&self) -> EyedropperState
fn clone(&self) -> EyedropperState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EyedropperState
impl Debug for EyedropperState
Source§impl Default for EyedropperState
impl Default for EyedropperState
Source§fn default() -> EyedropperState
fn default() -> EyedropperState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for EyedropperState
impl !Send for EyedropperState
impl !Sync for EyedropperState
impl !UnwindSafe for EyedropperState
impl Freeze for EyedropperState
impl Unpin for EyedropperState
impl UnsafeUnpin for EyedropperState
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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