Struct WindowModelessOpts

Source
pub struct WindowModelessOpts {
    pub class_name: String,
    pub class_style: CS,
    pub class_icon: Icon,
    pub class_cursor: Cursor,
    pub class_bg_brush: Brush,
    pub title: String,
    pub position: (i32, i32),
    pub size: (i32, i32),
    pub style: WS,
    pub ex_style: WS_EX,
}
Available on crate feature gui only.
Expand description

Options to create a WindowModeless programmatically with WindowModeless::new.

Fields§

§class_name: String

Window class name to be registered.

Defaults to an auto-generated string.

§class_style: CS

Window class styles to be registered.

Defaults to co::CS::DBLCLKS.

§class_icon: Icon

Window main icon to be registered.

Defaults to gui::Icon::None.

§class_cursor: Cursor

Window cursor to be registered.

Defaults to gui::Cursor::Idc(co::IDC::ARROW).

§class_bg_brush: Brush

Window background brush to be registered.

Defaults to gui::Brush::Color(co::COLOR::BTNFACE).

§title: String

Window title to be created.

Defaults to empty string.

§position: (i32, i32)

Left and top position coordinates of control within parent’s client area, to be created.

Defaults to gui::dpi(0, 0).

§size: (i32, i32)

Width and height of window client area, in pixels, to be created. Does not include title bar or borders.

Defaults to gui::dpi(220, 150).

§style: WS

Window styles to be created.

Defaults to WS::CAPTION | WS::SYSMENU | WS::CLIPCHILDREN | WS::BORDER | WS::VISIBLE.

Suggestions:

  • WS::SIZEBOX to make the window resizable.
§ex_style: WS_EX

Extended window styles to be created.

Defaults to WS_EX::LEFT | WS_EX::TOOLWINDOW.

Trait Implementations§

Source§

impl Default for WindowModelessOpts

Source§

fn default() -> Self

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.