pub struct WindowFlags { /* private fields */ }
Expand description
Configuration flags for windows
Implementations§
Source§impl WindowFlags
impl WindowFlags
Sourcepub const NO_TITLE_BAR: WindowFlags
pub const NO_TITLE_BAR: WindowFlags
Disable the title bar
Sourcepub const NO_RESIZE: WindowFlags
pub const NO_RESIZE: WindowFlags
Disable resizing with the lower-right grip
Sourcepub const NO_MOVE: WindowFlags
pub const NO_MOVE: WindowFlags
Disable moving the window
Sourcepub const NO_SCROLLBAR: WindowFlags
pub const NO_SCROLLBAR: WindowFlags
Disable scrollbars (scrolling is still possible with the mouse or programmatically)
Sourcepub const NO_SCROLL_WITH_MOUSE: WindowFlags
pub const NO_SCROLL_WITH_MOUSE: WindowFlags
Disable vertical scrolling with the mouse wheel.
On child window, the mouse wheel will be forwarded to the parent unless NO_SCROLLBAR
is also set.
Sourcepub const NO_COLLAPSE: WindowFlags
pub const NO_COLLAPSE: WindowFlags
Disable collapsing the window by double-clicking it
Sourcepub const ALWAYS_AUTO_RESIZE: WindowFlags
pub const ALWAYS_AUTO_RESIZE: WindowFlags
Resize the window to its content on every frame
Sourcepub const NO_BACKGROUND: WindowFlags
pub const NO_BACKGROUND: WindowFlags
Disable drawing of background color and outside border
Sourcepub const NO_SAVED_SETTINGS: WindowFlags
pub const NO_SAVED_SETTINGS: WindowFlags
Never load/save settings
Sourcepub const NO_MOUSE_INPUTS: WindowFlags
pub const NO_MOUSE_INPUTS: WindowFlags
Disable catching mouse input. Hovering test will pass through
Sourcepub const MENU_BAR: WindowFlags
pub const MENU_BAR: WindowFlags
Show a menu bar
Sourcepub const HORIZONTAL_SCROLLBAR: WindowFlags
pub const HORIZONTAL_SCROLLBAR: WindowFlags
Allow horizontal scrollbar to appear
Sourcepub const NO_FOCUS_ON_APPEARING: WindowFlags
pub const NO_FOCUS_ON_APPEARING: WindowFlags
Disable taking focus when transitioning from hidden to visible state
Sourcepub const NO_BRING_TO_FRONT_ON_FOCUS: WindowFlags
pub const NO_BRING_TO_FRONT_ON_FOCUS: WindowFlags
Disable bringing window to front when taking focus (e.g. clicking it or programmatically giving it focus)
Sourcepub const ALWAYS_VERTICAL_SCROLLBAR: WindowFlags
pub const ALWAYS_VERTICAL_SCROLLBAR: WindowFlags
Always show vertical scrollbar
Sourcepub const ALWAYS_HORIZONTAL_SCROLLBAR: WindowFlags
pub const ALWAYS_HORIZONTAL_SCROLLBAR: WindowFlags
Always show horizontal scrollbar
Sourcepub const ALWAYS_USE_WINDOW_PADDING: WindowFlags
pub const ALWAYS_USE_WINDOW_PADDING: WindowFlags
Ensure child windows without border use style.window_padding
Sourcepub const NO_NAV_INPUTS: WindowFlags
pub const NO_NAV_INPUTS: WindowFlags
Disable gamepad/keyboard navigation within the window
Sourcepub const NO_NAV_FOCUS: WindowFlags
pub const NO_NAV_FOCUS: WindowFlags
No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)
Sourcepub const UNSAVED_DOCUMENT: WindowFlags
pub const UNSAVED_DOCUMENT: WindowFlags
Append ‘*’ to title without affecting the ID, as a convenience
Sourcepub const NO_NAV: WindowFlags
pub const NO_NAV: WindowFlags
Disable gamepad/keyboard navigation and focusing.
Shorthand for WindowFlags::NO_NAV_INPUTS | WindowFlags::NO_NAV_FOCUS
.
Sourcepub const NO_DECORATION: WindowFlags
pub const NO_DECORATION: WindowFlags
Disable all window decorations.
Shorthand for WindowFlags::NO_TITLE_BAR | WindowFlags::NO_RESIZE | WindowFlags::NO_SCROLLBAR | WindowFlags::NO_COLLAPSE
.
Sourcepub const NO_INPUTS: WindowFlags
pub const NO_INPUTS: WindowFlags
Don’t handle input.
Shorthand for WindowFlags::NO_MOUSE_INPUTS | WindowFlags::NO_NAV_INPUTS | WindowFlags::NO_NAV_FOCUS
.
Sourcepub const fn empty() -> WindowFlags
pub const fn empty() -> WindowFlags
Returns an empty set of flags.
Sourcepub const fn all() -> WindowFlags
pub const fn all() -> WindowFlags
Returns the set containing all flags.
Sourcepub const fn from_bits(bits: u32) -> Option<WindowFlags>
pub const fn from_bits(bits: u32) -> Option<WindowFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> WindowFlags
pub const fn from_bits_truncate(bits: u32) -> WindowFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> WindowFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> WindowFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
§Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
Sourcepub const fn intersects(&self, other: WindowFlags) -> bool
pub const fn intersects(&self, other: WindowFlags) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: WindowFlags) -> bool
pub const fn contains(&self, other: WindowFlags) -> bool
Returns true
if all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: WindowFlags)
pub fn insert(&mut self, other: WindowFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: WindowFlags)
pub fn remove(&mut self, other: WindowFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: WindowFlags)
pub fn toggle(&mut self, other: WindowFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: WindowFlags, value: bool)
pub fn set(&mut self, other: WindowFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Sourcepub const fn intersection(self, other: WindowFlags) -> WindowFlags
pub const fn intersection(self, other: WindowFlags) -> WindowFlags
Returns the intersection between the flags in self
and
other
.
Specifically, the returned set contains only the flags which are
present in both self
and other
.
This is equivalent to using the &
operator (e.g.
ops::BitAnd
), as in flags & other
.
Sourcepub const fn union(self, other: WindowFlags) -> WindowFlags
pub const fn union(self, other: WindowFlags) -> WindowFlags
Returns the union of between the flags in self
and other
.
Specifically, the returned set contains all flags which are
present in either self
or other
, including any which are
present in both (see Self::symmetric_difference
if that
is undesirable).
This is equivalent to using the |
operator (e.g.
ops::BitOr
), as in flags | other
.
Sourcepub const fn difference(self, other: WindowFlags) -> WindowFlags
pub const fn difference(self, other: WindowFlags) -> WindowFlags
Returns the difference between the flags in self
and other
.
Specifically, the returned set contains all flags present in
self
, except for the ones present in other
.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other
(and this syntax is also supported).
This is equivalent to using the -
operator (e.g.
ops::Sub
), as in flags - other
.
Sourcepub const fn symmetric_difference(self, other: WindowFlags) -> WindowFlags
pub const fn symmetric_difference(self, other: WindowFlags) -> WindowFlags
Returns the symmetric difference between the flags
in self
and other
.
Specifically, the returned set contains the flags present which
are present in self
or other
, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self
and other
.
This is equivalent to using the ^
operator (e.g.
ops::BitXor
), as in flags ^ other
.
Sourcepub const fn complement(self) -> WindowFlags
pub const fn complement(self) -> WindowFlags
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self
, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all()
and self
(e.g. Self::all() - self
)
This is equivalent to using the !
operator (e.g.
ops::Not
), as in !flags
.
Trait Implementations§
Source§impl Binary for WindowFlags
impl Binary for WindowFlags
Source§impl BitAnd for WindowFlags
impl BitAnd for WindowFlags
Source§fn bitand(self, other: WindowFlags) -> WindowFlags
fn bitand(self, other: WindowFlags) -> WindowFlags
Returns the intersection between the two sets of flags.
Source§type Output = WindowFlags
type Output = WindowFlags
&
operator.Source§impl BitAndAssign for WindowFlags
impl BitAndAssign for WindowFlags
Source§fn bitand_assign(&mut self, other: WindowFlags)
fn bitand_assign(&mut self, other: WindowFlags)
Disables all flags disabled in the set.
Source§impl BitOr for WindowFlags
impl BitOr for WindowFlags
Source§fn bitor(self, other: WindowFlags) -> WindowFlags
fn bitor(self, other: WindowFlags) -> WindowFlags
Returns the union of the two sets of flags.
Source§type Output = WindowFlags
type Output = WindowFlags
|
operator.Source§impl BitOrAssign for WindowFlags
impl BitOrAssign for WindowFlags
Source§fn bitor_assign(&mut self, other: WindowFlags)
fn bitor_assign(&mut self, other: WindowFlags)
Adds the set of flags.
Source§impl BitXor for WindowFlags
impl BitXor for WindowFlags
Source§fn bitxor(self, other: WindowFlags) -> WindowFlags
fn bitxor(self, other: WindowFlags) -> WindowFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = WindowFlags
type Output = WindowFlags
^
operator.Source§impl BitXorAssign for WindowFlags
impl BitXorAssign for WindowFlags
Source§fn bitxor_assign(&mut self, other: WindowFlags)
fn bitxor_assign(&mut self, other: WindowFlags)
Toggles the set of flags.
Source§impl Clone for WindowFlags
impl Clone for WindowFlags
Source§fn clone(&self) -> WindowFlags
fn clone(&self) -> WindowFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for WindowFlags
impl Debug for WindowFlags
Source§impl Extend<WindowFlags> for WindowFlags
impl Extend<WindowFlags> for WindowFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = WindowFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = WindowFlags>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl FromIterator<WindowFlags> for WindowFlags
impl FromIterator<WindowFlags> for WindowFlags
Source§fn from_iter<T>(iterator: T) -> WindowFlagswhere
T: IntoIterator<Item = WindowFlags>,
fn from_iter<T>(iterator: T) -> WindowFlagswhere
T: IntoIterator<Item = WindowFlags>,
Source§impl Hash for WindowFlags
impl Hash for WindowFlags
Source§impl LowerHex for WindowFlags
impl LowerHex for WindowFlags
Source§impl Not for WindowFlags
impl Not for WindowFlags
Source§fn not(self) -> WindowFlags
fn not(self) -> WindowFlags
Returns the complement of this set of flags.
Source§type Output = WindowFlags
type Output = WindowFlags
!
operator.Source§impl Octal for WindowFlags
impl Octal for WindowFlags
Source§impl Ord for WindowFlags
impl Ord for WindowFlags
Source§fn cmp(&self, other: &WindowFlags) -> Ordering
fn cmp(&self, other: &WindowFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WindowFlags
impl PartialEq for WindowFlags
Source§impl PartialOrd for WindowFlags
impl PartialOrd for WindowFlags
Source§impl Sub for WindowFlags
impl Sub for WindowFlags
Source§fn sub(self, other: WindowFlags) -> WindowFlags
fn sub(self, other: WindowFlags) -> WindowFlags
Returns the set difference of the two sets of flags.
Source§type Output = WindowFlags
type Output = WindowFlags
-
operator.Source§impl SubAssign for WindowFlags
impl SubAssign for WindowFlags
Source§fn sub_assign(&mut self, other: WindowFlags)
fn sub_assign(&mut self, other: WindowFlags)
Disables all flags enabled in the set.
Source§impl UpperHex for WindowFlags
impl UpperHex for WindowFlags
impl Copy for WindowFlags
impl Eq for WindowFlags
impl StructuralPartialEq for WindowFlags
Auto Trait Implementations§
impl Freeze for WindowFlags
impl RefUnwindSafe for WindowFlags
impl Send for WindowFlags
impl Sync for WindowFlags
impl Unpin for WindowFlags
impl UnwindSafe for WindowFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more