//! Implements an NSToolbar wrapper, which is one of those macOS niceties //! that makes it feel... "proper". //! //! UNFORTUNATELY, this is a very old and janky API. So... yeah. use cocoa::base::{id, nil}; use cocoa::foundation::{NSSize, NSString}; use objc_id::Id; use objc::runtime::Object; use objc::{class, msg_send, sel, sel_impl}; use crate::button::Button; /// A wrapper for `NSWindow`. Holds (retains) pointers for the Objective-C runtime /// where our `NSWindow` and associated delegate live. pub struct ToolbarItem<'a> { pub identifier: &'a str, pub inner: Id, pub button: Option