Trait tauri::WindowBuilder
pub trait WindowBuilder: WindowBuilderBase {
Show methods fn new() -> Self;
fn with_config(config: WindowConfig) -> Self;
fn menu(self, menu: Menu) -> Self;
fn center(self) -> Self;
fn position(self, x: f64, y: f64) -> Self;
fn inner_size(self, min_width: f64, min_height: f64) -> Self;
fn min_inner_size(self, min_width: f64, min_height: f64) -> Self;
fn max_inner_size(self, max_width: f64, max_height: f64) -> Self;
fn resizable(self, resizable: bool) -> Self;
fn title<S>(self, title: S) -> Self
where
S: Into<String>;
fn fullscreen(self, fullscreen: bool) -> Self;
fn focus(self) -> Self;
fn maximized(self, maximized: bool) -> Self;
fn visible(self, visible: bool) -> Self;
fn transparent(self, transparent: bool) -> Self;
fn decorations(self, decorations: bool) -> Self;
fn always_on_top(self, always_on_top: bool) -> Self;
fn icon(self, icon: Icon) -> Result<Self, Error>;
fn skip_taskbar(self, skip: bool) -> Self;
fn has_icon(&self) -> bool;
fn has_menu(&self) -> bool;
}
Expand description
A builder for all attributes related to a single webview.
This trait is only meant to be implemented by a custom Runtime
and not by applications.
#
Required methodsnew() -> Self#
fnInitializes a new window attributes builder.
with_config(config: WindowConfig) -> Self#
fnInitializes a new webview builder from a [WindowConfig
]
menu(self, menu: Menu) -> Self#
fnSets the menu for the window.
center(self) -> Self#
fnShow window in the center of the screen.
position(self, x: f64, y: f64) -> Self#
fnThe initial position of the window’s.
inner_size(self, min_width: f64, min_height: f64) -> Self#
fnWindow size.
min_inner_size(self, min_width: f64, min_height: f64) -> Self#
fnWindow min inner size.
max_inner_size(self, max_width: f64, max_height: f64) -> Self#
fnWindow max inner size.
resizable(self, resizable: bool) -> Self#
fnWhether the window is resizable or not.
title<S>(self, title: S) -> Self where S: Into<String>,#
fnThe title of the window in the title bar.
fullscreen(self, fullscreen: bool) -> Self#
fnWhether to start the window in fullscreen or not.
focus(self) -> Self#
fnWhether the window will be initially hidden or focused.
maximized(self, maximized: bool) -> Self#
fnWhether the window should be maximized upon creation.
visible(self, visible: bool) -> Self#
fnWhether the window should be immediately visible upon creation.
transparent(self, transparent: bool) -> Self#
fnWhether the the window should be transparent. If this is true, writing colors with alpha values different than 1.0
will produce a transparent window.
decorations(self, decorations: bool) -> Self#
fnWhether the window should have borders and bars.
always_on_top(self, always_on_top: bool) -> Self#
fnWhether the window should always be on top of other windows.
icon(self, icon: Icon) -> Result<Self, Error>#
fnSets the window icon.
skip_taskbar(self, skip: bool) -> Self#
fnSets whether or not the window icon should be added to the taskbar.
has_icon(&self) -> bool#
fnWhether the icon was set or not.
has_menu(&self) -> bool#
fnWhether the menu was set or not.
#
Implementations on Foreign TypesWindowBuilder for WindowBuilderWrapper#
implfocus(self) -> WindowBuilderWrapper#
pub fnDeprecated since 0.1.4 (noop) Windows is automatically focused when created.