[−][src]Struct wayland_protocols::unstable::xdg_shell::v6::client::zxdg_positioner_v6::ConstraintAdjustment
constraint adjustments
The constraint adjustment value define ways the compositor will adjust the position of the surface, if the unadjusted position would result in the surface being partly constrained.
Whether a surface is considered 'constrained' is left to the compositor to determine. For example, the surface may be partly outside the compositor's defined 'work area', thus necessitating the child surface's position be adjusted until it is entirely inside the work area.
The adjustments can be combined, according to a defined precedence: 1) Flip, 2) Slide, 3) Resize.
Implementations
impl ConstraintAdjustment
[src]
pub const None: ConstraintAdjustment
[src]
don't move the child surface when constrained
Don't alter the surface position even if it is constrained on some axis, for example partially outside the edge of a monitor.
pub const SlideX: ConstraintAdjustment
[src]
move along the x axis until unconstrained
Slide the surface along the x axis until it is no longer constrained.
First try to slide towards the direction of the gravity on the x axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained.
Then try to slide towards the opposite direction of the gravity on the x axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained.
pub const SlideY: ConstraintAdjustment
[src]
move along the y axis until unconstrained
Slide the surface along the y axis until it is no longer constrained.
First try to slide towards the direction of the gravity on the y axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained.
Then try to slide towards the opposite direction of the gravity on the y axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained.
pub const FlipX: ConstraintAdjustment
[src]
invert the anchor and gravity on the x axis
Invert the anchor and gravity on the x axis if the surface is constrained on the x axis. For example, if the left edge of the surface is constrained, the gravity is 'left' and the anchor is 'left', change the gravity to 'right' and the anchor to 'right'.
If the adjusted position also ends up being constrained, the resulting position of the flip_x adjustment will be the one before the adjustment.
pub const FlipY: ConstraintAdjustment
[src]
invert the anchor and gravity on the y axis
Invert the anchor and gravity on the y axis if the surface is constrained on the y axis. For example, if the bottom edge of the surface is constrained, the gravity is 'bottom' and the anchor is 'bottom', change the gravity to 'top' and the anchor to 'top'.
If the adjusted position also ends up being constrained, the resulting position of the flip_y adjustment will be the one before the adjustment.
pub const ResizeX: ConstraintAdjustment
[src]
horizontally resize the surface
Resize the surface horizontally so that it is completely unconstrained.
pub const ResizeY: ConstraintAdjustment
[src]
vertically resize the surface
Resize the surface vertically so that it is completely unconstrained.
pub const fn empty() -> ConstraintAdjustment
[src]
Returns an empty set of flags
pub const fn all() -> ConstraintAdjustment
[src]
Returns the set containing all flags.
pub const fn bits(&self) -> u32
[src]
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u32) -> Option<ConstraintAdjustment>
[src]
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u32) -> ConstraintAdjustment
[src]
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u32) -> ConstraintAdjustment
[src]
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
pub const fn is_empty(&self) -> bool
[src]
Returns true
if no flags are currently stored.
pub const fn is_all(&self) -> bool
[src]
Returns true
if all flags are currently set.
pub const fn intersects(&self, other: ConstraintAdjustment) -> bool
[src]
Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: ConstraintAdjustment) -> bool
[src]
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: ConstraintAdjustment)
[src]
Inserts the specified flags in-place.
pub fn remove(&mut self, other: ConstraintAdjustment)
[src]
Removes the specified flags in-place.
pub fn toggle(&mut self, other: ConstraintAdjustment)
[src]
Toggles the specified flags in-place.
pub fn set(&mut self, other: ConstraintAdjustment, value: bool)
[src]
Inserts or removes the specified flags depending on the passed value.
impl ConstraintAdjustment
[src]
Trait Implementations
impl Binary for ConstraintAdjustment
[src]
impl BitAnd<ConstraintAdjustment> for ConstraintAdjustment
[src]
type Output = ConstraintAdjustment
The resulting type after applying the &
operator.
fn bitand(self, other: ConstraintAdjustment) -> ConstraintAdjustment
[src]
Returns the intersection between the two sets of flags.
impl BitAndAssign<ConstraintAdjustment> for ConstraintAdjustment
[src]
fn bitand_assign(&mut self, other: ConstraintAdjustment)
[src]
Disables all flags disabled in the set.
impl BitOr<ConstraintAdjustment> for ConstraintAdjustment
[src]
type Output = ConstraintAdjustment
The resulting type after applying the |
operator.
fn bitor(self, other: ConstraintAdjustment) -> ConstraintAdjustment
[src]
Returns the union of the two sets of flags.
impl BitOrAssign<ConstraintAdjustment> for ConstraintAdjustment
[src]
fn bitor_assign(&mut self, other: ConstraintAdjustment)
[src]
Adds the set of flags.
impl BitXor<ConstraintAdjustment> for ConstraintAdjustment
[src]
type Output = ConstraintAdjustment
The resulting type after applying the ^
operator.
fn bitxor(self, other: ConstraintAdjustment) -> ConstraintAdjustment
[src]
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign<ConstraintAdjustment> for ConstraintAdjustment
[src]
fn bitxor_assign(&mut self, other: ConstraintAdjustment)
[src]
Toggles the set of flags.
impl Clone for ConstraintAdjustment
[src]
fn clone(&self) -> ConstraintAdjustment
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ConstraintAdjustment
[src]
impl Debug for ConstraintAdjustment
[src]
impl Eq for ConstraintAdjustment
[src]
impl Extend<ConstraintAdjustment> for ConstraintAdjustment
[src]
fn extend<T: IntoIterator<Item = ConstraintAdjustment>>(&mut self, iterator: T)
[src]
fn extend_one(&mut self, item: A)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]
impl FromIterator<ConstraintAdjustment> for ConstraintAdjustment
[src]
fn from_iter<T: IntoIterator<Item = ConstraintAdjustment>>(
iterator: T
) -> ConstraintAdjustment
[src]
iterator: T
) -> ConstraintAdjustment
impl Hash for ConstraintAdjustment
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LowerHex for ConstraintAdjustment
[src]
impl Not for ConstraintAdjustment
[src]
type Output = ConstraintAdjustment
The resulting type after applying the !
operator.
fn not(self) -> ConstraintAdjustment
[src]
Returns the complement of this set of flags.
impl Octal for ConstraintAdjustment
[src]
impl Ord for ConstraintAdjustment
[src]
fn cmp(&self, other: &ConstraintAdjustment) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<ConstraintAdjustment> for ConstraintAdjustment
[src]
fn eq(&self, other: &ConstraintAdjustment) -> bool
[src]
fn ne(&self, other: &ConstraintAdjustment) -> bool
[src]
impl PartialOrd<ConstraintAdjustment> for ConstraintAdjustment
[src]
fn partial_cmp(&self, other: &ConstraintAdjustment) -> Option<Ordering>
[src]
fn lt(&self, other: &ConstraintAdjustment) -> bool
[src]
fn le(&self, other: &ConstraintAdjustment) -> bool
[src]
fn gt(&self, other: &ConstraintAdjustment) -> bool
[src]
fn ge(&self, other: &ConstraintAdjustment) -> bool
[src]
impl StructuralEq for ConstraintAdjustment
[src]
impl StructuralPartialEq for ConstraintAdjustment
[src]
impl Sub<ConstraintAdjustment> for ConstraintAdjustment
[src]
type Output = ConstraintAdjustment
The resulting type after applying the -
operator.
fn sub(self, other: ConstraintAdjustment) -> ConstraintAdjustment
[src]
Returns the set difference of the two sets of flags.
impl SubAssign<ConstraintAdjustment> for ConstraintAdjustment
[src]
fn sub_assign(&mut self, other: ConstraintAdjustment)
[src]
Disables all flags enabled in the set.
impl UpperHex for ConstraintAdjustment
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConstraintAdjustment
impl Send for ConstraintAdjustment
impl Sync for ConstraintAdjustment
impl Unpin for ConstraintAdjustment
impl UnwindSafe for ConstraintAdjustment
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,