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
sourceimpl<T> WindowController<T> where
T: WindowDelegate + 'static,
impl<T> WindowController<T> where
T: WindowDelegate + 'static,
sourcepub fn with(config: WindowConfig, delegate: T) -> Self
pub fn with(config: WindowConfig, delegate: T) -> Self
Allocates and configures an NSWindowController
in the Objective-C/Cocoa runtime that maps over
to your supplied delegate.
sourcepub fn set_content_view_controller<C: Controller + 'static>(
&self,
controller: &C
)
pub fn set_content_view_controller<C: Controller + 'static>(
&self,
controller: &C
)
Given a view, sets it as the content view controller for this window.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for WindowController<T> where
T: RefUnwindSafe,
impl<T> Send for WindowController<T> where
T: Send,
impl<T> Sync for WindowController<T> where
T: Sync,
impl<T> Unpin for WindowController<T>
impl<T> UnwindSafe for WindowController<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more