pub enum WindowPosition {
Center,
CenterOnDisplay(DisplayId),
TrayCenter(Bounds<Pixels>),
TopRight {
margin: Pixels,
},
BottomRight {
margin: Pixels,
},
TopLeft {
margin: Pixels,
},
BottomLeft {
margin: Pixels,
},
}Expand description
重导出平台抽象层相关类型 语义化窗口位置,用于计算窗口的屏幕位置
Variants§
Center
在主显示区域居中
CenterOnDisplay(DisplayId)
在指定显示区域居中
TrayCenter(Bounds<Pixels>)
在托盘图标上方居中
TopRight
屏幕右上角(带边距)
BottomRight
屏幕右下角(带边距)
TopLeft
屏幕左上角(带边距)
BottomLeft
屏幕左下角(带边距)
Trait Implementations§
Source§impl Clone for WindowPosition
impl Clone for WindowPosition
impl Copy for WindowPosition
Source§impl Debug for WindowPosition
impl Debug for WindowPosition
Source§impl PartialEq for WindowPosition
impl PartialEq for WindowPosition
impl StructuralPartialEq for WindowPosition
Auto Trait Implementations§
impl Forget for WindowPosition
impl Freeze for WindowPosition
impl Move for WindowPosition
impl RefUnwindSafe for WindowPosition
impl Send for WindowPosition
impl Sync for WindowPosition
impl Unpin for WindowPosition
impl UnsafeUnpin for WindowPosition
impl UnwindSafe for WindowPosition
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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