mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 21:00:03 -04:00
Remove egui_web and epi (#1545)
* Remove integration name (it is always eframe) * Remove egui_web crate * Move egui_web/CHANGELOG.md into eframe/CHANGELOG.md * Remove all mentions of egui_web * Remove epi crate and absorb into eframe * egui_glow: only use puffin on native * Remove WASM doc from CI (we don't generate it anyways!) * Remove eframe::epi and improve eframe docs
This commit is contained in:
@@ -639,7 +639,7 @@ impl Context {
|
||||
/// Will become active at the start of the next frame.
|
||||
///
|
||||
/// Note that this may be overwritten by input from the integration via [`RawInput::pixels_per_point`].
|
||||
/// For instance, when using `egui_web` the browsers native zoom level will always be used.
|
||||
/// For instance, when using `eframe` on web, the browsers native zoom level will always be used.
|
||||
pub fn set_pixels_per_point(&self, pixels_per_point: f32) {
|
||||
if pixels_per_point != self.pixels_per_point() {
|
||||
self.request_repaint();
|
||||
|
||||
@@ -131,7 +131,7 @@ impl RawInput {
|
||||
pub struct HoveredFile {
|
||||
/// Set by the `egui-winit` backend.
|
||||
pub path: Option<std::path::PathBuf>,
|
||||
/// With the `egui_web` backend, this is set to the mime-type of the file (if available).
|
||||
/// With the `eframe` web backend, this is set to the mime-type of the file (if available).
|
||||
pub mime: String,
|
||||
}
|
||||
|
||||
@@ -141,11 +141,11 @@ pub struct HoveredFile {
|
||||
pub struct DroppedFile {
|
||||
/// Set by the `egui-winit` backend.
|
||||
pub path: Option<std::path::PathBuf>,
|
||||
/// Name of the file. Set by the `egui_web` backend.
|
||||
/// Name of the file. Set by the `eframe` web backend.
|
||||
pub name: String,
|
||||
/// Set by the `egui_web` backend.
|
||||
/// Set by the `eframe` web backend.
|
||||
pub last_modified: Option<std::time::SystemTime>,
|
||||
/// Set by the `egui_web` backend.
|
||||
/// Set by the `eframe` web backend.
|
||||
pub bytes: Option<std::sync::Arc<[u8]>>,
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ pub struct PlatformOutput {
|
||||
pub events: Vec<OutputEvent>,
|
||||
|
||||
/// Is there a mutable [`TextEdit`](crate::TextEdit) under the cursor?
|
||||
/// Use by `egui_web` to show/hide mobile keyboard and IME agent.
|
||||
/// Use by `eframe` web to show/hide mobile keyboard and IME agent.
|
||||
pub mutable_text_under_cursor: bool,
|
||||
|
||||
/// Screen-space position of text edit cursor (used for IME).
|
||||
|
||||
@@ -306,7 +306,7 @@ impl InputState {
|
||||
/// ```
|
||||
///
|
||||
/// By far not all touch devices are supported, and the details depend on the `egui`
|
||||
/// integration backend you are using. `egui_web` supports multi touch for most mobile
|
||||
/// integration backend you are using. `eframe` web supports multi touch for most mobile
|
||||
/// devices, but not for a `Trackpad` on `MacOS`, for example. The backend has to be able to
|
||||
/// capture native touch events, but many browsers seem to pass such events only for touch
|
||||
/// _screens_, but not touch _pads._
|
||||
|
||||
@@ -404,9 +404,9 @@ impl<'t> TextEdit<'t> {
|
||||
});
|
||||
let mut state = TextEditState::load(ui.ctx(), id).unwrap_or_default();
|
||||
|
||||
// On touch screens (e.g. mobile in egui_web), should
|
||||
// On touch screens (e.g. mobile in `eframe` web), should
|
||||
// dragging select text, or scroll the enclosing [`ScrollArea`] (if any)?
|
||||
// Since currently copying selected text in not supported on `egui_web`,
|
||||
// Since currently copying selected text in not supported on `eframe` web,
|
||||
// we prioritize touch-scrolling:
|
||||
let any_touches = ui.input().any_touches(); // separate line to avoid double-locking the same mutex
|
||||
let allow_drag_to_select = !any_touches || ui.memory().has_focus(id);
|
||||
@@ -595,7 +595,7 @@ impl<'t> TextEdit<'t> {
|
||||
}
|
||||
|
||||
if interactive {
|
||||
// egui_web uses `text_cursor_pos` when showing IME,
|
||||
// eframe web uses `text_cursor_pos` when showing IME,
|
||||
// so only set it when text is editable and visible!
|
||||
ui.ctx().output().text_cursor_pos = Some(cursor_pos.left_top());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user