pub struct WindowController<T> {
    pub objc: Id<Object>,
    pub window: Window<T>,
}
Available on crate feature appkit only.
Expand description

A WindowController wraps your WindowDelegate into an underlying Window, and provides some extra lifecycle methods.

Fields

objc: Id<Object>

A handler to the underlying NSWindowController.

window: Window<T>

The underlying Window that this controller wraps.

Implementations

Allocates and configures an NSWindowController in the Objective-C/Cocoa runtime that maps over to your supplied delegate.

Given a view, sets it as the content view controller for this window.

Shows the window, running a configuration pass if necessary.

Closes the window.

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.