Struct gooey::frontends::rasterizer::Rasterizer
source · [−]pub struct Rasterizer<R> where
R: Renderer, {
pub ui: Arc<Gooey<Rasterizer<R>>>,
/* private fields */
}
Fields
ui: Arc<Gooey<Rasterizer<R>>>
Implementations
sourceimpl<R> Rasterizer<R> where
R: Renderer,
impl<R> Rasterizer<R> where
R: Renderer,
pub fn new(
ui: Gooey<Rasterizer<R>>,
configuration: Configuration
) -> Rasterizer<R>
pub fn render(&self, renderer: R)
pub fn clipped_to(&self, clip: Rect<f32, Scaled>) -> Option<Rasterizer<R>>
pub fn handle_event(&self, event: WindowEvent, renderer: R) -> EventResult
pub fn set_window_creator<F>(&mut self, window_creator: F) where
F: 'static + Fn(AppContext, &mut (dyn AnyWindowBuilder + 'static)) + Send + Sync,
pub fn set_window<W>(&mut self, window: W) where
W: Window,
pub fn set_refresh_callback<F>(&mut self, callback: F) where
F: RefreshCallback,
pub fn set_system_theme(&self, theme: SystemTheme)
pub fn keyboard_modifiers(&self) -> ModifiersState
pub fn renderer(&self) -> Option<&R>
pub fn rasterized_widget(
&self,
widget: WidgetId,
area: ContentArea,
should_accept_focus: bool,
parent_id: Option<&WidgetId>,
tab_order: Option<TabIndex>,
intent: Option<Intent>
)
sourcepub fn with_transmogrifier<TResult, C>(
&self,
widget_id: &WidgetId,
callback: C
) -> Option<TResult> where
C: FnOnce(&dyn AnyWidgetRasterizer<R>, AnyTransmogrifierContext<'_, Rasterizer<R>>) -> TResult,
pub fn with_transmogrifier<TResult, C>(
&self,
widget_id: &WidgetId,
callback: C
) -> Option<TResult> where
C: FnOnce(&dyn AnyWidgetRasterizer<R>, AnyTransmogrifierContext<'_, Rasterizer<R>>) -> TResult,
Executes callback
with the transmogrifier and transmogrifier state as
parameters.
pub fn set_needs_redraw(&self)
pub fn needs_redraw(&self) -> bool
pub fn duration_until_next_redraw(&self) -> Option<Duration>
pub fn schedule_redraw_in(&self, duration: Duration)
pub fn schedule_redraw_at(&self, at: Instant)
pub fn activate(&self, widget: &WidgetId)
pub fn deactivate(&self)
pub fn active_widget(&self) -> Option<WidgetId>
pub fn focused_widget(&self) -> Option<WidgetId>
pub fn focus_on(&self, widget: &WidgetId)
pub fn blur(&self)
pub fn blur_and_deactivate(&self)
Trait Implementations
sourceimpl<R> AnyTransmogrifier<Rasterizer<R>> for RegisteredTransmogrifier<R> where
R: Renderer,
impl<R> AnyTransmogrifier<Rasterizer<R>> for RegisteredTransmogrifier<R> where
R: Renderer,
sourcefn process_messages(&self, context: AnyTransmogrifierContext<'_, Rasterizer<R>>)
fn process_messages(&self, context: AnyTransmogrifierContext<'_, Rasterizer<R>>)
Processes commands and events for this widget and transmogrifier.
sourcefn widget_type_id(&self) -> TypeId
fn widget_type_id(&self) -> TypeId
sourcefn default_state_for(
&self,
widget: &mut (dyn AnyWidget + 'static),
registration: &WidgetRegistration,
frontend: &Rasterizer<R>
) -> TransmogrifierState
fn default_state_for(
&self,
widget: &mut (dyn AnyWidget + 'static),
registration: &WidgetRegistration,
frontend: &Rasterizer<R>
) -> TransmogrifierState
Initializes default state for a newly created widget.
sourceimpl<R> Clone for Rasterizer<R> where
R: Renderer,
impl<R> Clone for Rasterizer<R> where
R: Renderer,
sourcefn clone(&self) -> Rasterizer<R>
fn clone(&self) -> Rasterizer<R>
This implementation ignores the renderer
field, as it’s temporary
state only used during the render method. It shouldn’t ever be accessed
outside of that context.
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<R> Debug for Rasterizer<R> where
R: Renderer,
impl<R> Debug for Rasterizer<R> where
R: Renderer,
sourceimpl<R> Frontend for Rasterizer<R> where
R: Renderer,
impl<R> Frontend for Rasterizer<R> where
R: Renderer,
type AnyTransmogrifier = RegisteredTransmogrifier<R>
type AnyTransmogrifier = RegisteredTransmogrifier<R>
The generic-free type of the frontend-specific transmogrifier trait.
type Context = Rasterizer<R>
type Context = Rasterizer<R>
The context type provided to aide in transmogrifying.
sourcefn gooey(&self) -> &Gooey<Rasterizer<R>>
fn gooey(&self) -> &Gooey<Rasterizer<R>>
Returns the underlying Gooey
instance.
sourcefn ui_state_for(&self, widget_id: &WidgetId) -> State
fn ui_state_for(&self, widget_id: &WidgetId) -> State
sourcefn set_widget_has_messages(&self, widget: WidgetId)
fn set_widget_has_messages(&self, widget: WidgetId)
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. Read more
sourcefn exit_managed_code(&self)
fn exit_managed_code(&self)
Executed when Gooey
exits a managed code block.
sourcefn theme(&self) -> SystemTheme
fn theme(&self) -> SystemTheme
Returns the current system theme.
sourcefn load_image(
&self,
image: &Image,
completed: Callback<Image, ()>,
error: Callback<String, ()>
)
fn load_image(
&self,
image: &Image,
completed: Callback<Image, ()>,
error: Callback<String, ()>
)
Loads an image asynchronously, executing completed
when loaded.
sourcefn asset_configuration(&self) -> &Configuration
fn asset_configuration(&self) -> &Configuration
Returns the asset configuration.
sourcefn widget_initialized(&self, widget: &WidgetId, style: &Style)
fn widget_initialized(&self, widget: &WidgetId, style: &Style)
A widget is being initialized.
sourcefn schedule_timer(
&self,
callback: Callback<(), ()>,
duration: Duration,
repeating: bool
) -> Timer
fn schedule_timer(
&self,
callback: Callback<(), ()>,
duration: Duration,
repeating: bool
) -> Timer
Schedules a timer that invokes callback
after duration
, and repeats if repeating
is true.
sourcefn window(&self) -> Option<&(dyn Window + 'static)>
fn window(&self) -> Option<&(dyn Window + 'static)>
Returns the window for this interface, if present.
sourcefn open(&self, window: Box<dyn AnyWindowBuilder + 'static, Global>) -> bool
fn open(&self, window: Box<dyn AnyWindowBuilder + 'static, Global>) -> bool
Opens a window. Returns false if unable to open the window.
sourceimpl<R> Transmogrifier<Rasterizer<R>> for ContainerTransmogrifier where
R: Renderer,
impl<R> Transmogrifier<Rasterizer<R>> for ContainerTransmogrifier where
R: Renderer,
sourcefn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
fn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
Called after a transmogrifier is initialized.
sourcefn receive_command(
&self,
command: <Self::Widget as Widget>::Command,
context: &mut TransmogrifierContext<'_, Self, F>
)
fn receive_command(
&self,
command: <Self::Widget as Widget>::Command,
context: &mut TransmogrifierContext<'_, Self, F>
)
Called when a command is received from the widget.
sourcefn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
fn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
Processes commands and events for this widget and transmogrifier.
sourcefn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
fn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
Returns an initialized state using Self::State::default()
.
sourcefn widget_type_id(&self) -> TypeId
fn widget_type_id(&self) -> TypeId
Returns the TypeId
of Self::Widget
.
sourceimpl<R> Transmogrifier<Rasterizer<R>> for LabelTransmogrifier where
R: Renderer,
impl<R> Transmogrifier<Rasterizer<R>> for LabelTransmogrifier where
R: Renderer,
sourcefn receive_command(
&self,
_command: Command,
context: &mut TransmogrifierContext<'_, LabelTransmogrifier, Rasterizer<R>>
)
fn receive_command(
&self,
_command: Command,
context: &mut TransmogrifierContext<'_, LabelTransmogrifier, Rasterizer<R>>
)
Called when a command is received from the widget.
sourcefn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
fn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
Called after a transmogrifier is initialized.
sourcefn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
fn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
Processes commands and events for this widget and transmogrifier.
sourcefn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
fn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
Returns an initialized state using Self::State::default()
.
sourcefn widget_type_id(&self) -> TypeId
fn widget_type_id(&self) -> TypeId
Returns the TypeId
of Self::Widget
.
sourceimpl<B, R> Transmogrifier<Rasterizer<R>> for ComponentTransmogrifier<B> where
B: Behavior,
R: Renderer,
impl<B, R> Transmogrifier<Rasterizer<R>> for ComponentTransmogrifier<B> where
B: Behavior,
R: Renderer,
sourcefn initialize(
&self,
component: &mut <ComponentTransmogrifier<B> as Transmogrifier<Rasterizer<R>>>::Widget,
widget: &WidgetRef<<ComponentTransmogrifier<B> as Transmogrifier<Rasterizer<R>>>::Widget>,
frontend: &Rasterizer<R>
) -> <ComponentTransmogrifier<B> as Transmogrifier<Rasterizer<R>>>::State
fn initialize(
&self,
component: &mut <ComponentTransmogrifier<B> as Transmogrifier<Rasterizer<R>>>::Widget,
widget: &WidgetRef<<ComponentTransmogrifier<B> as Transmogrifier<Rasterizer<R>>>::Widget>,
frontend: &Rasterizer<R>
) -> <ComponentTransmogrifier<B> as Transmogrifier<Rasterizer<R>>>::State
Called after a transmogrifier is initialized.
sourcefn receive_command(
&self,
command: <<ComponentTransmogrifier<B> as Transmogrifier<Rasterizer<R>>>::Widget as Widget>::Command,
context: &mut TransmogrifierContext<'_, ComponentTransmogrifier<B>, Rasterizer<R>>
)
fn receive_command(
&self,
command: <<ComponentTransmogrifier<B> as Transmogrifier<Rasterizer<R>>>::Widget as Widget>::Command,
context: &mut TransmogrifierContext<'_, ComponentTransmogrifier<B>, Rasterizer<R>>
)
Called when a command is received from the widget.
sourcefn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
fn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
Processes commands and events for this widget and transmogrifier.
sourcefn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
fn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
Returns an initialized state using Self::State::default()
.
sourcefn widget_type_id(&self) -> TypeId
fn widget_type_id(&self) -> TypeId
Returns the TypeId
of Self::Widget
.
sourceimpl<R> Transmogrifier<Rasterizer<R>> for InputTransmogrifier where
R: Renderer,
impl<R> Transmogrifier<Rasterizer<R>> for InputTransmogrifier where
R: Renderer,
type State = InputState<R>
type State = InputState<R>
The type the storage this transmogrifier uses for state.
sourcefn initialize(
&self,
widget: &mut <InputTransmogrifier as Transmogrifier<Rasterizer<R>>>::Widget,
_reference: &WidgetRef<<InputTransmogrifier as Transmogrifier<Rasterizer<R>>>::Widget>,
_frontend: &Rasterizer<R>
) -> <InputTransmogrifier as Transmogrifier<Rasterizer<R>>>::State
fn initialize(
&self,
widget: &mut <InputTransmogrifier as Transmogrifier<Rasterizer<R>>>::Widget,
_reference: &WidgetRef<<InputTransmogrifier as Transmogrifier<Rasterizer<R>>>::Widget>,
_frontend: &Rasterizer<R>
) -> <InputTransmogrifier as Transmogrifier<Rasterizer<R>>>::State
Called after a transmogrifier is initialized.
sourcefn receive_command(
&self,
command: Command,
context: &mut TransmogrifierContext<'_, InputTransmogrifier, Rasterizer<R>>
)
fn receive_command(
&self,
command: Command,
context: &mut TransmogrifierContext<'_, InputTransmogrifier, Rasterizer<R>>
)
Called when a command is received from the widget.
sourcefn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
fn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
Processes commands and events for this widget and transmogrifier.
sourcefn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
fn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
Returns an initialized state using Self::State::default()
.
sourcefn widget_type_id(&self) -> TypeId
fn widget_type_id(&self) -> TypeId
Returns the TypeId
of Self::Widget
.
sourceimpl<R> Transmogrifier<Rasterizer<R>> for LayoutTransmogrifier where
R: Renderer,
impl<R> Transmogrifier<Rasterizer<R>> for LayoutTransmogrifier where
R: Renderer,
sourcefn receive_command(
&self,
_command: <<LayoutTransmogrifier as Transmogrifier<Rasterizer<R>>>::Widget as Widget>::Command,
context: &mut TransmogrifierContext<'_, LayoutTransmogrifier, Rasterizer<R>>
)
fn receive_command(
&self,
_command: <<LayoutTransmogrifier as Transmogrifier<Rasterizer<R>>>::Widget as Widget>::Command,
context: &mut TransmogrifierContext<'_, LayoutTransmogrifier, Rasterizer<R>>
)
Called when a command is received from the widget.
sourcefn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
fn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
Called after a transmogrifier is initialized.
sourcefn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
fn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
Processes commands and events for this widget and transmogrifier.
sourcefn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
fn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
Returns an initialized state using Self::State::default()
.
sourcefn widget_type_id(&self) -> TypeId
fn widget_type_id(&self) -> TypeId
Returns the TypeId
of Self::Widget
.
sourceimpl<R> Transmogrifier<Rasterizer<R>> for ListTransmogrifier where
R: Renderer,
impl<R> Transmogrifier<Rasterizer<R>> for ListTransmogrifier where
R: Renderer,
type State = State
type State = State
The type the storage this transmogrifier uses for state.
sourcefn receive_command(
&self,
_command: <<ListTransmogrifier as Transmogrifier<Rasterizer<R>>>::Widget as Widget>::Command,
context: &mut TransmogrifierContext<'_, ListTransmogrifier, Rasterizer<R>>
)
fn receive_command(
&self,
_command: <<ListTransmogrifier as Transmogrifier<Rasterizer<R>>>::Widget as Widget>::Command,
context: &mut TransmogrifierContext<'_, ListTransmogrifier, Rasterizer<R>>
)
Called when a command is received from the widget.
sourcefn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
fn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
Called after a transmogrifier is initialized.
sourcefn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
fn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
Processes commands and events for this widget and transmogrifier.
sourcefn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
fn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
Returns an initialized state using Self::State::default()
.
sourcefn widget_type_id(&self) -> TypeId
fn widget_type_id(&self) -> TypeId
Returns the TypeId
of Self::Widget
.
sourceimpl<R> Transmogrifier<Rasterizer<R>> for CheckboxTransmogrifier where
R: Renderer,
impl<R> Transmogrifier<Rasterizer<R>> for CheckboxTransmogrifier where
R: Renderer,
sourcefn receive_command(
&self,
_command: CheckboxCommand,
context: &mut TransmogrifierContext<'_, CheckboxTransmogrifier, Rasterizer<R>>
)
fn receive_command(
&self,
_command: CheckboxCommand,
context: &mut TransmogrifierContext<'_, CheckboxTransmogrifier, Rasterizer<R>>
)
Called when a command is received from the widget.
sourcefn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
fn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
Called after a transmogrifier is initialized.
sourcefn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
fn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
Processes commands and events for this widget and transmogrifier.
sourcefn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
fn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
Returns an initialized state using Self::State::default()
.
sourcefn widget_type_id(&self) -> TypeId
fn widget_type_id(&self) -> TypeId
Returns the TypeId
of Self::Widget
.
sourceimpl<R> Transmogrifier<Rasterizer<R>> for ButtonTransmogrifier where
R: Renderer,
impl<R> Transmogrifier<Rasterizer<R>> for ButtonTransmogrifier where
R: Renderer,
sourcefn receive_command(
&self,
_command: ButtonCommand,
context: &mut TransmogrifierContext<'_, ButtonTransmogrifier, Rasterizer<R>>
)
fn receive_command(
&self,
_command: ButtonCommand,
context: &mut TransmogrifierContext<'_, ButtonTransmogrifier, Rasterizer<R>>
)
Called when a command is received from the widget.
sourcefn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
fn initialize(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> Self::State
Called after a transmogrifier is initialized.
sourcefn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
fn process_messages(
&self,
transmogrifier_context: TransmogrifierContext<'_, Self, F>
)
Processes commands and events for this widget and transmogrifier.
sourcefn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
fn default_state_for(
&self,
widget: &mut Self::Widget,
reference: &WidgetRef<Self::Widget>,
frontend: &F
) -> TransmogrifierState
Returns an initialized state using Self::State::default()
.
sourcefn widget_type_id(&self) -> TypeId
fn widget_type_id(&self) -> TypeId
Returns the TypeId
of Self::Widget
.
Auto Trait Implementations
impl<R> !RefUnwindSafe for Rasterizer<R>
impl<R> Send for Rasterizer<R>
impl<R> Sync for Rasterizer<R>
impl<R> Unpin for Rasterizer<R> where
R: Unpin,
impl<R> !UnwindSafe for Rasterizer<R>
Blanket Implementations
sourceimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
sourcefn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified method Read more
sourcefn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford method by default Read more
sourceimpl<T> AnyFrontend for T where
T: Frontend + AnySendSync,
impl<T> AnyFrontend for T where
T: Frontend + AnySendSync,
sourcefn cloned(&self) -> Box<dyn AnyFrontend + 'static, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
fn cloned(&self) -> Box<dyn AnyFrontend + 'static, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
Clones the frontend, returning the clone in a box.
sourcefn storage(&self) -> &WidgetStorage
fn storage(&self) -> &WidgetStorage
Returns the widget storage.
sourcefn set_widget_has_messages(&self, widget: WidgetId)
fn set_widget_has_messages(&self, widget: WidgetId)
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. Read more
sourcefn enter_managed_code(&self) -> ManagedCodeGuard
fn enter_managed_code(&self) -> ManagedCodeGuard
Marks that managed code is being executed. Can be nested. Automatically exited when the returned guard is dropped.
fn _exit_managed_code(&self, allow_process_messages: bool)
sourcefn theme(&self) -> SystemTheme
fn theme(&self) -> SystemTheme
Returns the current system theme.
sourcefn load_image(
&self,
asset: &Image,
completed: Callback<Image, ()>,
error: Callback<String, ()>
)
fn load_image(
&self,
asset: &Image,
completed: Callback<Image, ()>,
error: Callback<String, ()>
)
Loads an image asynchronously, executing completed
when loaded.
sourcefn asset_url(&self, asset: &Asset) -> Option<Url>
fn asset_url(&self, asset: &Asset) -> Option<Url>
Returns the full Url for the asset, if available.
sourcefn schedule_timer(
&self,
callback: Callback<(), ()>,
duration: Duration,
repeating: bool
) -> Timer
fn schedule_timer(
&self,
callback: Callback<(), ()>,
duration: Duration,
repeating: bool
) -> Timer
Schedules a timer that invokes callback
after duration
, and repeats if repeating
is true.
sourcefn localize(
&self,
key: &str,
parameters: Option<LocalizationParameters<'a>>
) -> String
fn localize(
&self,
key: &str,
parameters: Option<LocalizationParameters<'a>>
) -> String
Localizes key
with parameters
.
sourcefn window(&self) -> Option<&(dyn Window + 'static)>
fn window(&self) -> Option<&(dyn Window + 'static)>
Returns the window for this frontend instance.
sourcefn open(&self, window: Box<dyn AnyWindowBuilder + 'static, Global>) -> bool
fn open(&self, window: Box<dyn AnyWindowBuilder + 'static, Global>) -> bool
Opens a window. Returns false if unable to open the window.
sourcefn app(&self) -> &AppContext
fn app(&self) -> &AppContext
Returns the current application context.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, U> IntoColor<U> for T where
U: FromColor<T>,
impl<T, U> IntoColor<U> for T where
U: FromColor<T>,
sourcefn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
sourceimpl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
sourcefn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
sourcefn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
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
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more