pub trait MakeWindow {
type Behavior: WindowBehavior;
// Required method
fn make_window(self) -> Window<Self::Behavior>;
// Provided methods
fn open_centered<App>(self, app: &mut App) -> Result<WindowHandle>
where Self: Sized,
App: Application + ?Sized { ... }
fn run_centered(self) -> Result
where Self: Sized { ... }
fn run_centered_in(self, app: PendingApp) -> Result
where Self: Sized { ... }
}
Expand description
A type that can be made into a Window
.
Required Associated Types§
sourcetype Behavior: WindowBehavior
type Behavior: WindowBehavior
The behavior associated with this window.
Required Methods§
sourcefn make_window(self) -> Window<Self::Behavior>
fn make_window(self) -> Window<Self::Behavior>
Returns a new window from self
.
Provided Methods§
sourcefn open_centered<App>(self, app: &mut App) -> Result<WindowHandle>
fn open_centered<App>(self, app: &mut App) -> Result<WindowHandle>
Opens self
in the center of the monitor the window initially appears
on.
sourcefn run_centered(self) -> Resultwhere
Self: Sized,
fn run_centered(self) -> Resultwhere
Self: Sized,
Runs self
in the center of the monitor the window
initially appears on.
sourcefn run_centered_in(self, app: PendingApp) -> Resultwhere
Self: Sized,
fn run_centered_in(self, app: PendingApp) -> Resultwhere
Self: Sized,
Runs app
after opening self
in the center of the monitor the window
initially appears on.