pub enum DockLayout {
Tabs(Vec<WindowKey>),
Split {
direction: DockSplit,
ratio: f32,
first: Box<DockLayout>,
second: Box<DockLayout>,
},
}Expand description
A complete declarative dock tree.
Variants§
Tabs(Vec<WindowKey>)
One leaf node containing zero or more tabbed windows.
An empty list intentionally leaves the leaf available as an empty docking target. Dear ImGui’s builder does not preserve the relative order of these windows.
Split
Split a node and recursively populate both resulting children.
Fields
§
first: Box<DockLayout>Layout placed on direction’s side.
§
second: Box<DockLayout>Layout placed in the remaining space.
Implementations§
Source§impl DockLayout
impl DockLayout
Sourcepub fn tabs(windows: impl IntoIterator<Item = impl Into<WindowKey>>) -> Self
pub fn tabs(windows: impl IntoIterator<Item = impl Into<WindowKey>>) -> Self
Create one tab leaf from stable window keys.
Sourcepub fn split(
direction: DockSplit,
ratio: f32,
first: DockLayout,
second: DockLayout,
) -> Self
pub fn split( direction: DockSplit, ratio: f32, first: DockLayout, second: DockLayout, ) -> Self
Split a node into a directional child and the remaining child.
Sourcepub fn validate(&self) -> Result<(), DockspaceError>
pub fn validate(&self) -> Result<(), DockspaceError>
Validate the complete layout without touching Dear ImGui state.
Trait Implementations§
Source§impl Clone for DockLayout
impl Clone for DockLayout
Source§fn clone(&self) -> DockLayout
fn clone(&self) -> DockLayout
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 DockLayout
impl Debug for DockLayout
Source§impl PartialEq for DockLayout
impl PartialEq for DockLayout
impl StructuralPartialEq for DockLayout
Auto Trait Implementations§
impl Freeze for DockLayout
impl RefUnwindSafe for DockLayout
impl Send for DockLayout
impl Sync for DockLayout
impl Unpin for DockLayout
impl UnsafeUnpin for DockLayout
impl UnwindSafe for DockLayout
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