objc2_app_kit/generated/NSToolbarItem.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-cloud-kit")]
7#[cfg(target_vendor = "apple")]
8use objc2_cloud_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaritemstyle?language=objc)
14// NS_ENUM
15#[repr(transparent)]
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
17pub struct NSToolbarItemStyle(pub NSInteger);
18impl NSToolbarItemStyle {
19 #[doc(alias = "NSToolbarItemStylePlain")]
20 pub const Plain: Self = Self(0);
21 #[doc(alias = "NSToolbarItemStyleProminent")]
22 pub const Prominent: Self = Self(1);
23}
24
25unsafe impl Encode for NSToolbarItemStyle {
26 const ENCODING: Encoding = NSInteger::ENCODING;
27}
28
29unsafe impl RefEncode for NSToolbarItemStyle {
30 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
31}
32
33/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaritemvisibilitypriority?language=objc)
34// NS_TYPED_EXTENSIBLE_ENUM
35pub type NSToolbarItemVisibilityPriority = NSInteger;
36
37/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaritemvisibilityprioritystandard?language=objc)
38pub static NSToolbarItemVisibilityPriorityStandard: NSToolbarItemVisibilityPriority = 0;
39
40/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaritemvisibilityprioritylow?language=objc)
41pub static NSToolbarItemVisibilityPriorityLow: NSToolbarItemVisibilityPriority = -1000;
42
43/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaritemvisibilitypriorityhigh?language=objc)
44pub static NSToolbarItemVisibilityPriorityHigh: NSToolbarItemVisibilityPriority = 1000;
45
46/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaritemvisibilitypriorityuser?language=objc)
47pub static NSToolbarItemVisibilityPriorityUser: NSToolbarItemVisibilityPriority = 2000;
48
49extern_class!(
50 /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaritem?language=objc)
51 #[unsafe(super(NSObject))]
52 #[thread_kind = MainThreadOnly]
53 #[derive(Debug, PartialEq, Eq, Hash)]
54 pub struct NSToolbarItem;
55);
56
57extern_conformance!(
58 unsafe impl NSCopying for NSToolbarItem {}
59);
60
61unsafe impl CopyingHelper for NSToolbarItem {
62 type Result = Self;
63}
64
65extern_conformance!(
66 unsafe impl NSObjectProtocol for NSToolbarItem {}
67);
68
69impl NSToolbarItem {
70 extern_methods!(
71 #[cfg(feature = "NSToolbar")]
72 /// Initialize the toolbar item with an identifier which is a development language string used by the toolbar and its delegate for identification purposes.
73 #[unsafe(method(initWithItemIdentifier:))]
74 #[unsafe(method_family = init)]
75 pub fn initWithItemIdentifier(
76 this: Allocated<Self>,
77 item_identifier: &NSToolbarItemIdentifier,
78 ) -> Retained<Self>;
79
80 #[cfg(feature = "NSToolbar")]
81 #[unsafe(method(itemIdentifier))]
82 #[unsafe(method_family = none)]
83 pub fn itemIdentifier(&self) -> Retained<NSToolbarItemIdentifier>;
84
85 #[cfg(feature = "NSToolbar")]
86 /// Use this to determine the toolbar in which an item is currently displayed.
87 #[unsafe(method(toolbar))]
88 #[unsafe(method_family = none)]
89 pub fn toolbar(&self) -> Option<Retained<NSToolbar>>;
90
91 /// Use this to set the item's label that appears in the toolbar.
92 /// The label may also be used for the default `menuFormRepresentation` of the item.
93 /// Also, developers should make sure the length of the label is appropriate and not too long.
94 #[unsafe(method(label))]
95 #[unsafe(method_family = none)]
96 pub fn label(&self) -> Retained<NSString>;
97
98 /// Setter for [`label`][Self::label].
99 ///
100 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
101 #[unsafe(method(setLabel:))]
102 #[unsafe(method_family = none)]
103 pub fn setLabel(&self, label: &NSString);
104
105 /// Use this to set the item's label that appears when the item is in the customization palette.
106 /// All Items must have a palette label, and for most things it is reasonable to set them to the same string as the label used in the toolbar.
107 #[unsafe(method(paletteLabel))]
108 #[unsafe(method_family = none)]
109 pub fn paletteLabel(&self) -> Retained<NSString>;
110
111 /// Setter for [`paletteLabel`][Self::paletteLabel].
112 ///
113 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
114 #[unsafe(method(setPaletteLabel:))]
115 #[unsafe(method_family = none)]
116 pub fn setPaletteLabel(&self, palette_label: &NSString);
117
118 /// An array of all alternate labels this item may display.
119 /// The item will use the size of the longest label to prevent resizing when the label is changed.
120 #[unsafe(method(possibleLabels))]
121 #[unsafe(method_family = none)]
122 pub fn possibleLabels(&self) -> Retained<NSSet<NSString>>;
123
124 /// Setter for [`possibleLabels`][Self::possibleLabels].
125 ///
126 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
127 #[unsafe(method(setPossibleLabels:))]
128 #[unsafe(method_family = none)]
129 pub fn setPossibleLabels(&self, possible_labels: &NSSet<NSString>);
130
131 /// Use this to set a tooltip to be used when the item is displayed in the toolbar. (forwards to `-view` if it responds)
132 #[unsafe(method(toolTip))]
133 #[unsafe(method_family = none)]
134 pub fn toolTip(&self) -> Option<Retained<NSString>>;
135
136 /// Setter for [`toolTip`][Self::toolTip].
137 ///
138 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
139 #[unsafe(method(setToolTip:))]
140 #[unsafe(method_family = none)]
141 pub fn setToolTip(&self, tool_tip: Option<&NSString>);
142
143 #[cfg(feature = "NSMenuItem")]
144 /// The menu form of a toolbar item's purpose is twofold.
145 /// First, when the window is too small to display an item, it will be clipped but remain accessible from a "clipped items" menu containing the menu item returned here.
146 /// Second, in text only mode, the menu returned will be used to create the displayed items.
147 /// Singleton menu items will be clickable, while submenu items will be represented as a pull down.
148 /// For instance, say you want a button that allows you to switch between modes A, B, and C.
149 /// You could represent this as a menu by: a menu item "mode" with three submenu items "A", "B", and "C".
150 /// By default, this method returns a singleton menu item with item label as the title.
151 /// For standard items, the target, action is set.
152 #[unsafe(method(menuFormRepresentation))]
153 #[unsafe(method_family = none)]
154 pub fn menuFormRepresentation(&self) -> Option<Retained<NSMenuItem>>;
155
156 #[cfg(feature = "NSMenuItem")]
157 /// Setter for [`menuFormRepresentation`][Self::menuFormRepresentation].
158 #[unsafe(method(setMenuFormRepresentation:))]
159 #[unsafe(method_family = none)]
160 pub fn setMenuFormRepresentation(&self, menu_form_representation: Option<&NSMenuItem>);
161
162 /// Tag for your own custom purpose. (forwards to `-view` if it responds)
163 #[unsafe(method(tag))]
164 #[unsafe(method_family = none)]
165 pub fn tag(&self) -> NSInteger;
166
167 /// Setter for [`tag`][Self::tag].
168 #[unsafe(method(setTag:))]
169 #[unsafe(method_family = none)]
170 pub fn setTag(&self, tag: NSInteger);
171
172 /// Set and get the action of an item. (forwards to `-view` if it responds)
173 #[unsafe(method(target))]
174 #[unsafe(method_family = none)]
175 pub fn target(&self) -> Option<Retained<AnyObject>>;
176
177 /// Setter for [`target`][Self::target].
178 ///
179 /// This is a [weak property][objc2::topics::weak_property].
180 ///
181 /// # Safety
182 ///
183 /// `target` should be of the correct type.
184 #[unsafe(method(setTarget:))]
185 #[unsafe(method_family = none)]
186 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
187
188 /// Set and get the action of an item.
189 /// For custom views, this method will call `-setAction:` on the view if it responds. (forwards to `-view` if it responds)
190 #[unsafe(method(action))]
191 #[unsafe(method_family = none)]
192 pub fn action(&self) -> Option<Sel>;
193
194 /// Setter for [`action`][Self::action].
195 ///
196 /// # Safety
197 ///
198 /// `action` must be a valid selector.
199 #[unsafe(method(setAction:))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn setAction(&self, action: Option<Sel>);
202
203 /// Set and get the enabled flag of an item.
204 /// For custom views, this method will call `-setEnabled:` on the view if it responds. (forwards to `-view` if it responds)
205 #[unsafe(method(isEnabled))]
206 #[unsafe(method_family = none)]
207 pub fn isEnabled(&self) -> bool;
208
209 /// Setter for [`isEnabled`][Self::isEnabled].
210 #[unsafe(method(setEnabled:))]
211 #[unsafe(method_family = none)]
212 pub fn setEnabled(&self, enabled: bool);
213
214 #[cfg(feature = "NSImage")]
215 #[unsafe(method(image))]
216 #[unsafe(method_family = none)]
217 pub fn image(&self) -> Option<Retained<NSImage>>;
218
219 #[cfg(feature = "NSImage")]
220 /// Setter for [`image`][Self::image].
221 #[unsafe(method(setImage:))]
222 #[unsafe(method_family = none)]
223 pub fn setImage(&self, image: Option<&NSImage>);
224
225 /// Set and get the title of an item.
226 /// For custom views, this method will call `-setTitle:` on the view if it responds. (forwards to `-view` if it responds)
227 #[unsafe(method(title))]
228 #[unsafe(method_family = none)]
229 pub fn title(&self) -> Retained<NSString>;
230
231 /// Setter for [`title`][Self::title].
232 ///
233 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
234 #[unsafe(method(setTitle:))]
235 #[unsafe(method_family = none)]
236 pub fn setTitle(&self, title: &NSString);
237
238 /// When set on an item without a custom view, the button produced will have a bordered style.
239 /// Defaults to NO.
240 #[unsafe(method(isBordered))]
241 #[unsafe(method_family = none)]
242 pub fn isBordered(&self) -> bool;
243
244 /// Setter for [`isBordered`][Self::isBordered].
245 #[unsafe(method(setBordered:))]
246 #[unsafe(method_family = none)]
247 pub fn setBordered(&self, bordered: bool);
248
249 #[cfg(feature = "NSColor")]
250 #[unsafe(method(backgroundTintColor))]
251 #[unsafe(method_family = none)]
252 pub fn backgroundTintColor(&self) -> Option<Retained<NSColor>>;
253
254 #[cfg(feature = "NSColor")]
255 /// Setter for [`backgroundTintColor`][Self::backgroundTintColor].
256 ///
257 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
258 #[unsafe(method(setBackgroundTintColor:))]
259 #[unsafe(method_family = none)]
260 pub fn setBackgroundTintColor(&self, background_tint_color: Option<&NSColor>);
261
262 /// Defines the toolbar item’s appearance. The default style is plain.
263 /// Prominent style tints the background. If a background tint color is set, it uses it; otherwise, it uses the app’s or system’s accent color. If grouped with other items,
264 /// it moves to its own to avoid tinting other items' background.
265 #[unsafe(method(style))]
266 #[unsafe(method_family = none)]
267 pub fn style(&self) -> NSToolbarItemStyle;
268
269 /// Setter for [`style`][Self::style].
270 #[unsafe(method(setStyle:))]
271 #[unsafe(method_family = none)]
272 pub fn setStyle(&self, style: NSToolbarItemStyle);
273
274 /// Whether or not the item behaves as a navigation item (i.e. back/forward) in the toolbar.
275 /// Navigation items may be specially positioned by the system outside the normal list of items of the toolbar in the order specified by `-toolbarDefaultItemIdentifiers:`.
276 /// Defaults to NO.
277 #[unsafe(method(isNavigational))]
278 #[unsafe(method_family = none)]
279 pub fn isNavigational(&self) -> bool;
280
281 /// Setter for [`isNavigational`][Self::isNavigational].
282 #[unsafe(method(setNavigational:))]
283 #[unsafe(method_family = none)]
284 pub fn setNavigational(&self, navigational: bool);
285
286 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
287 /// Items with automatically generated views will return nil from this getter.
288 /// Custom views may be provided but not all `NSToolbarItem` subclasses support custom views.
289 /// Note that, by default, many of the set/get methods will be implemented by calls forwarded to the view you set, if it responds to it.
290 #[unsafe(method(view))]
291 #[unsafe(method_family = none)]
292 pub fn view(&self) -> Option<Retained<NSView>>;
293
294 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
295 /// Setter for [`view`][Self::view].
296 #[unsafe(method(setView:))]
297 #[unsafe(method_family = none)]
298 pub fn setView(&self, view: Option<&NSView>);
299
300 /// An item is visible if it is present in the NSToolbar and not in the overflow menu.
301 /// This property is key value observable.
302 #[unsafe(method(isVisible))]
303 #[unsafe(method_family = none)]
304 pub fn isVisible(&self) -> bool;
305
306 /// When an item is hidden it will not be visible in the toolbar. The item will still be visible in the customization panel. Because hidden items may be visible during user customization, use the `visible` property to determine if an item is currently displayed. Note that even hidden toolbar items are sync'd to other toolbars with a shared identifier, but its `hidden` state can be unique to each instance. Use this property to show a toolbar item in one toolbar instance but not another.
307 #[unsafe(method(isHidden))]
308 #[unsafe(method_family = none)]
309 pub fn isHidden(&self) -> bool;
310
311 /// Setter for [`isHidden`][Self::isHidden].
312 #[unsafe(method(setHidden:))]
313 #[unsafe(method_family = none)]
314 pub fn setHidden(&self, hidden: bool);
315
316 /// Unless you have already set your own custom view, you should not call these methods.
317 /// The min size should be small enough to look nice in all display modes.
318 /// If you do not set a min/max size, the view's size properties will be calculated using constraints. Apps linked before 10.14 will use the view's current size.
319 /// In general, apps should rely on the automatic measurements and constraints to define min/max sizes rather than setting these properties since this will account for localizations.
320 #[deprecated = "This property is no longer recommended. Instead, let the system automatically measure the size of the view using constraints."]
321 #[unsafe(method(minSize))]
322 #[unsafe(method_family = none)]
323 pub fn minSize(&self) -> NSSize;
324
325 /// Setter for [`minSize`][Self::minSize].
326 #[deprecated = "This property is no longer recommended. Instead, let the system automatically measure the size of the view using constraints."]
327 #[unsafe(method(setMinSize:))]
328 #[unsafe(method_family = none)]
329 pub fn setMinSize(&self, min_size: NSSize);
330
331 #[deprecated = "This property is no longer recommended. Instead, let the system automatically measure the size of the view using constraints."]
332 #[unsafe(method(maxSize))]
333 #[unsafe(method_family = none)]
334 pub fn maxSize(&self) -> NSSize;
335
336 /// Setter for [`maxSize`][Self::maxSize].
337 #[deprecated = "This property is no longer recommended. Instead, let the system automatically measure the size of the view using constraints."]
338 #[unsafe(method(setMaxSize:))]
339 #[unsafe(method_family = none)]
340 pub fn setMaxSize(&self, max_size: NSSize);
341
342 /// When a toolbar does not have enough space to fit all its items, it must push some into the overflow menu.
343 /// Items with the highest `visibilityPriority` level are chosen last for the overflow menu.
344 /// The default `visibilityPriority` value is `NSToolbarItemVisibilityPriorityStandard`.
345 /// To suggest that an item always remain visible, give it a value greater than `NSToolbarItemVisibilityPriorityStandard`, but less than `NSToolbarItemVisibilityPriorityUser`.
346 /// In 10.7, users can no longer modify the toolbar item visibility priority.
347 #[unsafe(method(visibilityPriority))]
348 #[unsafe(method_family = none)]
349 pub fn visibilityPriority(&self) -> NSToolbarItemVisibilityPriority;
350
351 /// Setter for [`visibilityPriority`][Self::visibilityPriority].
352 #[unsafe(method(setVisibilityPriority:))]
353 #[unsafe(method_family = none)]
354 pub fn setVisibilityPriority(&self, visibility_priority: NSToolbarItemVisibilityPriority);
355
356 #[cfg(feature = "NSItemBadge")]
357 /// A badge that can be attached to an NSToolbarItem. This provides a way to display small visual indicators that can be used to highlight important information, such as unread notifications or status indicators.
358 #[unsafe(method(badge))]
359 #[unsafe(method_family = none)]
360 pub fn badge(&self) -> Option<Retained<NSItemBadge>>;
361
362 #[cfg(feature = "NSItemBadge")]
363 /// Setter for [`badge`][Self::badge].
364 ///
365 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
366 #[unsafe(method(setBadge:))]
367 #[unsafe(method_family = none)]
368 pub fn setBadge(&self, badge: Option<&NSItemBadge>);
369
370 /// Typically you should not invoke this method.
371 /// This method is called by its toolbar during validation.
372 /// Standard items validate themselves by sending the `-validateToolbarItem:` validate message to the current validator.
373 /// Since items with custom views don't always have meaningful target/actions, they do nothing.
374 /// So for your custom items it may be useful to override this method and invent your own validation.
375 #[unsafe(method(validate))]
376 #[unsafe(method_family = none)]
377 pub fn validate(&self);
378
379 /// This property only affects automatic validation performed by NSToolbar.
380 /// Explicit validation requests, such as the `-[NSToolbar validateVisibleItems]` method, will invoke the `-validate` method even if `autovalidates` is `NO`.
381 /// Defaults to YES.
382 #[unsafe(method(autovalidates))]
383 #[unsafe(method_family = none)]
384 pub fn autovalidates(&self) -> bool;
385
386 /// Setter for [`autovalidates`][Self::autovalidates].
387 #[unsafe(method(setAutovalidates:))]
388 #[unsafe(method_family = none)]
389 pub fn setAutovalidates(&self, autovalidates: bool);
390
391 /// Duplicate items outside of spaces are not allowed.
392 #[deprecated = "Duplicates are no longer supported."]
393 #[unsafe(method(allowsDuplicatesInToolbar))]
394 #[unsafe(method_family = none)]
395 pub fn allowsDuplicatesInToolbar(&self) -> bool;
396 );
397}
398
399/// Methods declared on superclass `NSObject`.
400impl NSToolbarItem {
401 extern_methods!(
402 #[unsafe(method(init))]
403 #[unsafe(method_family = init)]
404 pub fn init(this: Allocated<Self>) -> Retained<Self>;
405
406 #[unsafe(method(new))]
407 #[unsafe(method_family = new)]
408 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
409 );
410}
411
412impl NSToolbarItem {
413 extern_methods!();
414}
415
416#[cfg(feature = "NSMenu")]
417extern_conformance!(
418 unsafe impl NSMenuItemValidation for NSToolbarItem {}
419);
420
421#[cfg(feature = "NSUserInterfaceValidation")]
422extern_conformance!(
423 unsafe impl NSValidatedUserInterfaceItem for NSToolbarItem {}
424);
425
426extern_protocol!(
427 /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaritemvalidation?language=objc)
428 pub unsafe trait NSToolbarItemValidation: NSObjectProtocol + MainThreadOnly {
429 /// `NSToolbarItemValidation` extends the standard validation idea by introducing this new method which is sent to validators for each visible standard `NSToolbarItem` with a valid target/action pair.
430 /// Note: This message is sent from NSToolbarItem's validate method, however validate will not send this message for items that have custom views.
431 #[unsafe(method(validateToolbarItem:))]
432 #[unsafe(method_family = none)]
433 fn validateToolbarItem(&self, item: &NSToolbarItem) -> bool;
434 }
435);
436
437extern_protocol!(
438 /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscloudsharingvalidation?language=objc)
439 pub unsafe trait NSCloudSharingValidation: NSObjectProtocol + MainThreadOnly {
440 #[cfg(all(feature = "NSUserInterfaceValidation", feature = "objc2-cloud-kit"))]
441 #[cfg(target_vendor = "apple")]
442 /// `NSToolbarItems` created with `NSToolbarCloudSharingItemIdentifier` use this method for further validation after sending `-validateToolbarItem:` or `-validateUserInterfaceItem:`.
443 /// The validator for the item's action should return the current CKShare corresponding to the selected item, if any.
444 /// The state of the item will be changed reflect the state of the CKShare.
445 #[unsafe(method(cloudShareForUserInterfaceItem:))]
446 #[unsafe(method_family = none)]
447 fn cloudShareForUserInterfaceItem(
448 &self,
449 item: &ProtocolObject<dyn NSValidatedUserInterfaceItem>,
450 ) -> Option<Retained<CKShare>>;
451 }
452);
453
454extern "C" {
455 /// A space item of a standard fixed size.
456 ///
457 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarspaceitemidentifier?language=objc)
458 #[cfg(feature = "NSToolbar")]
459 pub static NSToolbarSpaceItemIdentifier: &'static NSToolbarItemIdentifier;
460}
461
462extern "C" {
463 /// A space item of flexible width.
464 ///
465 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarflexiblespaceitemidentifier?language=objc)
466 #[cfg(feature = "NSToolbar")]
467 pub static NSToolbarFlexibleSpaceItemIdentifier: &'static NSToolbarItemIdentifier;
468}
469
470extern "C" {
471 /// A standard item that is configured to show the color panel when invoked.
472 ///
473 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarshowcolorsitemidentifier?language=objc)
474 #[cfg(feature = "NSToolbar")]
475 pub static NSToolbarShowColorsItemIdentifier: &'static NSToolbarItemIdentifier;
476}
477
478extern "C" {
479 /// A standard item that is configured to show the font panel when invoked.
480 ///
481 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarshowfontsitemidentifier?language=objc)
482 #[cfg(feature = "NSToolbar")]
483 pub static NSToolbarShowFontsItemIdentifier: &'static NSToolbarItemIdentifier;
484}
485
486extern "C" {
487 /// A standard item that is configured to send -printDocument: to the firstResponder when invoked
488 ///
489 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarprintitemidentifier?language=objc)
490 #[cfg(feature = "NSToolbar")]
491 pub static NSToolbarPrintItemIdentifier: &'static NSToolbarItemIdentifier;
492}
493
494extern "C" {
495 /// A standard item that is configured to send -toggleSidebar: to the firstResponder when invoked.
496 ///
497 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbartogglesidebaritemidentifier?language=objc)
498 #[cfg(feature = "NSToolbar")]
499 pub static NSToolbarToggleSidebarItemIdentifier: &'static NSToolbarItemIdentifier;
500}
501
502extern "C" {
503 /// A standard item that is configured to send -toggleInspector: to the firstResponder when invoked.
504 ///
505 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbartoggleinspectoritemidentifier?language=objc)
506 #[cfg(feature = "NSToolbar")]
507 pub static NSToolbarToggleInspectorItemIdentifier: &'static NSToolbarItemIdentifier;
508}
509
510extern "C" {
511 /// A standard item for cloud sharing via NSSharingServiceNameCloudSharing. It validates itself and modifies its appearance by using the NSCloudSharingValidation protocol. It sends -performCloudSharing: to the firstResponder.
512 ///
513 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarcloudsharingitemidentifier?language=objc)
514 #[cfg(feature = "NSToolbar")]
515 pub static NSToolbarCloudSharingItemIdentifier: &'static NSToolbarItemIdentifier;
516}
517
518extern "C" {
519 /// A standard item that is configured to send -showWritingTools: to the firstResponder when invoked.
520 ///
521 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarwritingtoolsitemidentifier?language=objc)
522 #[cfg(feature = "NSToolbar")]
523 pub static NSToolbarWritingToolsItemIdentifier: &'static NSToolbarItemIdentifier;
524}
525
526extern "C" {
527 /// Creates a new NSTrackingSeparatorToolbarItem and automatically configures it to track the divider of the sidebar if one is discovered.
528 /// Only applies to windows with `NSWindowStyleMaskFullSizeContentView` applied.
529 ///
530 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarsidebartrackingseparatoritemidentifier?language=objc)
531 #[cfg(feature = "NSToolbar")]
532 pub static NSToolbarSidebarTrackingSeparatorItemIdentifier: &'static NSToolbarItemIdentifier;
533}
534
535extern "C" {
536 /// Creates a new NSTrackingSeparatorToolbarItem and automatically configures it to track the divider of the inspector if one is discovered.
537 /// Only applies to windows with `NSWindowStyleMaskFullSizeContentView` applied.
538 ///
539 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarinspectortrackingseparatoritemidentifier?language=objc)
540 #[cfg(feature = "NSToolbar")]
541 pub static NSToolbarInspectorTrackingSeparatorItemIdentifier: &'static NSToolbarItemIdentifier;
542}
543
544extern "C" {
545 /// Deprecated Item Identifiers
546 ///
547 /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarseparatoritemidentifier?language=objc)
548 #[cfg(feature = "NSToolbar")]
549 #[deprecated = "This item is no longer recommended and will be ignored on 10.7 and later."]
550 pub static NSToolbarSeparatorItemIdentifier: &'static NSToolbarItemIdentifier;
551}
552
553extern "C" {
554 /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarcustomizetoolbaritemidentifier?language=objc)
555 #[cfg(feature = "NSToolbar")]
556 #[deprecated = "This item is no longer recommended and will be ignored on 10.7 and later."]
557 pub static NSToolbarCustomizeToolbarItemIdentifier: &'static NSToolbarItemIdentifier;
558}