#[repr(C)]pub enum MenuPopupPosition {
BottomLeftOfCursor = 0,
BottomRightOfCursor = 1,
TopLeftOfCursor = 2,
TopRightOfCursor = 3,
BottomOfHitRect = 4,
LeftOfHitRect = 5,
TopOfHitRect = 6,
RightOfHitRect = 7,
AutoCursor = 8,
AutoHitRect = 9,
}Expand description
Specifies where a popup menu should appear relative to the cursor or clicked element.
This positioning information is ignored for application-level menus (menu bars) and only applies to context menus and dropdowns.
Variants§
BottomLeftOfCursor = 0
Position menu below and to the left of the cursor
BottomRightOfCursor = 1
Position menu below and to the right of the cursor
TopLeftOfCursor = 2
Position menu above and to the left of the cursor
TopRightOfCursor = 3
Position menu above and to the right of the cursor
BottomOfHitRect = 4
Position menu below the rectangle that was clicked
LeftOfHitRect = 5
Position menu to the left of the rectangle that was clicked
TopOfHitRect = 6
Position menu above the rectangle that was clicked
RightOfHitRect = 7
Position menu to the right of the rectangle that was clicked
AutoCursor = 8
Automatically calculate position based on available screen space near cursor
AutoHitRect = 9
Automatically calculate position based on available screen space near clicked rect
Trait Implementations§
Source§impl Clone for MenuPopupPosition
impl Clone for MenuPopupPosition
Source§fn clone(&self) -> MenuPopupPosition
fn clone(&self) -> MenuPopupPosition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MenuPopupPosition
impl Debug for MenuPopupPosition
Source§impl Default for MenuPopupPosition
impl Default for MenuPopupPosition
Source§impl Hash for MenuPopupPosition
impl Hash for MenuPopupPosition
Source§impl Ord for MenuPopupPosition
impl Ord for MenuPopupPosition
Source§fn cmp(&self, other: &MenuPopupPosition) -> Ordering
fn cmp(&self, other: &MenuPopupPosition) -> 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 MenuPopupPosition
impl PartialEq for MenuPopupPosition
Source§impl PartialOrd for MenuPopupPosition
impl PartialOrd for MenuPopupPosition
impl Copy for MenuPopupPosition
impl Eq for MenuPopupPosition
impl StructuralPartialEq for MenuPopupPosition
Auto Trait Implementations§
impl Freeze for MenuPopupPosition
impl RefUnwindSafe for MenuPopupPosition
impl Send for MenuPopupPosition
impl Sync for MenuPopupPosition
impl Unpin for MenuPopupPosition
impl UnwindSafe for MenuPopupPosition
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