[][src]Struct show_image::WindowOptions

pub struct WindowOptions {
    pub name: String,
    pub size: [u32; 2],
    pub resizable: bool,
    pub preserve_aspect_ratio: bool,
}

Options for creating a window.

Fields

name: String

The name of the window.

size: [u32; 2]

The initial size of the window in pixel.

This may be ignored by a window manager.

resizable: bool

If true allow the window to be resized.

This may be ignored by a window manager.

preserve_aspect_ratio: bool

Preserve the aspect ratio

Methods

impl WindowOptions[src]

pub fn set_name(self, name: String) -> Self[src]

Set the name of the window.

This function consumes and returns self to allow daisy chaining.

pub fn set_size(self, size: [u32; 2]) -> Self[src]

Set the initial size of the window.

This property may be ignored by a window manager.

This function consumes and returns self to allow daisy chaining.

pub fn set_width(self, width: u32) -> Self[src]

Set the initial width of the window.

This property may be ignored by a window manager.

This function consumes and returns self to allow daisy chaining.

pub fn set_height(self, height: u32) -> Self[src]

Set the initial height of the window.

This property may be ignored by a window manager.

This function consumes and returns self to allow daisy chaining.

pub fn set_resizable(self, resizable: bool) -> Self[src]

Make the window resizable or not.

This property may be ignored by a window manager.

This function consumes and returns self to allow daisy chaining.

pub fn set_preserve_aspect_ratio(self, preserve_aspect_ratio: bool) -> Self[src]

Preserve the aspect ratio of displayed images, or not.

This function consumes and returns self to allow daisy chaining.

Trait Implementations

impl Clone for WindowOptions[src]

impl Debug for WindowOptions[src]

impl Default for WindowOptions[src]

impl Eq for WindowOptions[src]

impl PartialEq<WindowOptions> for WindowOptions[src]

impl StructuralEq for WindowOptions[src]

impl StructuralPartialEq for WindowOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.