#[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 (const: unstable) · 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 (const: unstable) · 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§fn eq(&self, other: &MenuPopupPosition) -> bool
fn eq(&self, other: &MenuPopupPosition) -> bool
self and other values to be equal, and is used by ==.