[−][src]Struct guion::widget::link::Link
holds a immutable reference to the current widget and the widget tree, also a mutable reference to the context
Fields
ctx: &'c mut E::Context
widget: Resolved<'c, E>
Methods
impl<'c, E> Link<'c, E> where
E: Env,
[src]
E: Env,
pub fn mutate(
&mut self,
f: fn(_: WidgetRefMut<E>, _: &mut E::Context, _: E::WidgetPath),
invalidate: bool
)
[src]
&mut self,
f: fn(_: WidgetRefMut<E>, _: &mut E::Context, _: E::WidgetPath),
invalidate: bool
)
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]
&mut self,
f: Box<dyn FnOnce(WidgetRefMut<E>, &mut E::Context, E::WidgetPath) + 'static>,
invalidate: bool
)
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]
&mut self,
f: Box<dyn FnOnce(WidgetRef<E>, &mut E::Context) + Sync>
)
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]
E::Context: AsHandlerStateful<E>,
pub fn is_focused(&self) -> bool where
E::Context: AsHandlerStateful<E>,
[src]
E::Context: AsHandlerStateful<E>,
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]
'c: 's,
pub fn _with_link<'s>(
ctx: &mut E::Context,
w: Resolved<'s, E>,
f: impl FnOnce(Link<E>)
) where
'c: 's,
[src]
ctx: &mut E::Context,
w: Resolved<'s, E>,
f: impl FnOnce(Link<E>)
) where
'c: 's,
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]
&'s mut self,
p: E::WidgetPath
) -> Result<Link<'s, E>, ()> where
'c: 's,
pub fn resolve_sub<'s>(
&'s mut self,
p: E::WidgetPath
) -> Result<Link<'s, E>, ()> where
'c: 's,
[src]
&'s mut self,
p: E::WidgetPath
) -> Result<Link<'s, E>, ()> where
'c: 's,
pub fn reference<'s>(&'s mut self) -> Link<'s, E> where
'c: 's,
[src]
'c: 's,
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]
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>,
pub fn enqueue<I>(&mut self, i: I) where
ECQueue<E>: Queue<I>,
[src]
ECQueue<E>: Queue<I>,
Trait Implementations
impl<'a, E> Deref for Link<'a, E> where
E: Env,
[src]
E: Env,
type Target = E::Context
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'a, E> DerefMut for Link<'a, E> where
E: Env,
[src]
E: Env,
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,
<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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,