pub struct EguiWindow<State, U, O>where
State: 'static + Send,
U: FnMut(&mut Ui, &mut ExtraOutputCommands, &mut State) + 'static + Send,
O: FnMut(&FullOutput, &ViewportOutput, &mut State) + 'static + Send,{
pub window: WindowContext,
/* private fields */
}Expand description
Handles an egui-baseview application
Fields§
§window: WindowContextImplementations§
Source§impl<State, U, O> EguiWindow<State, U, O>where
State: 'static + Send,
U: FnMut(&mut Ui, &mut ExtraOutputCommands, &mut State) + 'static + Send,
O: FnMut(&FullOutput, &ViewportOutput, &mut State) + 'static + Send,
impl<State, U, O> EguiWindow<State, U, O>where
State: 'static + Send,
U: FnMut(&mut Ui, &mut ExtraOutputCommands, &mut State) + 'static + Send,
O: FnMut(&FullOutput, &ViewportOutput, &mut State) + 'static + Send,
Sourcepub fn open_parented<P, B>(
parent: &P,
settings: EguiWindowSettings,
state: State,
build: B,
output: O,
update: U,
) -> WindowHandlewhere
P: HasWindowHandle,
B: FnMut(&Context, &mut ExtraOutputCommands, &mut State) + 'static + Send,
pub fn open_parented<P, B>(
parent: &P,
settings: EguiWindowSettings,
state: State,
build: B,
output: O,
update: U,
) -> WindowHandlewhere
P: HasWindowHandle,
B: FnMut(&Context, &mut ExtraOutputCommands, &mut State) + 'static + Send,
Open a new child window.
parent- The parent window.settings- The settings of the window.state- The initial state of your application.build- Called once before the first frame. Allows you to do setup code and to callctx.set_fonts(). Optional.output- Called after eachupdate. Can be used to read egui’s output commands to perform actions, i.e. asking the host to resize the window if a command to resize the window is present. Optional.update- Called before each frame. Here you should update the state of your application and build the UI.
Sourcepub fn open_blocking<B>(
settings: EguiWindowSettings,
state: State,
build: B,
output: O,
update: U,
)
pub fn open_blocking<B>( settings: EguiWindowSettings, state: State, build: B, output: O, update: U, )
Open a new window that blocks the current thread until the window is destroyed.
settings- The settings of the window.state- The initial state of your application.build- Called once before the first frame. Allows you to do setup code and to callctx.set_fonts(). Optional.output- Called after eachupdate. Can be used to read egui’s output commands to perform actions, i.e. asking the host to resize the window if a command to resize the window is present. Optional.update- Called before each frame. Here you should update the state of your application and build the UI.
Trait Implementations§
Source§impl<State, U, O> WindowHandler for EguiWindow<State, U, O>where
State: 'static + Send,
U: FnMut(&mut Ui, &mut ExtraOutputCommands, &mut State) + 'static + Send,
O: FnMut(&FullOutput, &ViewportOutput, &mut State) + 'static + Send,
impl<State, U, O> WindowHandler for EguiWindow<State, U, O>where
State: 'static + Send,
U: FnMut(&mut Ui, &mut ExtraOutputCommands, &mut State) + 'static + Send,
O: FnMut(&FullOutput, &ViewportOutput, &mut State) + 'static + Send,
Auto Trait Implementations§
impl<State, U, O> !Freeze for EguiWindow<State, U, O>
impl<State, U, O> !RefUnwindSafe for EguiWindow<State, U, O>
impl<State, U, O> !Send for EguiWindow<State, U, O>
impl<State, U, O> !Sync for EguiWindow<State, U, O>
impl<State, U, O> !UnwindSafe for EguiWindow<State, U, O>
impl<State, U, O> Unpin for EguiWindow<State, U, O>
impl<State, U, O> UnsafeUnpin for EguiWindow<State, U, O>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more