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<'de> Deserialize<'de> for ViewportClass
impl<'de> Deserialize<'de> for ViewportClass
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ViewportClass
impl Hash for ViewportClass
Source§impl PartialEq for ViewportClass
impl PartialEq for ViewportClass
Source§impl Serialize for ViewportClass
impl Serialize 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