pub struct DockGraph { /* private fields */ }Implementations§
Source§impl DockGraph
impl DockGraph
pub fn apply_op_checked( &mut self, op: &DockOp, ) -> Result<bool, DockOpApplyError>
pub fn apply_op(&mut self, op: &DockOp) -> bool
Source§impl DockGraph
impl DockGraph
pub fn move_panel( &mut self, window: AppWindowId, panel: PanelKey, target_tabs: DockNodeId, zone: DropZone, ) -> bool
pub fn move_panel_with_insert_index( &mut self, window: AppWindowId, panel: PanelKey, target_tabs: DockNodeId, zone: DropZone, insert_index: Option<usize>, ) -> bool
pub fn move_panel_between_windows( &mut self, source_window: AppWindowId, panel: PanelKey, target_window: AppWindowId, target_tabs: DockNodeId, zone: DropZone, insert_index: Option<usize>, ) -> bool
pub fn move_tabs_between_windows( &mut self, source_window: AppWindowId, source_tabs: DockNodeId, target_window: AppWindowId, target_tabs: DockNodeId, zone: DropZone, insert_index: Option<usize>, ) -> bool
pub fn close_panel(&mut self, window: AppWindowId, panel: PanelKey) -> bool
pub fn float_panel_to_window( &mut self, source_window: AppWindowId, panel: PanelKey, new_window: AppWindowId, ) -> bool
pub fn float_tabs_to_window( &mut self, source_window: AppWindowId, source_tabs: DockNodeId, new_window: AppWindowId, ) -> bool
pub fn float_panel_in_window( &mut self, source_window: AppWindowId, panel: PanelKey, target_window: AppWindowId, rect: Rect, ) -> bool
pub fn float_tabs_in_window( &mut self, source_window: AppWindowId, source_tabs: DockNodeId, target_window: AppWindowId, rect: Rect, ) -> bool
pub fn set_floating_rect( &mut self, window: AppWindowId, floating: DockNodeId, rect: Rect, ) -> bool
pub fn raise_floating( &mut self, window: AppWindowId, floating: DockNodeId, ) -> bool
pub fn merge_floating_into( &mut self, window: AppWindowId, floating: DockNodeId, target_tabs: DockNodeId, ) -> bool
pub fn set_active_tab(&mut self, tabs: DockNodeId, active: usize) -> bool
pub fn update_split_two( &mut self, split: DockNodeId, first_fraction: f32, ) -> bool
pub fn update_split_fractions( &mut self, split: DockNodeId, next: Vec<f32>, ) -> bool
Source§impl DockGraph
impl DockGraph
pub fn export_layout(&self, windows: &[(AppWindowId, String)]) -> DockLayout
pub fn export_layout_with_placement( &self, windows: &[(AppWindowId, String)], placement: impl FnMut(AppWindowId) -> Option<DockWindowPlacement>, ) -> DockLayout
pub fn import_subtree_from_layout( &mut self, layout: &DockLayout, root: u32, ) -> Option<DockNodeId>
pub fn import_subtree_from_layout_checked( &mut self, layout: &DockLayout, root: u32, ) -> Result<DockNodeId, DockLayoutValidationError>
pub fn import_layout_for_windows( &mut self, layout: &DockLayout, windows: &[(AppWindowId, String)], ) -> bool
pub fn import_layout_for_windows_checked( &mut self, layout: &DockLayout, windows: &[(AppWindowId, String)], ) -> Result<bool, DockLayoutValidationError>
Sourcepub fn import_layout_for_windows_with_fallback_floatings(
&mut self,
layout: &DockLayout,
windows: &[(AppWindowId, String)],
fallback_window: AppWindowId,
) -> bool
pub fn import_layout_for_windows_with_fallback_floatings( &mut self, layout: &DockLayout, windows: &[(AppWindowId, String)], fallback_window: AppWindowId, ) -> bool
Import a dock layout for a set of known windows, degrading any unmapped logical windows
into in-window floating containers inside fallback_window.
This enables loading multi-window layouts on platforms that do not support multiple OS
windows (wasm/mobile). The extra logical windows become floating dock containers rendered
by the dock host in fallback_window.
pub fn import_layout_for_windows_with_fallback_floatings_checked( &mut self, layout: &DockLayout, windows: &[(AppWindowId, String)], fallback_window: AppWindowId, ) -> Result<bool, DockLayoutValidationError>
Source§impl DockGraph
impl DockGraph
Sourcepub fn edge_dock_decision(
&self,
window: AppWindowId,
target: DockNodeId,
zone: DropZone,
) -> Option<EdgeDockDecision>
pub fn edge_dock_decision( &self, window: AppWindowId, target: DockNodeId, zone: DropZone, ) -> Option<EdgeDockDecision>
Decide whether an edge-dock into target will insert into an existing same-axis split, or
wrap the target in a new split.
Returns None for DropZone::Center (not an edge dock) or if the target is not present in
the window’s dock forest.
pub fn compute_layout( &self, root: DockNodeId, bounds: Rect, out: &mut HashMap<DockNodeId, Rect>, )
pub fn find_panel_in_window( &self, window: AppWindowId, panel: &PanelKey, ) -> Option<(DockNodeId, usize)>
pub fn windows(&self) -> Vec<AppWindowId>
pub fn collect_panels_in_window(&self, window: AppWindowId) -> Vec<PanelKey>
pub fn first_tabs_in_window(&self, window: AppWindowId) -> Option<DockNodeId>
Source§impl DockGraph
impl DockGraph
pub fn new() -> Self
pub fn insert_node(&mut self, node: DockNode) -> DockNodeId
pub fn node(&self, id: DockNodeId) -> Option<&DockNode>
pub fn node_mut(&mut self, id: DockNodeId) -> Option<&mut DockNode>
pub fn set_window_root(&mut self, window: AppWindowId, root: DockNodeId)
pub fn window_root(&self, window: AppWindowId) -> Option<DockNodeId>
pub fn remove_window_root(&mut self, window: AppWindowId) -> Option<DockNodeId>
pub fn floating_windows(&self, window: AppWindowId) -> &[DockFloatingWindow]
pub fn floating_windows_mut( &mut self, window: AppWindowId, ) -> &mut Vec<DockFloatingWindow>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DockGraph
impl RefUnwindSafe for DockGraph
impl Send for DockGraph
impl Sync for DockGraph
impl Unpin for DockGraph
impl UnsafeUnpin for DockGraph
impl UnwindSafe for DockGraph
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