Struct winsafe::co::WS

source ·
pub struct WS(/* private fields */);
Available on crate features kernel and user only.
Expand description

Window styles (u32).

Note: Control-specific styles have their own types, which are convertible to WS.

This is a bitflag constant, which implements the NativeBitflag trait.

Implementations§

source§

impl WS

source

pub const unsafe fn from_raw(v: u32) -> Self

Constructs a new object by wrapping the given integer value.

§Safety

Be sure the given value is meaningful for the actual type.

source

pub const fn raw(&self) -> u32

Returns the primitive integer underlying value.

This method is similar to Into, but it is const, therefore it can be used in const contexts.

source§

impl WS

source

pub const NoValue: Self = _

None of the actual values (zero).

source

pub const OVERLAPPED: Self = _

The window is an overlapped window. An overlapped window has a title bar and a border. Same as the WS::TILED style.

source

pub const POPUP: Self = _

The window is a pop-up window. This style cannot be used with the WS_CHILD style.

source

pub const CHILD: Self = _

The window is a child window. A window with this style cannot have a menu bar. This style cannot be used with the WS::POPUP style.

source

pub const MINIMIZE: Self = _

The window is initially minimized. Same as the WS::ICONIC style.

source

pub const VISIBLE: Self = _

The window is initially visible. This style can be turned on and off by using the HWND::ShowWindow or HWND::SetWindowPos function.

source

pub const DISABLED: Self = _

The window is initially disabled. A disabled window cannot receive input from the user. To change this after a window has been created use the HWND::EnableWindow function.

source

pub const CLIPSIBLINGS: Self = _

Clips child windows relative to each other; that is when a particular child window receives a wm::Paint message, the WS::CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS::CLIPSIBLINGS is not specified and child windows overlap it is possible when drawing within the client area of a child window to draw within the client area of a neighboring child window.

source

pub const CLIPCHILDREN: Self = _

Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window.

source

pub const MAXIMIZE: Self = _

The window is initially maximized.

source

pub const CAPTION: Self = _

The window has a title bar (includes the WS::BORDER style).

source

pub const BORDER: Self = _

The window has a thin-line border.

source

pub const DLGFRAME: Self = _

The window has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar.

source

pub const VSCROLL: Self = _

The window has a vertical scroll bar.

source

pub const HSCROLL: Self = _

The window has a horizontal scroll bar.

source

pub const SYSMENU: Self = _

The window has a window menu on its title bar. The WS::CAPTION style must also be specified.

source

pub const THICKFRAME: Self = _

The window has a sizing border. Same as the WS::SIZEBOX style.

source

pub const GROUP: Self = _

The window is the first control of a group of controls. The group consists of this first control and all controls defined after it up to the next control with the WS::GROUP style. The first control in each group usually has the WS::TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.

You can turn this style on and off to change dialog box navigation. To change this style after a window has been created use the HWND::SetWindowLongPtr function.

source

pub const TABSTOP: Self = _

The window is a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the WS::TABSTOP style.

You can turn this style on and off to change dialog box navigation. To change this style after a window has been created use the HWND::SetWindowLongPtr function. For user-created windows and modeless dialogs to work with tab stops alter the message loop to call the HWND::IsDialogMessage function.

source

pub const MINIMIZEBOX: Self = _

The window has a minimize button. Cannot be combined with the WS_EX::CONTEXTHELP style. The WS::SYSMENU style must also be specified.

source

pub const MAXIMIZEBOX: Self = _

The window has a maximize button. Cannot be combined with the WS_EX::CONTEXTHELP style. The WS::SYSMENU style must also be specified.

source

pub const TILED: Self = _

The window is an overlapped window. An overlapped window has a title bar and a border. Same as the WS::OVERLAPPED style.

source

pub const ICONIC: Self = _

The window is initially minimized. Same as the WS::MINIMIZE style.

source

pub const SIZEBOX: Self = _

The window has a sizing border. Same as the WS::THICKFRAME style.

source

pub const TILEDWINDOW: Self = _

The window is an overlapped window. Same as the WS::OVERLAPPEDWINDOW style.

source

pub const OVERLAPPEDWINDOW: Self = _

The window is an overlapped window. Same as the WS::TILEDWINDOW style.

source

pub const POPUPWINDOW: Self = _

The window is a pop-up window. This style cannot be used with the WS::CHILD style.

source

pub const CHILDWINDOW: Self = _

Same as the WS::CHILD style.

