Struct egui_winit_platform::Platform [−][src]
Provides the integration between egui and winit.
Implementations
impl Platform
[src]
pub fn new(descriptor: PlatformDescriptor) -> Self
[src]
Creates a new Platform
.
pub fn handle_event<T>(&mut self, winit_event: &Event<'_, T>)
[src]
Handles the given winit event and updates the egui context. Should be called before starting a new frame with start_frame()
.
pub fn update_time(&mut self, elapsed_seconds: f64)
[src]
Updates the internal time for egui used for animations. elapsed_seconds
should be the seconds since some point in time (for example application start).
pub fn begin_frame(&mut self)
[src]
Starts a new frame by providing a new Ui
instance to write into.
pub fn end_frame(&mut self) -> (Output, Vec<ClippedShape>)
[src]
Ends the frame. Returns what has happened as Output
and gives you the draw instructions as PaintJobs
.
pub fn context(&self) -> CtxRef
[src]
Returns the internal egui context.
Auto Trait Implementations
impl !RefUnwindSafe for Platform
[src]
impl Send for Platform
[src]
impl Sync for Platform
[src]
impl Unpin for Platform
[src]
impl !UnwindSafe for Platform
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,