#[non_exhaustive]pub struct DockControls {
pub eject_group: bool,
pub group_menus: bool,
pub float_move_from: MoveFrom,
pub add_buttons: bool,
}Expand description
The controls the workbench’s docks show beyond the tabs, as the
application sets them (AppBuilder::dock_controls).
Each follows egui_stack’s default: what is off there is off here.
use egui_pop_api::workbench::{DockControls, MoveFrom};
let controls = DockControls::default()
.eject_group(true)
.float_move_from(MoveFrom::BAR | MoveFrom::EMPTY_SPACE);
assert!(controls.eject_group);
assert!(controls.group_menus);Need (layout): a tab bar button that moves a whole tab group into a window of its own.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.eject_group: boolAn “Eject group” button on each docked tab bar: clicked, the
whole group, its tabs in order, moves into a window of its own
(the workbench.detach step with group). Off by default.
A right click on the empty part of a tab bar opens the group’s menu (egui_stack’s group context menu: “Move group”, and the items its bar’s buttons offer). On by default.
float_move_from: MoveFromWhere else than its move handle a drag moves a floating window
(egui_stack’s FloatsArea::move_from): MoveFrom::BAR by
default.
A “+” at the end of each tab bar, docked or floating: it lists the
closed panels that may open in that group and opens the one chosen
there (pop.panel.open with here). Off by default.
Implementations§
Source§impl DockControls
impl DockControls
Sourcepub fn eject_group(self, on: bool) -> Self
pub fn eject_group(self, on: bool) -> Self
Shows the “Eject group” button on docked tab bars, or not.
Opens a group’s menu on a right click of its bar’s empty part, or not.
Shows a “+” at the end of each tab bar, opening a closed panel there, or not.
Sourcepub fn float_move_from(self, from: MoveFrom) -> Self
pub fn float_move_from(self, from: MoveFrom) -> Self
Where else than its move handle a drag moves a floating window.
Trait Implementations§
Source§impl Clone for DockControls
impl Clone for DockControls
Source§fn clone(&self) -> DockControls
fn clone(&self) -> DockControls
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DockControls
impl Debug for DockControls
Source§impl Default for DockControls
impl Default for DockControls
Source§impl PartialEq for DockControls
impl PartialEq for DockControls
impl Copy for DockControls
impl Eq for DockControls
impl StructuralPartialEq for DockControls
Auto Trait Implementations§
impl Freeze for DockControls
impl RefUnwindSafe for DockControls
impl Send for DockControls
impl Sync for DockControls
impl Unpin for DockControls
impl UnsafeUnpin for DockControls
impl UnwindSafe for DockControls
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