pub trait DockingModel: 'static {
type TabId: Copy + PartialEq + Hash + 'static;
type PanelId: Copy + PartialEq + 'static;
type DropValue: Clone + PartialEq + 'static + From<Self::TabId>;
// Required methods
fn root(&self) -> Option<&DockNode<Self::TabId, Self::PanelId>>;
fn on_drop(
&mut self,
value: Self::DropValue,
target: DropTarget<Self::PanelId>,
) -> bool;
fn set_active(
&mut self,
panel_id: Self::PanelId,
tab_id: Self::TabId,
) -> bool;
}Required Associated Types§
Required Methods§
Sourcefn root(&self) -> Option<&DockNode<Self::TabId, Self::PanelId>>
fn root(&self) -> Option<&DockNode<Self::TabId, Self::PanelId>>
The current tree of panels and splits, or None when it’s empty.
Sourcefn on_drop(
&mut self,
value: Self::DropValue,
target: DropTarget<Self::PanelId>,
) -> bool
fn on_drop( &mut self, value: Self::DropValue, target: DropTarget<Self::PanelId>, ) -> bool
Apply a dropped Self::DropValue at target. Returns true if
something changed.
Sourcefn set_active(&mut self, panel_id: Self::PanelId, tab_id: Self::TabId) -> bool
fn set_active(&mut self, panel_id: Self::PanelId, tab_id: Self::TabId) -> bool
Make tab_id the active one in panel_id. Returns true if it was found.