Trait Implementations§

source§

impl AsRef<u32> for WS

source§

fn as_ref(&self) -> &u32

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Binary for WS

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd for WS

§

type Output = WS

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
source§

impl BitAndAssign for WS

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl BitOr for WS

§

type Output = WS

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Self

Performs the | operation. Read more
source§

impl BitOrAssign for WS

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl BitXor for WS

§

type Output = WS

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl BitXorAssign for WS

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl Clone for WS

source§

fn clone(&self) -> WS

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WS

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for WS

source§

fn default() -> WS

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

impl Display for WS

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<BS> for WS

source§

fn from(v: BS) -> Self

Converts to this type from the input type.
source§

impl From<BTNS> for WS

Available on crate feature comctl only.
source§

fn from(v: BTNS) -> Self

Converts to this type from the input type.
source§

impl From<CBS> for WS

source§

fn from(v: CBS) -> Self

Converts to this type from the input type.
source§

impl From<DTS> for WS

Available on crate feature comctl only.
source§

fn from(v: DTS) -> Self

Converts to this type from the input type.
source§

impl From<ES> for WS

source§

fn from(v: ES) -> Self

Converts to this type from the input type.
source§

impl From<HDS> for WS

Available on crate feature comctl only.
source§

fn from(v: HDS) -> Self

Converts to this type from the input type.
source§

impl From<LBS> for WS

source§

fn from(v: LBS) -> Self

Converts to this type from the input type.
source§

impl From<LVS> for WS

Available on crate feature comctl only.
source§

fn from(v: LVS) -> Self

Converts to this type from the input type.
source§

impl From<LWS> for WS

Available on crate feature comctl only.
source§

fn from(v: LWS) -> Self

Converts to this type from the input type.
source§

impl From<MCS> for WS

Available on crate feature comctl only.
source§

fn from(v: MCS) -> Self

Converts to this type from the input type.
source§

impl From<PBS> for WS

Available on crate feature comctl only.
source§

fn from(v: PBS) -> Self

Converts to this type from the input type.
source§

impl From<RBS> for WS

Available on crate feature comctl only.
source§

fn from(v: RBS) -> Self

Converts to this type from the input type.
source§

impl From<SBARS> for WS

Available on crate feature comctl only.
source§

fn from(v: SBARS) -> Self

Converts to this type from the input type.
source§

impl From<SS> for WS

source§

fn from(v: SS) -> Self

Converts to this type from the input type.
source§

impl From<TBS> for WS

Available on crate feature comctl only.
source§

fn from(v: TBS) -> Self

Converts to this type from the input type.
source§

impl From<TCS> for WS

Available on crate feature comctl only.
source§

fn from(v: TCS) -> Self

Converts to this type from the input type.
source§

impl From<TVS> for WS

Available on crate feature comctl only.
source§

fn from(v: TVS) -> Self

Converts to this type from the input type.
source§

impl From<UDS> for WS

Available on crate feature comctl only.
source§

fn from(v: UDS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for BS

source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for BTNS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for CBS

source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for DTS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for ES

source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for HDS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for LBS

source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for LVS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for LWS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for MCS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for PBS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for RBS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for SBARS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for SS

source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for TBS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for TCS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for TVS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for UDS

Available on crate feature comctl only.
source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl From<WS> for u32

source§

fn from(v: WS) -> Self

Converts to this type from the input type.
source§

impl Hash for WS

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IntUnderlying for WS

§

type Raw = u32

Available on crate feature kernel only.
The underlying raw integer type.
source§

unsafe fn as_mut(&mut self) -> &mut Self::Raw

Available on crate feature kernel only.
Returns a mutable reference to the underlying raw value. Read more
source§

impl LowerHex for WS

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl NativeBitflag for WS

source§

fn has(&self, other: Self) -> bool

Available on crate feature kernel only.
Tells whether other bitflag style is present. Read more
source§

impl Not for WS

§

type Output = WS

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl Octal for WS

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for WS

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for WS

source§

fn eq(&self, other: &WS) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for WS

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl UpperHex for WS

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for WS

source§

impl Eq for WS

source§

impl NativeConst for WS

source§

impl Send for WS

source§

impl StructuralPartialEq for WS

Auto Trait Implementations§

§

impl Freeze for WS

§

impl RefUnwindSafe for WS

§

impl Sync for WS

§

impl Unpin for WS

§

impl UnwindSafe for WS

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.