pub struct DockBuilder;Expand description
DockBuilder API for programmatic dock layout creation
Implementations§
Source§impl DockBuilder
impl DockBuilder
Sourcepub fn get_node(node_id: ImGuiID) -> *mut ImGuiDockNode
pub fn get_node(node_id: ImGuiID) -> *mut ImGuiDockNode
Sourcepub fn add_node(node_id: ImGuiID, flags: DockNodeFlags) -> ImGuiID
pub fn add_node(node_id: ImGuiID, flags: DockNodeFlags) -> ImGuiID
Sourcepub fn remove_node(node_id: ImGuiID)
pub fn remove_node(node_id: ImGuiID)
Sourcepub fn remove_node_docked_windows(node_id: ImGuiID, clear_settings_refs: bool)
pub fn remove_node_docked_windows(node_id: ImGuiID, clear_settings_refs: bool)
Sourcepub fn remove_node_child_nodes(node_id: ImGuiID)
pub fn remove_node_child_nodes(node_id: ImGuiID)
Sourcepub fn set_node_pos(node_id: ImGuiID, pos: [f32; 2])
pub fn set_node_pos(node_id: ImGuiID, pos: [f32; 2])
Sourcepub fn set_node_size(node_id: ImGuiID, size: [f32; 2])
pub fn set_node_size(node_id: ImGuiID, size: [f32; 2])
Sourcepub fn split_node(
node_id: ImGuiID,
split_dir: SplitDirection,
size_ratio_for_node_at_dir: f32,
out_id_at_dir: Option<&mut ImGuiID>,
) -> ImGuiID
pub fn split_node( node_id: ImGuiID, split_dir: SplitDirection, size_ratio_for_node_at_dir: f32, out_id_at_dir: Option<&mut ImGuiID>, ) -> ImGuiID
Splits a dock node into two nodes
§Parameters
node_id- The ID of the dock node to splitsplit_dir- The direction to splitsize_ratio_for_node_at_dir- The size ratio for the new node (0.0 to 1.0)out_id_at_dir- Optional output for the ID of the new node in the split direction
§Returns
The ID of the remaining node (opposite to the split direction)
§Example
let dockspace_id = 1;
let left_id = DockBuilder::split_node(dockspace_id, SplitDirection::Left, 0.3, None);Sourcepub fn dock_window(window_name: &str, node_id: ImGuiID)
pub fn dock_window(window_name: &str, node_id: ImGuiID)
Sourcepub fn finish(node_id: ImGuiID)
pub fn finish(node_id: ImGuiID)
Finishes the dock builder operations
This function should be called after all dock builder operations are complete to finalize the layout.
§Parameters
node_id- The root node ID of the dock layout
§Example
// ... create layout ...
let dockspace_id = 1; // placeholder dockspace id for example
DockBuilder::finish(dockspace_id);Auto Trait Implementations§
impl Freeze for DockBuilder
impl RefUnwindSafe for DockBuilder
impl Send for DockBuilder
impl Sync for DockBuilder
impl Unpin for DockBuilder
impl UnwindSafe for DockBuilder
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