Enum egui::viewport::ViewportClass
source · pub enum ViewportClass {
Root,
Deferred,
Immediate,
Embedded,
}
Expand description
The different types of viewports supported by egui.
Variants§
Root
The root viewport; i.e. the original window.
Deferred
A viewport run independently from the parent viewport.
This is the preferred type of viewport from a performance perspective.
Create these with crate::Context::show_viewport_deferred
.
Immediate
A viewport run inside the parent viewport.
This is the easier type of viewport to use, but it is less performant at it requires both parent and child to repaint if any one of them needs repainting, which effectively produces double work for two viewports, and triple work for three viewports, etc.
Create these with crate::Context::show_viewport_immediate
.
Embedded
The fallback, when the egui integration doesn’t support viewports,
or crate::Context::embed_viewports
is set to true
.
Trait Implementations§
source§impl Clone for ViewportClass
impl Clone for ViewportClass
source§fn clone(&self) -> ViewportClass
fn clone(&self) -> ViewportClass
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for ViewportClass
impl Default for ViewportClass
source§fn default() -> ViewportClass
fn default() -> ViewportClass
Returns the “default value” for a type. Read more
source§impl Hash for ViewportClass
impl Hash for ViewportClass
source§impl PartialEq for ViewportClass
impl PartialEq for ViewportClass
impl Copy for ViewportClass
impl Eq for ViewportClass
impl StructuralPartialEq for ViewportClass
Auto Trait Implementations§
impl Freeze for ViewportClass
impl RefUnwindSafe for ViewportClass
impl Send for ViewportClass
impl Sync for ViewportClass
impl Unpin for ViewportClass
impl UnwindSafe for ViewportClass
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)