struct ContextImpl {Show 18 fields
fonts: Option<Fonts>,
font_definitions: FontDefinitions,
memory: Memory,
animation_manager: AnimationManager,
plugins: Plugins,
safe_area: SafeAreaInsets,
tex_manager: WrappedTextureManager,
new_zoom_factor: Option<f32>,
os: OperatingSystem,
viewport_stack: Vec<ViewportIdPair>,
last_viewport: ViewportId,
paint_stats: PaintStats,
request_repaint_callback: Option<Box<dyn Fn(RequestRepaintInfo) + Send + Sync>>,
viewport_parents: ViewportIdMap<ViewportId>,
viewports: ViewportIdMap<ViewportState>,
embed_viewports: bool,
is_accesskit_enabled: bool,
loaders: Arc<Loaders>,
}Fields§
§fonts: Option<Fonts>§font_definitions: FontDefinitions§memory: Memory§animation_manager: AnimationManager§plugins: Plugins§safe_area: SafeAreaInsets§tex_manager: WrappedTextureManagerAll viewports share the same texture manager and texture namespace.
In all viewports, TextureId::default is special, and points to the font atlas.
The font-atlas texture may be different across viewports, as they may have different
pixels_per_point, so we do special book-keeping for that.
See https://github.com/emilk/egui/issues/3664.
new_zoom_factor: Option<f32>Set during the pass, becomes active at the start of the next pass.
os: OperatingSystem§viewport_stack: Vec<ViewportIdPair>How deeply nested are we?
last_viewport: ViewportIdWhat is the last viewport rendered?
paint_stats: PaintStats§request_repaint_callback: Option<Box<dyn Fn(RequestRepaintInfo) + Send + Sync>>§viewport_parents: ViewportIdMap<ViewportId>§viewports: ViewportIdMap<ViewportState>§embed_viewports: bool§is_accesskit_enabled: bool§loaders: Arc<Loaders>Implementations§
Source§impl ContextImpl
Repaint-logic
impl ContextImpl
Repaint-logic
Sourcefn begin_pass_repaint_logic(&mut self, viewport_id: ViewportId)
fn begin_pass_repaint_logic(&mut self, viewport_id: ViewportId)
This is where we update the repaint logic.
fn request_repaint(&mut self, viewport_id: ViewportId, cause: RepaintCause)
fn request_repaint_after( &mut self, delay: Duration, viewport_id: ViewportId, cause: RepaintCause, )
fn requested_immediate_repaint_prev_pass( &self, viewport_id: &ViewportId, ) -> bool
fn has_requested_repaint(&self, viewport_id: &ViewportId) -> bool
Source§impl ContextImpl
impl ContextImpl
fn begin_pass(&mut self, new_raw_input: RawInput)
Sourcefn update_fonts_mut(&mut self)
fn update_fonts_mut(&mut self)
Load fonts unless already loaded.
fn accesskit_node_builder(&mut self, id: Id) -> &mut Node
fn pixels_per_point(&mut self) -> f32
Sourcepub(crate) fn viewport_id(&self) -> ViewportId
pub(crate) fn viewport_id(&self) -> ViewportId
Return the ViewportId of the current viewport.
For the root viewport this will return ViewportId::ROOT.
Sourcepub(crate) fn parent_viewport_id(&self) -> ViewportId
pub(crate) fn parent_viewport_id(&self) -> ViewportId
Return the ViewportId of his parent.
For the root viewport this will return ViewportId::ROOT.
fn all_viewport_ids(&self) -> ViewportIdSet
Sourcepub(crate) fn viewport(&mut self) -> &mut ViewportState
pub(crate) fn viewport(&mut self) -> &mut ViewportState
The current active viewport