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
impl Default for ViewportState
source§fn default() -> ViewportState
fn default() -> ViewportState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ViewportState
impl !RefUnwindSafe for ViewportState
impl Send for ViewportState
impl Sync for ViewportState
impl Unpin for ViewportState
impl !UnwindSafe for ViewportState
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