pub struct Interaction {
pub interact_radius: f32,
pub resize_grab_radius_side: f32,
pub resize_grab_radius_corner: f32,
pub show_tooltips_only_when_still: bool,
pub tooltip_delay: f32,
pub tooltip_grace_time: f32,
pub selectable_labels: bool,
pub multi_widget_text_select: bool,
}
Expand description
How and when interaction happens.
Fields§
§interact_radius: f32
How close a widget must be to the mouse to have a chance to register as a click or drag.
If this is larger than zero, it gets easier to hit widgets, which is important for e.g. touch screens.
resize_grab_radius_side: f32
Radius of the interactive area of the side of a window during drag-to-resize.
resize_grab_radius_corner: f32
Radius of the interactive area of the corner of a window during drag-to-resize.
show_tooltips_only_when_still: bool
If false
, tooltips will show up anytime you hover anything, even if mouse is still moving
tooltip_delay: f32
Delay in seconds before showing tooltips after the mouse stops moving
tooltip_grace_time: f32
If you have waited for a tooltip and then hover some other widget within
this many seconds, then show the new tooltip right away,
skipping Self::tooltip_delay
.
This lets the user quickly move over some dead space to hover the next thing.
selectable_labels: bool
Can you select the text on a crate::Label
by default?
multi_widget_text_select: bool
Can the user select text that span multiple labels?
The default is true
, but text selection can be slightly glitchy,
so you may want to disable it.
Implementations§
§impl Interaction
impl Interaction
Trait Implementations§
§impl Clone for Interaction
impl Clone for Interaction
§fn clone(&self) -> Interaction
fn clone(&self) -> Interaction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for Interaction
impl Debug for Interaction
§impl Default for Interaction
impl Default for Interaction
§fn default() -> Interaction
fn default() -> Interaction
§impl<'de> Deserialize<'de> for Interactionwhere
Interaction: Default,
impl<'de> Deserialize<'de> for Interactionwhere
Interaction: Default,
§fn deserialize<__D>(
__deserializer: __D
) -> Result<Interaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Interaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for Interaction
impl PartialEq for Interaction
§fn eq(&self, other: &Interaction) -> bool
fn eq(&self, other: &Interaction) -> bool
self
and other
values to be equal, and is used
by ==
.§impl Serialize for Interaction
impl Serialize for Interaction
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Interaction
Auto Trait Implementations§
impl Freeze for Interaction
impl RefUnwindSafe for Interaction
impl Send for Interaction
impl Sync for Interaction
impl Unpin for Interaction
impl UnwindSafe for Interaction
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
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> ⓘ
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request