pub struct DockPolicy {
pub allow_activity_drag: bool,
pub allow_dock_drag: bool,
pub allow_side_collapse: bool,
pub allow_activity_hide: bool,
}Expand description
App-declared policy that locks down end-user layout edits on a
DockingLayout. Each flag removes a user
affordance only — the programmatic DockingModel API (a “Toggle panel”
button, open_dock, set_tab_hidden, …) keeps working regardless, so the
app can still drive the layout it has locked for the user.
App-declared each run (like rail_thickness / min_size / DockRail)
— not persisted in DockLayoutState. Set it with
DockingModel::set_policy. Default = everything allowed; DockPolicy::locked
= everything forbidden.
Fields§
§allow_activity_drag: boolThe user may drag activities (rail items / tab headers) to reorder them
or move them between sides, and relocate them via the context-menu
“Move to” submenu. Default true.
allow_dock_drag: boolThe user may drag a single dock out of a split pane (its accordion
header is a drag handle). Default true.
allow_side_collapse: boolThe user may hide / collapse a whole side — via the resize handle
(drag-past-min snap, double-click, keyboard) or by clicking the active
activity-rail item. Default true.
allow_activity_hide: boolThe user may hide an activity from the context menu. Default true.
Implementations§
Source§impl DockPolicy
impl DockPolicy
Trait Implementations§
Source§impl Clone for DockPolicy
impl Clone for DockPolicy
Source§fn clone(&self) -> DockPolicy
fn clone(&self) -> DockPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DockPolicy
Source§impl Debug for DockPolicy
impl Debug for DockPolicy
Source§impl Default for DockPolicy
impl Default for DockPolicy
impl Eq for DockPolicy
Source§impl PartialEq for DockPolicy
impl PartialEq for DockPolicy
Source§fn eq(&self, other: &DockPolicy) -> bool
fn eq(&self, other: &DockPolicy) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DockPolicy
Auto Trait Implementations§
impl Freeze for DockPolicy
impl RefUnwindSafe for DockPolicy
impl Send for DockPolicy
impl Sync for DockPolicy
impl Unpin for DockPolicy
impl UnsafeUnpin for DockPolicy
impl UnwindSafe for DockPolicy
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
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,
§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<T> ErasedDestructor for Twhere
T: 'static,
§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