[−][src]Struct browser_window::browser::builder::BrowserWindowBuilder
Used to create a Browser
or BrowserThreaded
instance.
Implementations
impl BrowserWindowBuilder
[src]
pub fn borders(self, value: bool) -> Self
[src]
Sets whether or not the window has borders. Default is true.
pub fn dev_tools(self, enabled: bool) -> Self
[src]
Sets whether or not an extra window with developer tools will be opened together with this browser.
When in debug mode the default is true
.
When in release mode the default is false
.
pub fn async_handler<H, F>(self, handler: H) -> Self where
H: FnMut(BrowserWindowHandle, String, Vec<String>) -> F + Send + 'static,
F: Future<Output = ()> + 'static,
[src]
H: FnMut(BrowserWindowHandle, String, Vec<String>) -> F + Send + 'static,
F: Future<Output = ()> + 'static,
Configure a closure that can be invoked from within JavaScript. The closure's second parameter specifies a command name. The closure's third parameter specifies an array of string arguments.
pub fn minimizable(self, value: bool) -> Self
[src]
Sets whether or not the window has a minimize button on the title bar Default is true
pub fn parent<B>(self, bw: &B) -> Self where
B: OwnedBrowserWindow,
[src]
B: OwnedBrowserWindow,
Configure a parent window.
When a parent window closes, this browser window will close as well.
This could be a reference to a Browser
or BrowserThreaded
handle.
pub fn new(source: Source) -> Self
[src]
Creates an instance of a browser window builder.
Arguments
source
- The content that will be displayed in the browser window.
pub fn title<S: Into<String>>(self, title: S) -> Self
[src]
pub fn width(self, width: u32) -> Self
[src]
Sets the width that the browser window will be created with initially
Arguments
width
- Width in pixels
pub fn height(self, height: u32) -> Self
[src]
Sets the height that the browser window will be created with initially
Arguments
height
- Height in pixels
pub fn resizable(self, resizable: bool) -> Self
[src]
Sets whether or not the window will be resizable Default is true
pub async fn build(self, app: ApplicationHandle) -> BrowserWindow
[src]
Creates the browser window.
Arguments
app
- An application handle that this browser window can spawn into
pub async fn build_threaded(
self,
app: ApplicationHandleThreaded
) -> Result<BrowserWindowThreaded, DelegateError>
[src]
self,
app: ApplicationHandleThreaded
) -> Result<BrowserWindowThreaded, DelegateError>
Same as build, but gives back a browser handle that is thread-safe.
Arguments
app
- An thread-safe application handle.
pub fn size(self, width: u32, height: u32) -> Self
[src]
Sets the width and height of the browser window
Auto Trait Implementations
impl !RefUnwindSafe for BrowserWindowBuilder
impl Send for BrowserWindowBuilder
impl !Sync for BrowserWindowBuilder
impl Unpin for BrowserWindowBuilder
impl !UnwindSafe for BrowserWindowBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,