pub struct WidgetContext<T: Widget> { /* private fields */ }
Implementations§
Source§impl<T: Widget> WidgetContext<T>
impl<T: Widget> WidgetContext<T>
pub fn graphics(&mut self) -> Graphics<'_>where
T: OnBridgeEvent<GraphicsAgent>,
Source§impl<T: Widget> WidgetContext<T>
impl<T: Widget> WidgetContext<T>
pub fn live<H>(&mut self) -> Live<'_, T>where
H: AgentHook<Agent = LiveAgent>,
T: OnWireEvent<H>,
Source§impl<T> WidgetContext<T>where
T: WiredWidget<SingleFlowMeta<T>>,
impl<T> WidgetContext<T>where
T: WiredWidget<SingleFlowMeta<T>>,
Source§impl<T> WidgetContext<T>where
T: WiredWidget<MultiFlowMeta<T>>,
impl<T> WidgetContext<T>where
T: WiredWidget<MultiFlowMeta<T>>,
pub fn rewire_many(&mut self, paths: &HashSet<Path>)
Source§impl<T: Widget> WidgetContext<T>
impl<T: Widget> WidgetContext<T>
Sourcepub fn schedule(&mut self, ms: u64, msg: T::Event)
pub fn schedule(&mut self, ms: u64, msg: T::Event)
Schedule a timeout.
Note: It’s impossible to move to a separate module,
because it requires a link to a Component
.
pub fn is_scheduled(&self) -> bool
pub fn unschedule(&mut self)
Source§impl<T: Widget> WidgetContext<T>
impl<T: Widget> WidgetContext<T>
pub fn properties(&self) -> &T::Properties
pub fn meta(&self) -> &T::Meta
pub fn meta_mut(&mut self) -> &mut T::Meta
pub fn redraw(&mut self)
pub fn is_rendered(&self) -> bool
pub fn callback<F, IN>(&self, f: F) -> Callback<IN>
pub fn event<IN>(&self, msg: impl Into<T::Event>) -> Callback<IN>
pub fn notification<IN>(&self) -> Callback<IN>where
T: NotificationHandler<IN>,
IN: 'static,
Auto Trait Implementations§
impl<T> Freeze for WidgetContext<T>
impl<T> !RefUnwindSafe for WidgetContext<T>
impl<T> !Send for WidgetContext<T>
impl<T> !Sync for WidgetContext<T>
impl<T> Unpin for WidgetContext<T>
impl<T> !UnwindSafe for WidgetContext<T>
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreSource§impl<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
impl<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
Source§fn into_opt_prop_value(self) -> Option<V>
fn into_opt_prop_value(self) -> Option<V>
Convert
self
to an optional value of a Properties
struct.Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.