pub struct DockPanelOptions {
pub title: String,
pub icon: Option<IconGlyph>,
pub closable: bool,
pub dirty: bool,
pub min_size: Size,
}Expand description
Presentation and behavior of one dock panel’s tab.
Options are owned by the workspace’s panel registry. Change them after
registration with DockWorkspaceState::update_panel.
Fields§
§title: String§icon: Option<IconGlyph>§closable: boolShows a close button on the tab. A close press is routed through
DockWorkspace::on_close_request.
dirty: boolMarks the tab as holding unsaved changes.
min_size: SizeSmallest content size the panel remains usable at. Splits keep every docked group, and the workspace keeps every floating group, at least this large while the workspace has room.
Implementations§
Source§impl DockPanelOptions
impl DockPanelOptions
pub fn new(title: impl Into<String>) -> DockPanelOptions
pub fn icon(self, icon: IconGlyph) -> DockPanelOptions
pub fn closable(self, closable: bool) -> DockPanelOptions
pub fn dirty(self, dirty: bool) -> DockPanelOptions
pub fn min_size(self, min_size: Size) -> DockPanelOptions
Trait Implementations§
Source§impl Clone for DockPanelOptions
impl Clone for DockPanelOptions
Source§fn clone(&self) -> DockPanelOptions
fn clone(&self) -> DockPanelOptions
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 moreSource§impl Debug for DockPanelOptions
impl Debug for DockPanelOptions
Source§impl From<&str> for DockPanelOptions
impl From<&str> for DockPanelOptions
Source§fn from(title: &str) -> DockPanelOptions
fn from(title: &str) -> DockPanelOptions
Converts to this type from the input type.
Source§impl From<String> for DockPanelOptions
impl From<String> for DockPanelOptions
Source§fn from(title: String) -> DockPanelOptions
fn from(title: String) -> DockPanelOptions
Converts to this type from the input type.
Source§impl PartialEq for DockPanelOptions
impl PartialEq for DockPanelOptions
impl StructuralPartialEq for DockPanelOptions
Auto Trait Implementations§
impl Forget for DockPanelOptions
impl Freeze for DockPanelOptions
impl Move for DockPanelOptions
impl RefUnwindSafe for DockPanelOptions
impl Send for DockPanelOptions
impl Sync for DockPanelOptions
impl Unpin for DockPanelOptions
impl UnsafeUnpin for DockPanelOptions
impl UnwindSafe for DockPanelOptions
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.