1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 15:13:12 -04:00

Doc improvements

This commit is contained in:
Emil Ernerfeldt
2023-11-15 20:11:29 +01:00
parent 62fcc626f2
commit 4930e7ba4e
3 changed files with 10 additions and 2 deletions

View File

@@ -52,7 +52,9 @@ pub struct EventResponse {
// ----------------------------------------------------------------------------
/// Handles the integration between egui and winit.
/// Handles the integration between egui and a winit Window.
///
/// Instantiate one of these per viewport/window.
pub struct State {
start_time: web_time::Instant,
egui_input: egui::RawInput,
@@ -733,12 +735,13 @@ impl State {
cursor_icon,
open_url,
copied_text,
events: _, // handled above
events: _, // handled elsewhere
mutable_text_under_cursor: _, // only used in eframe web
text_cursor_pos,
#[cfg(feature = "accesskit")]
accesskit_update,
} = platform_output;
self.current_pixels_per_point = egui_ctx.input_for(viewport_id, |i| i.pixels_per_point); // someone can have changed it to scale the UI
self.set_cursor_icon(window, cursor_icon);

View File

@@ -143,8 +143,10 @@ struct ViewportState {
/// State related to repaint scheduling.
repaint: ViewportRepaintInfo,
// ----------------------
// The output of a frame:
graphics: GraphicLayers,
// Most of the things in `PlatformOutput` are not actually viewport dependent.
output: PlatformOutput,
commands: Vec<ViewportCommand>,
}

View File

@@ -98,6 +98,9 @@ pub struct PlatformOutput {
/// Iff `Some`, the user is editing text.
pub text_cursor_pos: Option<crate::Pos2>,
/// The difference in the widget tree since last frame.
///
/// NOTE: this needs to be per-viewport.
#[cfg(feature = "accesskit")]
pub accesskit_update: Option<accesskit::TreeUpdate>,
}