Struct egui::context::ViewportState
source · pub struct ViewportState {Show 13 fields
pub class: ViewportClass,
pub builder: ViewportBuilder,
pub viewport_ui_cb: Option<Arc<DeferredViewportUiCallback>>,
pub input: InputState,
pub this_frame: FrameState,
pub prev_frame: FrameState,
pub used: bool,
repaint: ViewportRepaintInfo,
pub hits: WidgetHits,
pub interact_widgets: InteractionSnapshot,
pub graphics: GraphicLayers,
pub output: PlatformOutput,
pub commands: Vec<ViewportCommand>,
}
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_frame: FrameState
State that is collected during a frame and then cleared.
prev_frame: FrameState
The final FrameState
from last frame.
Only read from.
used: bool
Has this viewport been updated this frame?
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 frame?
Based on the widgets from last frame, and input in this frame.
graphics: GraphicLayers
§output: PlatformOutput
§commands: Vec<ViewportCommand>
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