pub struct DockArea<'tree, Tab> { /* private fields */ }
Expand description
Displays a DockState
in egui
.
Implementations§
source§impl<'tree, Tab> DockArea<'tree, Tab>
impl<'tree, Tab> DockArea<'tree, Tab>
sourcepub fn show(self, ctx: &Context, tab_viewer: &mut impl TabViewer<Tab = Tab>)
pub fn show(self, ctx: &Context, tab_viewer: &mut impl TabViewer<Tab = Tab>)
Show the DockArea
at the top level.
This is the same as doing:
CentralPanel::default()
.frame(Frame::central_panel(&ctx.style()).inner_margin(0.))
.show(ctx, |ui| {
DockArea::new(&mut tree).show_inside(ui, &mut tab_viewer);
});
So you can’t use the CentralPanel::show
when using DockArea
’s one.
See also show_inside
.
source§impl<'tree, Tab> DockArea<'tree, Tab>
impl<'tree, Tab> DockArea<'tree, Tab>
sourcepub fn show_add_popup(self, show_add_popup: bool) -> Self
pub fn show_add_popup(self, show_add_popup: bool) -> Self
Shows or hides the add button popup.
By default it’s false
.
Shows or hides the tab add buttons.
By default it’s false
.
Shows or hides the tab close buttons.
By default it’s true
.
Whether tabs show a context menu when right-clicked.
By default it’s true
.
sourcepub fn draggable_tabs(self, draggable_tabs: bool) -> Self
pub fn draggable_tabs(self, draggable_tabs: bool) -> Self
Whether tabs can be dragged between nodes and reordered on the tab bar.
By default it’s true
.
sourcepub fn show_tab_name_on_hover(self, show_tab_name_on_hover: bool) -> Self
pub fn show_tab_name_on_hover(self, show_tab_name_on_hover: bool) -> Self
Whether tabs show their name when hovered over them.
By default it’s false
.
sourcepub fn allowed_splits(self, allowed_splits: AllowedSplits) -> Self
pub fn allowed_splits(self, allowed_splits: AllowedSplits) -> Self
What directions can a node be split in: left-right, top-bottom, all, or none. By default it’s all.
sourcepub fn window_bounds(self, bounds: Rect) -> Self
pub fn window_bounds(self, bounds: Rect) -> Self
The bounds for any windows inside the DockArea
. Defaults to the screen rect.
By default it’s set to egui::Context::screen_rect
.
Enables or disables the close button on windows.
By default it’s true
.
Enables or disables the collapsing header on windows.
By default it’s true
.