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

pub trait WidgetPath<E>: Into<E::WidgetPath> + From<E::WidgetPath> + RefClonable + Clone + PartialEq<Self> + Sized + Send + Sync + 'static where
    E: Env
{ type SubPath: SubPath<E>; fn attach(&mut self, sub: Self::SubPath);
fn attach_subpath(&mut self, sub: &Self);
fn id(&self) -> E::WidgetID;
fn tip(&self) -> &Self::SubPath;
fn parent(&self) -> Option<Self>;
fn is_empty(&self) -> bool;
fn slice<T>(&self, range: T) -> Self
    where
        T: RangeBounds<usize>
;
fn index<T>(&self, i: T) -> &Self::SubPath
    where
        T: SliceIndex<[Self::SubPath], Output = Self::SubPath>
; fn attached(self, sub: Self::SubPath) -> Self { ... }
fn attached_subpath(self, sub: &Self) -> Self { ... }
fn eq_path<F: Env + 'static>(&self, o: &F::WidgetPath) -> bool
    where
        Self: 'static
, { ... }
fn child_paths_of_slice<'a>(
        &self,
        c: CtxRefR<'a, E>
    ) -> Result<Vec<E::WidgetPath>, ()> { ... }
fn render(&self, c: CtxRef<E>, r: &mut RenderLink<E>) -> Result<bool, ()> { ... }
fn event(
        &self,
        c: CtxRef<E>,
        e: (EEvent<E>, &Bounds, u64)
    ) -> Result<(), ()> { ... }
fn size(&self, c: CtxRef<E>) -> Result<ESize<E>, ()> { ... }
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

Associated Types

type SubPath: SubPath<E>

Loading content...

Required methods

fn attach(&mut self, sub: Self::SubPath)

fn attach_subpath(&mut self, sub: &Self)

fn id(&self) -> E::WidgetID

fn tip(&self) -> &Self::SubPath

fn parent(&self) -> Option<Self>

fn is_empty(&self) -> bool

fn slice<T>(&self, range: T) -> Self where
    T: RangeBounds<usize>, 

fn index<T>(&self, i: T) -> &Self::SubPath where
    T: SliceIndex<[Self::SubPath], Output = Self::SubPath>, 

Loading content...

Provided methods

fn attached(self, sub: Self::SubPath) -> Self

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

fn eq_path<F: Env + 'static>(&self, o: &F::WidgetPath) -> bool where
    Self: 'static, 

fn child_paths_of_slice<'a>(
    &self,
    c: CtxRefR<'a, E>
) -> Result<Vec<E::WidgetPath>, ()>

Deprecated

fn render(&self, c: CtxRef<E>, r: &mut RenderLink<E>) -> Result<bool, ()>

fn event(&self, c: CtxRef<E>, e: (EEvent<E>, &Bounds, u64)) -> Result<(), ()>

fn size(&self, c: CtxRef<E>) -> Result<ESize<E>, ()>

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

Loading content...

Implementors

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

type SubPath = S

Loading content...