Struct MoveFrom
pub struct MoveFrom { /* private fields */ }Expand description
Where a drag moves a floating window besides its move handle and its title bar, which
always move it; set with FloatsArea::move_from. By default
BAR: only them. Combine the others with |:
// Empty space, and Alt+drag anywhere.
let from = MoveFrom::EMPTY_SPACE | MoveFrom::modifier(egui::Modifiers::ALT);
assert!(from.empty_space());
assert_eq!(from.modifiers(), egui::Modifiers::ALT);A move from anywhere goes as one by the handle: FloatMove says whether it can dock the
window. The move handle stays, named for screen readers, for those who move the window
otherwise (TabViewer::on_window_handle).
Implementations§
§impl MoveFrom
impl MoveFrom
pub const EMPTY_SPACE: MoveFrom
pub const EMPTY_SPACE: MoveFrom
A drag on any part of the float no widget takes a drag from moves it too: the empty part
of a tab bar (which then no longer drags its group, GroupHandles::EMPTY_SPACE), the
background of a tab’s body. Its content keeps its own drags: a slider, a tab, a scroll
area, a separator.
pub const fn modifier(modifiers: Modifiers) -> MoveFrom
pub const fn modifier(modifiers: Modifiers) -> MoveFrom
A drag begun with modifiers held moves the float from anywhere in it, over its widgets
too, as window managers move a window by Alt+drag or Super+drag. Modifiers::NONE
turns it off.
pub const fn empty_space(self) -> bool
pub const fn empty_space(self) -> bool
Whether a drag on the float’s empty space moves it.
pub const fn modifiers(self) -> Modifiers
pub const fn modifiers(self) -> Modifiers
The modifiers that make a drag anywhere in the float move it; Modifiers::NONE when
none does.
Trait Implementations§
impl Copy for MoveFrom
impl Eq for MoveFrom
impl StructuralPartialEq for MoveFrom
Auto Trait Implementations§
impl Freeze for MoveFrom
impl RefUnwindSafe for MoveFrom
impl Send for MoveFrom
impl Sync for MoveFrom
impl Unpin for MoveFrom
impl UnsafeUnpin for MoveFrom
impl UnwindSafe for MoveFrom
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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