pub enum ViewportClass {
Root,
Deferred,
Immediate,
EmbeddedWindow,
}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.
EmbeddedWindow
The fallback, when the egui integration doesn’t support viewports,
or crate::Context::embed_viewports is set to true.
If you get this, it is because you are already wrapped in a crate::Window
inside of the parent viewport.
Trait Implementations§
Source§impl Clone for ViewportClass
impl Clone for ViewportClass
Source§fn clone(&self) -> ViewportClass
fn clone(&self) -> ViewportClass
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for ViewportClass
impl Default for ViewportClass
Source§fn default() -> ViewportClass
fn default() -> ViewportClass
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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.