pub unsafe trait NSToolbarItemValidation: NSObjectProtocol + MainThreadOnly {
// Provided method
unsafe fn validateToolbarItem(&self, item: &NSToolbarItem) -> bool
where Self: Sized + Message { ... }
}
Available on crate feature
NSToolbarItem
only.Expand description
Provided Methods§
Sourceunsafe fn validateToolbarItem(&self, item: &NSToolbarItem) -> bool
unsafe fn validateToolbarItem(&self, item: &NSToolbarItem) -> bool
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.
Note: This message is sent from NSToolbarItem’s validate method, however validate will not send this message for items that have custom views.