mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Doc improvements
This commit is contained in:
@@ -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 {
|
pub struct State {
|
||||||
start_time: web_time::Instant,
|
start_time: web_time::Instant,
|
||||||
egui_input: egui::RawInput,
|
egui_input: egui::RawInput,
|
||||||
@@ -733,12 +735,13 @@ impl State {
|
|||||||
cursor_icon,
|
cursor_icon,
|
||||||
open_url,
|
open_url,
|
||||||
copied_text,
|
copied_text,
|
||||||
events: _, // handled above
|
events: _, // handled elsewhere
|
||||||
mutable_text_under_cursor: _, // only used in eframe web
|
mutable_text_under_cursor: _, // only used in eframe web
|
||||||
text_cursor_pos,
|
text_cursor_pos,
|
||||||
#[cfg(feature = "accesskit")]
|
#[cfg(feature = "accesskit")]
|
||||||
accesskit_update,
|
accesskit_update,
|
||||||
} = platform_output;
|
} = 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.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);
|
self.set_cursor_icon(window, cursor_icon);
|
||||||
|
|||||||
@@ -143,8 +143,10 @@ struct ViewportState {
|
|||||||
/// State related to repaint scheduling.
|
/// State related to repaint scheduling.
|
||||||
repaint: ViewportRepaintInfo,
|
repaint: ViewportRepaintInfo,
|
||||||
|
|
||||||
|
// ----------------------
|
||||||
// The output of a frame:
|
// The output of a frame:
|
||||||
graphics: GraphicLayers,
|
graphics: GraphicLayers,
|
||||||
|
// Most of the things in `PlatformOutput` are not actually viewport dependent.
|
||||||
output: PlatformOutput,
|
output: PlatformOutput,
|
||||||
commands: Vec<ViewportCommand>,
|
commands: Vec<ViewportCommand>,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,6 +98,9 @@ pub struct PlatformOutput {
|
|||||||
/// Iff `Some`, the user is editing text.
|
/// Iff `Some`, the user is editing text.
|
||||||
pub text_cursor_pos: Option<crate::Pos2>,
|
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")]
|
#[cfg(feature = "accesskit")]
|
||||||
pub accesskit_update: Option<accesskit::TreeUpdate>,
|
pub accesskit_update: Option<accesskit::TreeUpdate>,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user