pub trait Frontend: 'static + Clone + Debug + Send + Sync {
    type AnyTransmogrifier: AnyTransmogrifier<Self>;
    type Context;

Show 13 methods fn gooey(&self) -> &Gooey<Self>; fn theme(&self) -> SystemTheme; fn set_widget_has_messages(&self, widget: WidgetId); fn load_image(
        asset: &Image,
        completed: Callback<Image, ()>,
        error: Callback<String, ()>
    ); fn asset_configuration(&self) -> &Configuration; fn schedule_timer(
        callback: Callback<(), ()>,
        duration: Duration,
        repeating: bool
    ) -> Timer; fn window(&self) -> Option<&(dyn Window + 'static)>; fn open(&self, window: Box<dyn AnyWindowBuilder + 'static, Global>) -> bool; fn ui_state_for(&self, widget_id: &WidgetId) -> State { ... } fn asset_url(&self, asset: &Asset) -> Option<Url> { ... } fn exit_managed_code(&self) { ... } fn widget_initialized(&self, widget: &WidgetId, style: &Style) { ... } fn localize<'a>(
        key: &str,
        parameters: impl Into<Option<LocalizationParameters<'a>>>
    ) -> String { ... }
Expand description

A frontend is an implementation of widgets and layouts.

Required Associated Types

The generic-free type of the frontend-specific transmogrifier trait.

The context type provided to aide in transmogrifying.

Required Methods

Returns the underlying Gooey instance.

Returns the current system theme.

Notifies the frontend that a widget has messages. Frontends should ensure that process_widget_messages is called at some point after this method is called.

Loads an image asynchronously, executing completed when loaded.

Returns the asset configuration.

Schedules a timer that invokes callback after duration, and repeats if repeating is true.

Returns the window for this interface, if present.

Opens a window. Returns false if unable to open the window.

Provided Methods

Returns the State for the widget. Not all frontends track UI state, and this function is primarily used when building frontends.

Returns the full Url for the asset, if available.

Executed when Gooey exits a managed code block.

A widget is being initialized.

Localizes key with parameters.