Struct egui::context::ViewportState

source ·
pub struct ViewportState {
Show 14 fields pub class: ViewportClass, pub builder: ViewportBuilder, pub viewport_ui_cb: Option<Arc<DeferredViewportUiCallback>>, pub input: InputState, pub this_pass: PassState, pub prev_pass: PassState, pub used: bool, repaint: ViewportRepaintInfo, pub hits: WidgetHits, pub interact_widgets: InteractionSnapshot, pub graphics: GraphicLayers, pub output: PlatformOutput, pub commands: Vec<ViewportCommand>, pub num_multipass_in_row: usize,
}
Expand description

State stored per viewport.

Mostly for internal use. Things here may move and change without warning.

Fields§

§class: ViewportClass

The type of viewport.

This will never be ViewportClass::Embedded, since those don’t result in real viewports.

§builder: ViewportBuilder

The latest delta

§viewport_ui_cb: Option<Arc<DeferredViewportUiCallback>>

The user-code that shows the GUI, used for deferred viewports.

None for immediate viewports.

§input: InputState§this_pass: PassState

State that is collected during a pass and then cleared.

§prev_pass: PassState

The final PassState from last pass.

Only read from.

§used: bool

Has this viewport been updated this pass?

§repaint: ViewportRepaintInfo

State related to repaint scheduling.

§hits: WidgetHits

Which widgets are under the pointer?

§interact_widgets: InteractionSnapshot

What widgets are being interacted with this pass?

Based on the widgets from last pass, and input in this pass.

§graphics: GraphicLayers§output: PlatformOutput§commands: Vec<ViewportCommand>§num_multipass_in_row: usize

Trait Implementations§

source§

impl Default for ViewportState

source§

fn default() -> ViewportState

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.