Struct GroupHandles
pub struct GroupHandles(/* private fields */);Expand description
The handles that move a whole tab group (a leaf with all its tabs), set with
DockArea::group_handles. A set of flags: combine them
with |. By default every handle is on (ALL). A floating window’s move
handle (MOVE_WINDOW) is set here too: it moves the window, not a
group.
A group moved by any handle goes through the same drop zones as a dragged tab, keeps its tabs
in order and its active tab, follows the viewer’s veto
(TabViewer::dock_drop_allowed), and Escape cancels
its drag. A handle that is off is neither drawn nor reacts.
DockArea::drag_group_by and
DockArea::hidden_tab_bar_drags_group are
handles an application asks for itself; these flags do not turn them off.
// The grip and the menu only: no drag from the empty part of the bar, nor with a modifier.
let handles = GroupHandles::GRIP | GroupHandles::MENU;
assert!(handles.contains(GroupHandles::GRIP));
assert!(!handles.contains(GroupHandles::EMPTY_SPACE));Implementations§
§impl GroupHandles
impl GroupHandles
pub const NONE: GroupHandles
pub const NONE: GroupHandles
No handle: a group moves only tab by tab.
pub const EMPTY_SPACE: GroupHandles
pub const EMPTY_SPACE: GroupHandles
The empty part of the tab bar, right of the last tab. A tab bar full of tabs has none.
pub const GRIP: GroupHandles
pub const GRIP: GroupHandles
A grip always present at the end of each tab bar, whatever the number of tabs. Clicked or
opened by the keyboard, it shows the group’s Move group menu when MENU
is on too.
pub const MODIFIER_DRAG: GroupHandles
pub const MODIFIER_DRAG: GroupHandles
A tab dragged with DockArea::group_drag_modifiers
held (Shift by default) carries its whole group.
pub const MENU: GroupHandles
pub const MENU: GroupHandles
“Move group” in the tab’s context menu (and the grip’s): the places the group can go,
a new window and, in a DockSpace, its other docks.
pub const MOVE_WINDOW: GroupHandles
pub const MOVE_WINDOW: GroupHandles
A move handle at the end of a floating window’s top tab bar, apart from the group grip:
it moves the window, not a group. On a native float the system moves it
([egui::ViewportCommand::StartDrag]), on a float over the main window the
egui::Window moves; the pointer shows [egui::CursorIcon::Move] over it. Whether the
move can also dock the window is FloatsArea::float_move.
It is no keyboard stop; TabViewer::on_window_handle
gives the application its response, to make it one.
Only floats drawn by a FloatsArea have one.
pub const ALL: GroupHandles
pub const ALL: GroupHandles
Every handle.
pub const fn contains(self, other: GroupHandles) -> bool
pub const fn contains(self, other: GroupHandles) -> bool
Whether every flag of other is set.
pub const fn with(self, flag: GroupHandles, on: bool) -> GroupHandles
pub const fn with(self, flag: GroupHandles, on: bool) -> GroupHandles
These flags with flag set or cleared.
pub const fn intersection(self, other: GroupHandles) -> GroupHandles
pub const fn intersection(self, other: GroupHandles) -> GroupHandles
The flags set in both: an application’s allowed set narrowed by a user’s setting.
Trait Implementations§
§impl BitAnd for GroupHandles
impl BitAnd for GroupHandles
§type Output = GroupHandles
type Output = GroupHandles
& operator.§fn bitand(self, rhs: GroupHandles) -> GroupHandles
fn bitand(self, rhs: GroupHandles) -> GroupHandles
& operation. Read more§impl BitAndAssign for GroupHandles
impl BitAndAssign for GroupHandles
§fn bitand_assign(&mut self, rhs: GroupHandles)
fn bitand_assign(&mut self, rhs: GroupHandles)
&= operation. Read more§impl BitOr for GroupHandles
impl BitOr for GroupHandles
§type Output = GroupHandles
type Output = GroupHandles
| operator.§fn bitor(self, rhs: GroupHandles) -> GroupHandles
fn bitor(self, rhs: GroupHandles) -> GroupHandles
| operation. Read more§impl BitOrAssign for GroupHandles
impl BitOrAssign for GroupHandles
§fn bitor_assign(&mut self, rhs: GroupHandles)
fn bitor_assign(&mut self, rhs: GroupHandles)
|= operation. Read more§impl Clone for GroupHandles
impl Clone for GroupHandles
§fn clone(&self) -> GroupHandles
fn clone(&self) -> GroupHandles
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for GroupHandles
impl Debug for GroupHandles
§impl Default for GroupHandles
impl Default for GroupHandles
§fn default() -> GroupHandles
fn default() -> GroupHandles
§impl<'de> Deserialize<'de> for GroupHandles
impl<'de> Deserialize<'de> for GroupHandles
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GroupHandles, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GroupHandles, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Hash for GroupHandles
impl Hash for GroupHandles
§impl Not for GroupHandles
impl Not for GroupHandles
§type Output = GroupHandles
type Output = GroupHandles
! operator.§fn not(self) -> GroupHandles
fn not(self) -> GroupHandles
! operation. Read more§impl PartialEq for GroupHandles
impl PartialEq for GroupHandles
§impl Serialize for GroupHandles
impl Serialize for GroupHandles
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for GroupHandles
impl Eq for GroupHandles
impl StructuralPartialEq for GroupHandles
Auto Trait Implementations§
impl Freeze for GroupHandles
impl RefUnwindSafe for GroupHandles
impl Send for GroupHandles
impl Sync for GroupHandles
impl Unpin for GroupHandles
impl UnsafeUnpin for GroupHandles
impl UnwindSafe for GroupHandles
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