pub struct ToolbarItem {
    pub identifier: String,
    pub objc: Id<Object>,
    pub button: Option<Button>,
    pub image: Option<Image>,
    /* private fields */
}
Available on crate feature appkit only.
Expand description

Wraps NSToolbarItem. Enables configuring things like size, view, and so on.

Fields

identifier: Stringobjc: Id<Object>button: Option<Button>image: Option<Image>

Implementations

Creates and returns a new ToolbarItem, ensuring the underlying NSToolbarItem is properly initialized.

Sets the title for this item.

Sets and takes ownership of the button for this item.

Sets and takes ownership of the image for this toolbar item.

Sets the minimum size for this button.

Sets the maximum size for this button.

Sets an action on this item.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.