[][src]Struct guion::widget::link::Link

pub struct Link<'c, E> where
    E: Env
{ pub ctx: &'c mut E::Context, pub widget: Resolved<'c, E>, }

holds a immutable reference to the current widget and the widget tree, also a mutable reference to the context

Fields

ctx: &'c mut E::Contextwidget: Resolved<'c, E>

Methods

impl<'c, E> Link<'c, E> where
    E: Env
[src]

pub fn mutate(
    &mut self,
    f: fn(_: WidgetRefMut<E>, _: &mut E::Context, _: E::WidgetPath),
    invalidate: bool
)
[src]

enqueue mutable access to this widget

pub fn mutate_closure(
    &mut self,
    f: Box<dyn FnOnce(WidgetRefMut<E>, &mut E::Context, E::WidgetPath) + 'static>,
    invalidate: bool
)
[src]

enqueue mutable access to this widget

pub fn later(&mut self, f: fn(_: WidgetRef<E>, _: &mut E::Context))[src]

enqueue immutable access to this widget

pub fn later_closure(
    &mut self,
    f: Box<dyn FnOnce(WidgetRef<E>, &mut E::Context) + Sync>
)
[src]

enqueue immutable access to this widget

pub fn enqueue_invalidate(&mut self)[src]

pub fn enqueue_validate_render(&mut self)[src]

mark the current widget as validated this should and should only be called from widget's render fn

pub fn enqueue_validate_size(&mut self, s: ESize<E>)[src]

pub fn widget(&self) -> &dyn Widget<'c, E>[src]

pub fn id(&self) -> E::WidgetID[src]

pub fn path(&self) -> E::WidgetPath[src]

pub fn render(&mut self, r: &mut RenderLink<E>) -> bool[src]

pub fn event(&mut self, e: (EEvent<E>, &Bounds, u64))[src]

pub fn size(&mut self) -> ESize<E>[src]

pub fn _event_root(&mut self, e: (EEvent<E>, &Bounds, u64))[src]

pub fn _render(&mut self, r: &mut RenderLink<E>) -> bool[src]

bypasses Context and Handler(s)

pub fn _event(&mut self, e: (EEvent<E>, &Bounds, u64))[src]

bypasses Context and Handler(s)

pub fn _size(&mut self) -> ESize<E>[src]

bypasses Context and Handler(s)

pub fn trace_bounds(&mut self, root_bounds: &Bounds, force: bool) -> Bounds[src]

pub fn is_hovered(&self) -> bool where
    E::Context: AsHandlerStateful<E>, 
[src]

pub fn is_focused(&self) -> bool where
    E::Context: AsHandlerStateful<E>, 
[src]

pub fn child_paths(&self) -> Vec<E::WidgetPath>[src]

Deprecated

pub fn for_childs<'s>(&'s mut self, f: impl FnMut(Link<E>)) -> Result<(), ()> where
    'c: 's, 
[src]

pub fn child_sizes(&mut self) -> Result<Vec<ESize<E>>, ()>[src]

pub fn with_widget<'s>(
    &'s mut self,
    p: E::WidgetPath
) -> Result<Link<'s, E>, ()> where
    'c: 's, 
[src]

pub fn resolve_sub<'s>(
    &'s mut self,
    p: E::WidgetPath
) -> Result<Link<'s, E>, ()> where
    'c: 's, 
[src]

pub fn reference<'s>(&'s mut self) -> Link<'s, E> where
    'c: 's, 
[src]

pub fn parents(&'c self) -> Parents<'c, E>[src]

iterate from current up to the root element

pub fn with_ctx<F: Env<WidgetPath = E::WidgetPath, Storage = E::Storage>>(
    self,
    ctx: &'c mut F::Context
) -> Link<'c, F> where
    E::WidgetPath: WidgetPath<F, SubPath = EWPSub<E>>,
    EWPSub<E>: SubPath<F>,
    E::Storage: Widgets<F>, 
[src]

pub fn enqueue<I>(&mut self, i: I) where
    ECQueue<E>: Queue<I>, 
[src]

Trait Implementations

impl<'a, E> Deref for Link<'a, E> where
    E: Env
[src]

type Target = E::Context

The resulting type after dereferencing.

impl<'a, E> DerefMut for Link<'a, E> where
    E: Env
[src]

Auto Trait Implementations

impl<'c, E> !RefUnwindSafe for Link<'c, E>

impl<'c, E> !Send for Link<'c, E>

impl<'c, E> !Sync for Link<'c, E>

impl<'c, E> Unpin for Link<'c, E> where
    <E as Env>::WidgetPath: Unpin

impl<'c, E> !UnwindSafe for Link<'c, E>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.