Struct gooey::core::Gooey [−][src]
pub struct Gooey<F> where
F: Frontend, { /* fields omitted */ }
Expand description
A graphical user interface.
Implementations
pub fn new(
transmogrifiers: Arc<Transmogrifiers<F>>,
root: WidgetRegistration,
storage: WidgetStorage
) -> Gooey<F>
pub fn new(
transmogrifiers: Arc<Transmogrifiers<F>>,
root: WidgetRegistration,
storage: WidgetStorage
) -> Gooey<F>
Creates a new instance
Returns the root widget.
pub fn transmogrifier_for_type_id(
&self,
widget_type_id: TypeId
) -> Option<&<F as Frontend>::AnyTransmogrifier>
pub fn transmogrifier_for_type_id(
&self,
widget_type_id: TypeId
) -> Option<&<F as Frontend>::AnyTransmogrifier>
Returns the transmogrifier fo the type id
pub fn with_transmogrifier<R, C>(
&self,
widget_id: &WidgetId,
frontend: &F,
callback: C
) -> Option<R> where
C: FnOnce(&<F as Frontend>::AnyTransmogrifier, AnyTransmogrifierContext<'_, F>) -> R,
pub fn with_transmogrifier<R, C>(
&self,
widget_id: &WidgetId,
frontend: &F,
callback: C
) -> Option<R> where
C: FnOnce(&<F as Frontend>::AnyTransmogrifier, AnyTransmogrifierContext<'_, F>) -> R,
Executes callback
with the transmogrifier and transmogrifier state as
parameters.
pub fn for_each_widget<C>(&self, frontend: &F, callback: C) where
C: FnMut(&<F as Frontend>::AnyTransmogrifier, &mut (dyn AnySendSync + 'static), &(dyn AnyWidget + 'static)),
pub fn for_each_widget<C>(&self, frontend: &F, callback: C) where
C: FnMut(&<F as Frontend>::AnyTransmogrifier, &mut (dyn AnySendSync + 'static), &(dyn AnyWidget + 'static)),
Executes callback
with the transmogrifier and transmogrifier state as
parameters.
Loops over each widget processing its events first, then its commands.
Panics
Panics upon internal locking errors.
Returns the root widget.
Enters a region of managed code. Automatically exits the region when the returned guard is dropped.
When the last managed code region is exited, widget messages are processed before returning.
Returns whether Gooey
managed code is currently executing.
Methods from Deref<Target = WidgetStorage>
Returns the application.
pub fn register<W>(&self, styled_widget: StyledWidget<W>) -> WidgetRegistration where
W: Widget + AnyWidget,
pub fn register<W>(&self, styled_widget: StyledWidget<W>) -> WidgetRegistration where
W: Widget + AnyWidget,
Register a widget with storage.
Allocates a widget registration. This allows obtaining a registration
before the widget has been created, allowing for a parent widget to pass
its id to its children during widget construction. Attempting to
interact with this widget before calling register
with the created
widget will panic.
Panics
Panics on internal locking failures.
Returns the state of the widget with id widget_id
.
Panics
Panics if internal lock handling results in an error.
Executes callback
with the widget state parameters.
Panics
Panics if internal lock handling results in an error.
Marks a widget as having messages. If this isn’t set, pending messages will not be received.
Panics
Panics if internal lock handling results in an error.
Trait Implementations
Auto Trait Implementations
impl<F> !RefUnwindSafe for Gooey<F>
impl<F> !UnwindSafe for Gooey<F>
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined
range, otherwise an OutOfBounds
error is returned which contains
the unclamped color. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more