pub struct InteractionPath { /* private fields */ }Expand description
Represents a WidgetPath annotated with each widget’s Interactivity.
Implementations§
Source§impl InteractionPath
impl InteractionPath
Sourcepub fn new<P: IntoIterator<Item = (WidgetId, Interactivity)>>(
window_id: WindowId,
path: P,
) -> InteractionPath
pub fn new<P: IntoIterator<Item = (WidgetId, Interactivity)>>( window_id: WindowId, path: P, ) -> InteractionPath
New custom path.
Sourcepub fn new_enabled(
window_id: WindowId,
path: Arc<Vec<WidgetId>>,
) -> InteractionPath
pub fn new_enabled( window_id: WindowId, path: Arc<Vec<WidgetId>>, ) -> InteractionPath
New custom path with all widgets enabled.
Sourcepub fn from_enabled(path: WidgetPath) -> InteractionPath
pub fn from_enabled(path: WidgetPath) -> InteractionPath
New interactivity path with all widgets enabled.
Sourcepub fn as_path(&self) -> &WidgetPath
pub fn as_path(&self) -> &WidgetPath
Dereferences to the path.
Sourcepub fn blocked_index(&self) -> Option<usize>
pub fn blocked_index(&self) -> Option<usize>
Index of first BLOCKED.
Sourcepub fn disabled_index(&self) -> Option<usize>
pub fn disabled_index(&self) -> Option<usize>
Index of first DISABLED.
Sourcepub fn interaction_path(
&self,
) -> impl DoubleEndedIterator<Item = Interactivity> + ExactSizeIterator
pub fn interaction_path( &self, ) -> impl DoubleEndedIterator<Item = Interactivity> + ExactSizeIterator
Interactivity for each widget, root first.
Sourcepub fn interactivity_of(&self, widget_id: WidgetId) -> Option<Interactivity>
pub fn interactivity_of(&self, widget_id: WidgetId) -> Option<Interactivity>
Gets the interactivity of widget_id, if its present on the path.
Sourcepub fn contains_enabled(&self, widget_id: WidgetId) -> bool
pub fn contains_enabled(&self, widget_id: WidgetId) -> bool
Gets if the widget_id is on the path and enabled.
Returns false if the widget_id is disabled or not in the path.
Sourcepub fn contains_vis_enabled(&self, widget_id: WidgetId) -> bool
pub fn contains_vis_enabled(&self, widget_id: WidgetId) -> bool
Gets if the widget_id is on the path and visually enabled.
Returns false if the widget_id is not visually enabled or not in the path.
Sourcepub fn contains_disabled(&self, widget_id: WidgetId) -> bool
pub fn contains_disabled(&self, widget_id: WidgetId) -> bool
Gets if the widget_id is on the path and disabled.
Returns false if the widget_id is enabled or not in the path.
Sourcepub fn contains_blocked(&self, widget_id: WidgetId) -> bool
pub fn contains_blocked(&self, widget_id: WidgetId) -> bool
Gets if the widget_id is on the path and blocked.
Returns false if the widget_id is not blocked or not in the path.
Sourcepub fn interactivity(&self) -> Interactivity
pub fn interactivity(&self) -> Interactivity
Interactivity of the widget.
Sourcepub fn zip(
&self,
) -> impl DoubleEndedIterator<Item = (WidgetId, Interactivity)> + ExactSizeIterator + '_
pub fn zip( &self, ) -> impl DoubleEndedIterator<Item = (WidgetId, Interactivity)> + ExactSizeIterator + '_
Zip widgets and interactivity.
Sourcepub fn unblocked(self) -> Option<InteractionPath>
pub fn unblocked(self) -> Option<InteractionPath>
Sourcepub fn enabled(self) -> Option<WidgetPath>
pub fn enabled(self) -> Option<WidgetPath>
Gets the ENABLED part of the path, or none if the widget is not enabled at the root.
Sourcepub fn ancestor_path(
&self,
ancestor_id: WidgetId,
) -> Option<Cow<'_, InteractionPath>>
pub fn ancestor_path( &self, ancestor_id: WidgetId, ) -> Option<Cow<'_, InteractionPath>>
Make a path to an ancestor id that is contained in the current path.
Get the inner most widget parent shared by both self and other with the same interactivity.
Sourcepub fn root_path(&self) -> Cow<'_, InteractionPath>
pub fn root_path(&self) -> Cow<'_, InteractionPath>
Gets a path to the root widget of this path.
Methods from Deref<Target = WidgetPath>§
Sourcepub fn widgets_path(&self) -> &[WidgetId]
pub fn widgets_path(&self) -> &[WidgetId]
Sourcepub fn ancestor_path(
&self,
ancestor_id: WidgetId,
) -> Option<Cow<'_, WidgetPath>>
pub fn ancestor_path( &self, ancestor_id: WidgetId, ) -> Option<Cow<'_, WidgetPath>>
Make a path to an ancestor id that is contained in the current path.
Get the inner most widget parent shared by both self and other.
Sourcepub fn root_path(&self) -> Cow<'_, WidgetPath>
pub fn root_path(&self) -> Cow<'_, WidgetPath>
Gets a path to the root widget of this path.
Trait Implementations§
Source§impl Clone for InteractionPath
impl Clone for InteractionPath
Source§fn clone(&self) -> InteractionPath
fn clone(&self) -> InteractionPath
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InteractionPath
impl Debug for InteractionPath
Source§impl Deref for InteractionPath
impl Deref for InteractionPath
Source§impl Display for InteractionPath
impl Display for InteractionPath
Source§impl From<InteractionPath> for WidgetPath
impl From<InteractionPath> for WidgetPath
Source§fn from(p: InteractionPath) -> Self
fn from(p: InteractionPath) -> Self
Source§impl PartialEq<InteractionPath> for WidgetPath
impl PartialEq<InteractionPath> for WidgetPath
Source§impl PartialEq<WidgetPath> for InteractionPath
impl PartialEq<WidgetPath> for InteractionPath
Source§impl PartialEq for InteractionPath
impl PartialEq for InteractionPath
Source§impl WidgetPathProvider for InteractionPath
impl WidgetPathProvider for InteractionPath
Source§fn widget_and_ancestors(&self) -> Self::WidgetIter<'_>
fn widget_and_ancestors(&self) -> Self::WidgetIter<'_>
impl Eq for InteractionPath
Auto Trait Implementations§
impl Freeze for InteractionPath
impl RefUnwindSafe for InteractionPath
impl Send for InteractionPath
impl Sync for InteractionPath
impl Unpin for InteractionPath
impl UnwindSafe for InteractionPath
Blanket Implementations§
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other if both are of the same type.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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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 more