[][src]Struct wayland_protocols::unstable::xdg_shell::v6::client::zxdg_positioner_v6::ConstraintAdjustment

pub struct ConstraintAdjustment { /* fields omitted */ }

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]

impl Copy for ConstraintAdjustment[src]

impl Debug for ConstraintAdjustment[src]

impl Eq for ConstraintAdjustment[src]

impl Extend<ConstraintAdjustment> for ConstraintAdjustment[src]

impl FromIterator<ConstraintAdjustment> for ConstraintAdjustment[src]

impl Hash for ConstraintAdjustment[src]

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]

impl PartialEq<ConstraintAdjustment> for ConstraintAdjustment[src]

impl PartialOrd<ConstraintAdjustment> for ConstraintAdjustment[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

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

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

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

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.