pub enum WindowDrag {
Off,
Anywhere,
TitleBar,
OnTouch,
}Expand description
Where the user can drag to move a Window.
See Window::drag_area.
Variants§
Off
Window cannot be moved by dragging.
Window::movable(false) forces this regardless of
what was passed to Window::drag_area.
Anywhere
The user can drag the window from anywhere on its surface.
Good for touch screens, but can interfere with selecting / dragging content inside the window when used with a mouse.
TitleBar
Only the title bar accepts the move-drag gesture.
Windows without a title bar (see Window::title_bar) silently fall
back to Self::Anywhere — otherwise they’d be unmovable.
OnTouch
Self::Anywhere when a touch screen is detected (see
crate::InputState::has_touch_screen); Self::TitleBar otherwise.
The recommended default.
Trait Implementations§
Source§impl Clone for WindowDrag
impl Clone for WindowDrag
Source§fn clone(&self) -> WindowDrag
fn clone(&self) -> WindowDrag
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WindowDrag
Source§impl Debug for WindowDrag
impl Debug for WindowDrag
Source§impl Default for WindowDrag
impl Default for WindowDrag
Source§fn default() -> WindowDrag
fn default() -> WindowDrag
Returns the “default value” for a type. Read more
impl Eq for WindowDrag
Source§impl PartialEq for WindowDrag
impl PartialEq for WindowDrag
impl StructuralPartialEq for WindowDrag
Auto Trait Implementations§
impl Freeze for WindowDrag
impl RefUnwindSafe for WindowDrag
impl Send for WindowDrag
impl Sync for WindowDrag
impl Unpin for WindowDrag
impl UnsafeUnpin for WindowDrag
impl UnwindSafe for WindowDrag
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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