pub struct WindowConfBuilder { /* private fields */ }Implementations§
Source§impl WindowConfBuilder
impl WindowConfBuilder
Sourcepub fn width<I: Into<u32>>(&mut self, width: I) -> &mut Self
pub fn width<I: Into<u32>>(&mut self, width: I) -> &mut Self
Sets WindowConf::width.
Sourcepub fn height<I: Into<u32>>(&mut self, height: I) -> &mut Self
pub fn height<I: Into<u32>>(&mut self, height: I) -> &mut Self
Sets WindowConf::height.
Sourcepub fn anchor_1(&mut self, anchor: Anchor) -> &mut Self
pub fn anchor_1(&mut self, anchor: Anchor) -> &mut Self
Sets first anchor of WindowConf::anchor.
Sourcepub fn anchor_2(&mut self, anchor: Anchor) -> &mut Self
pub fn anchor_2(&mut self, anchor: Anchor) -> &mut Self
Sets second anchor of WindowConf::anchor.
Sourcepub fn margins(
&mut self,
top: i32,
right: i32,
bottom: i32,
left: i32,
) -> &mut Self
pub fn margins( &mut self, top: i32, right: i32, bottom: i32, left: i32, ) -> &mut Self
Sets WindowConf::margin.
Sourcepub fn layer_type(&mut self, layer: Layer) -> &mut Self
pub fn layer_type(&mut self, layer: Layer) -> &mut Self
Sets WindowConf::layer_type.
Sourcepub fn board_interactivity(&mut self, board: KeyboardInteractivity) -> &mut Self
pub fn board_interactivity(&mut self, board: KeyboardInteractivity) -> &mut Self
Sourcepub fn exclusive_zone(&mut self, dimention: i32) -> &mut Self
pub fn exclusive_zone(&mut self, dimention: i32) -> &mut Self
Sourcepub fn monitor(&mut self, name: String) -> &mut Self
pub fn monitor(&mut self, name: String) -> &mut Self
Sets WindowConf::monitor_name.
Sourcepub fn natural_scroll(&mut self, scroll: bool) -> &mut Self
pub fn natural_scroll(&mut self, scroll: bool) -> &mut Self
Sourcepub fn build(&self) -> Result<WindowConf, Box<dyn Error>>
pub fn build(&self) -> Result<WindowConf, Box<dyn Error>>
Creates an instnce of WindowConf with the provided configurations.
This function result in an error if width and height are not set or they
are set to zero.
Trait Implementations§
Source§impl Default for WindowConfBuilder
impl Default for WindowConfBuilder
Source§fn default() -> WindowConfBuilder
fn default() -> WindowConfBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WindowConfBuilder
impl RefUnwindSafe for WindowConfBuilder
impl Send for WindowConfBuilder
impl Sync for WindowConfBuilder
impl Unpin for WindowConfBuilder
impl UnsafeUnpin for WindowConfBuilder
impl UnwindSafe for WindowConfBuilder
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.