Trait guion::path::WidgetPath[][src]

pub trait WidgetPath<E>: Into<E::WidgetPath> + From<E::WidgetPath> + RefClonable + Clone + Sized + Debug + 'static where
    E: Env
{ fn attach_subpath(&mut self, sub: &Self);
fn strip_prefix(&self, prefix: &Self) -> Result<Self, ()>;
fn resolves_thru_child_id(
        child: E::WidgetID,
        sub_path: &Self
    ) -> Option<ResolvesThruResult<E>>;
fn resolves_thru_child_path(
        child_path: &Self,
        sub_path: &Self
    ) -> Option<ResolvesThruResult<E>>;
fn for_child_widget_id(&self, child: E::WidgetID) -> Self;
fn for_child_widget_path(&self, child_path: &Self) -> Self;
fn exact_eq(&self, o: &Self) -> bool;
fn dest_eq(&self, o: &Self) -> bool;
fn parent(&self) -> Option<Self>;
fn is_empty(&self) -> bool;
fn empty() -> Self; fn attached_subpath(self, sub: &Self) -> Self { ... }
fn _dest_widget(&self) -> Option<E::WidgetID> { ... }
fn with_env<F: Env<WidgetPath = E::WidgetPath>>(self) -> Self
    where
        E::WidgetPath: WidgetPath<F>
, { ... } }

A WidgetPath contains information to resolve to a specific Widget in a widget tree

Required methods

fn attach_subpath(&mut self, sub: &Self)[src]

fn strip_prefix(&self, prefix: &Self) -> Result<Self, ()>[src]

fn resolves_thru_child_id(
    child: E::WidgetID,
    sub_path: &Self
) -> Option<ResolvesThruResult<E>>
[src]

Does the sub path from the parent path resolve to or through the specific child widget of the parent widget?

parent_path: Absolute path of the current parent widget
child: Child widget of parent widget to which the sub path probably resolves to/through
sub_path: Relative sub path to which widget should be attempted to resolve

fn resolves_thru_child_path(
    child_path: &Self,
    sub_path: &Self
) -> Option<ResolvesThruResult<E>>
[src]

fn for_child_widget_id(&self, child: E::WidgetID) -> Self[src]

fn for_child_widget_path(&self, child_path: &Self) -> Self[src]

fn exact_eq(&self, o: &Self) -> bool[src]

👎 Deprecated

fn dest_eq(&self, o: &Self) -> bool[src]

If self and o would resolve to the same widget

fn parent(&self) -> Option<Self>[src]

The path which would resolve to the parent widget

Returns None only if the path is empty

fn is_empty(&self) -> bool[src]

If the path is empty e.g. doesn’t resolve further

fn empty() -> Self[src]

Loading content...

Provided methods

fn attached_subpath(self, sub: &Self) -> Self[src]

fn _dest_widget(&self) -> Option<E::WidgetID>[src]

Returns the targeted widget ID if available

NOTE this function is implemented optionally, so it may never return ID, even if possible

fn with_env<F: Env<WidgetPath = E::WidgetPath>>(self) -> Self where
    E::WidgetPath: WidgetPath<F>, 
[src]

Loading content...

Implementors

impl<E, S> WidgetPath<E> for SimplePath<E, S> where
    E: Env,
    S: SubPath<E> + From<E::WidgetID> + Into<E::WidgetID> + Debug + Send + Sync + 'static,
    Self: From<E::WidgetPath> + Into<E::WidgetPath>, 
[src]

Loading content...