pub fn install_native_toolbar(
id: impl Into<SharedString>,
title: impl Into<SharedString>,
items: Vec<NativeToolbarItem>,
window: &mut Window,
cx: &mut App,
on_command: impl Fn(SharedString, &mut Window, &mut App) + 'static,
) -> Result<NativeToolbarHandle>Expand description
Install an actual unified AppKit toolbar on the existing GPUI NSWindow.
Use native_toolbar_inset to reserve any native toolbar overlap in a
full-size content window. Avoid drawing a second GPUI title/toolbar row.
Command callbacks run on GPUI’s foreground executor after the native event,
so they cannot reenter an App borrow. The NSWindow delegate stays with GPUI.
Use a transparent GPUI window background rather than its separate Blurred
backdrop. The bridge supplies AppKit’s semantic window/titlebar background.