Builder

Struct Builder 

Source
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§

Source§

impl Builder

Source

pub fn main_window() -> Self

Main application window (resizeable with min/max buttons and title). Will terminate the app on close.

Source

pub fn popup_window() -> Self

Popup window (with min/max buttons and title).

Source

pub fn child_window() -> Self

Child window style. if this flag is set all other flags are ignored.

Source

pub fn none() -> Self

If you want to start from scratch.

Source

pub fn with_flags(flags: Flags) -> Self

Start with some flags.

Source

pub fn main() -> Self

Main window style (appears in taskbar). Will terminate the app on close.

Source

pub fn popup() -> Self

Popup style, window is created as topmost.

Source

pub fn tool() -> Self

Tool window style (with thin titlebar).

Source

pub fn with_parent(self, parent: HWINDOW) -> Self

Specify the parent window (e.g. for child creation).

Source

pub fn with_size(self, size: (i32, i32)) -> Self

Specify the precise window size in (width, height) form.

Source

pub fn with_pos(self, position: (i32, i32)) -> Self

Specify the precise window position in (X, Y) form.

Source

pub fn with_rect(self, rect: Rectangle) -> Self

Specify the exact window rectangle in (X, Y, W, H) form.

Source

pub fn with_title(self) -> Self

Top level window, has titlebar.

Source

pub fn resizeable(self) -> Self

Can be resized.

Source

pub fn fixed(self) -> Self

Can not be resized.

Source

pub fn closeable(self) -> Self

Has minimize / maximize buttons.

Source

pub fn glassy(self) -> Self

Glassy window (“Acrylic” on Windows and “Vibrant” on macOS).

Source

pub fn alpha(self) -> Self

Transparent window.

Source

pub fn debug(self) -> Self

Can be debugged with Inspector.

Source

pub fn create(self) -> Window

Consume the builder and call Window::create() with built parameters.

Trait Implementations§

Source§

impl Default for Builder

Source§

fn default() -> Builder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.