pub struct Application { /* private fields */ }Implementations§
Source§impl Application
impl Application
pub fn new() -> Self
pub fn window(self, window: WindowBuilder) -> Self
Sourcepub fn controller(self, controller: impl CommandController + 'static) -> Self
pub fn controller(self, controller: impl CommandController + 'static) -> Self
Attach an application-scoped non-widget controller.
Sourcepub fn on_command<T, F>(self, key: CommandKey<T>, handler: F) -> Self
pub fn on_command<T, F>(self, key: CommandKey<T>, handler: F) -> Self
Subscribe an application-scoped handler to a typed command.
pub fn register_font( &mut self, handle: FontHandle, font: RegisteredFont, ) -> Result<()>
pub fn register_font_bytes( &mut self, data: impl Into<Vec<u8>>, ) -> Result<FontHandle>
pub fn register_image( &mut self, handle: ImageHandle, image: RegisteredImage, ) -> Result<()>
pub fn register_svg_image_with_handle( &mut self, handle: ImageHandle, data: impl AsRef<[u8]>, ) -> Result<()>
pub fn register_rgba_image( &mut self, width: u32, height: u32, data: impl Into<Vec<u8>>, ) -> Result<ImageHandle>
pub fn register_svg_image( &mut self, data: impl AsRef<[u8]>, ) -> Result<ImageHandle>
pub fn register_svg_image_at_size_with_handle( &mut self, handle: ImageHandle, width: u32, height: u32, data: impl AsRef<[u8]>, ) -> Result<()>
pub fn register_svg_image_at_size( &mut self, width: u32, height: u32, data: impl AsRef<[u8]>, ) -> Result<ImageHandle>
pub fn register_embedded_svg_image( &mut self, resource: EmbeddedSvgImageResource, ) -> Result<()>
pub fn register_embedded_svg_images( &mut self, resources: impl IntoIterator<Item = EmbeddedSvgImageResource>, ) -> Result<()>
pub fn build(self) -> Result<Runtime>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Application
impl !Send for Application
impl !Sync for Application
impl !UnwindSafe for Application
impl Freeze for Application
impl Unpin for Application
impl UnsafeUnpin for Application
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