pub struct WindowKey { /* private fields */ }Expand description
Stable Dear ImGui identity for a top-level window.
A key stores a default displayed title separately from the identity used by docking and INI
persistence. Use the same key in DockLayout and Ui::window
so a displayed-title change cannot silently create a different native window.
let scene = WindowKey::new("scene", "Scene")?;
let layout = DockLayout::tabs([&scene]);
ui.window(scene.label("Scene (Debug)"))
.build(|| ui.text("The stable identity is still `scene`."));Implementations§
Trait Implementations§
impl Eq for WindowKey
Source§impl<'a> From<&'a WindowKey> for WindowLabel<'a>
impl<'a> From<&'a WindowKey> for WindowLabel<'a>
Auto Trait Implementations§
impl Freeze for WindowKey
impl RefUnwindSafe for WindowKey
impl Send for WindowKey
impl Sync for WindowKey
impl Unpin for WindowKey
impl UnsafeUnpin for WindowKey
impl UnwindSafe for WindowKey
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