pub struct Builder { /* private fields */ }
Expand description
Builder pattern for window creation.
For example,
let mut frame = sciter::window::Builder::main_window()
.with_size((800,600))
.resizeable()
.glassy()
.create();
Implementations
sourceimpl Builder
impl Builder
sourcepub fn main_window() -> Self
pub fn main_window() -> Self
Main application window (resizeable with min/max buttons and title). Will terminate the app on close.
sourcepub fn popup_window() -> Self
pub fn popup_window() -> Self
Popup window (with min/max buttons and title).
sourcepub fn child_window() -> Self
pub fn child_window() -> Self
Child window style. if this flag is set all other flags are ignored.
sourcepub fn with_flags(flags: Flags) -> Self
pub fn with_flags(flags: Flags) -> Self
Start with some flags.
sourcepub fn with_parent(self, parent: HWINDOW) -> Self
pub fn with_parent(self, parent: HWINDOW) -> Self
Specify the parent window (e.g. for child creation).
sourcepub fn with_size(self, size: (i32, i32)) -> Self
pub fn with_size(self, size: (i32, i32)) -> Self
Specify the precise window size in (width, height)
form.
sourcepub fn with_pos(self, position: (i32, i32)) -> Self
pub fn with_pos(self, position: (i32, i32)) -> Self
Specify the precise window position in (X, Y)
form.
sourcepub fn with_rect(self, rect: Rectangle) -> Self
pub fn with_rect(self, rect: Rectangle) -> Self
Specify the exact window rectangle in (X, Y, W, H)
form.
sourcepub fn with_title(self) -> Self
pub fn with_title(self) -> Self
Top level window, has titlebar.
sourcepub fn resizeable(self) -> Self
pub fn resizeable(self) -> Self
Can be resized.
sourcepub fn create(self) -> Window
pub fn create(self) -> Window
Consume the builder and call Window::create()
with built parameters.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl !Send for Builder
impl !Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more