Struct witas::WindowBuilder

source ·
pub struct WindowBuilder<Title = (), Sz = (), Tx = ()> { /* private fields */ }
Expand description

The object that build a window.

Implementations§

source§

impl<Title, Sz, Rx> WindowBuilder<Title, Sz, Rx>

source

pub fn title(self, title: impl Into<String>) -> WindowBuilder<String, Sz, Rx>

source

pub fn position(self, position: impl Into<ScreenPosition>) -> Self

source

pub fn inner_size<T>(self, size: T) -> WindowBuilder<Title, T, Rx>where T: ToPhysical<u32, Output<u32> = PhysicalSize<u32>>,

source

pub fn set_receiver( self, rx: &EventReceiver ) -> WindowBuilder<Title, Sz, UnboundedSender<(Event, Window)>>

source

pub fn set_raw_input_receiver( self, raw_input_rx: &RawInputEventRecevier ) -> WindowBuilder<Title, Sz, Rx>

source

pub fn style(self, style: impl Style + Send + 'static) -> Self

source

pub fn visible(self, visibility: bool) -> Self

source

pub fn ime(self, enable: bool) -> Self

source

pub fn visible_ime_candidate_window(self, visible: bool) -> Self

source

pub fn accept_drop_files(self, accept: bool) -> Self

source

pub fn icon(self, icon: Icon) -> Self

source

pub fn parent(self, parent: Option<&Window>) -> Self

source

pub fn auto_close(self, auto_close: bool) -> Self

source§

impl<Sz> WindowBuilder<String, Sz, UnboundedSender<(Event, Window)>>where Sz: ToPhysical<u32, Output<u32> = PhysicalSize<u32>>,

source

pub fn build(self) -> Build<Sz>

Trait Implementations§

source§

impl<Sz> IntoFuture for WindowBuilder<String, Sz, UnboundedSender<(Event, Window)>>where Sz: ToPhysical<u32, Output<u32> = PhysicalSize<u32>> + Send + Unpin + 'static,

§

type Output = Result<Window, Error>

The output that the future will produce on completion.
§

type IntoFuture = Build<Sz>

Which kind of future are we turning this into?
source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more

Auto Trait Implementations§

§

impl<Title = (), Sz = (), Tx = ()> !RefUnwindSafe for WindowBuilder<Title, Sz, Tx>

§

impl<Title, Sz, Tx> Send for WindowBuilder<Title, Sz, Tx>where Sz: Send, Title: Send, Tx: Send,

§

impl<Title = (), Sz = (), Tx = ()> !Sync for WindowBuilder<Title, Sz, Tx>

§

impl<Title, Sz, Tx> Unpin for WindowBuilder<Title, Sz, Tx>where Sz: Unpin, Title: Unpin, Tx: Unpin,

§

impl<Title = (), Sz = (), Tx = ()> !UnwindSafe for WindowBuilder<Title, Sz, Tx>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.