diff --git a/crates/eframe/Cargo.toml b/crates/eframe/Cargo.toml index 619ae8e5..4bafe743 100644 --- a/crates/eframe/Cargo.toml +++ b/crates/eframe/Cargo.toml @@ -39,6 +39,16 @@ default = [ ## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/). accesskit = ["egui/accesskit", "egui-winit/accesskit"] +# Allow crates to choose an android-activity backend via Winit +# - It's important that most applications should not have to depend on android-activity directly, and can +# rely on Winit to pull in a suitable version (unlike most Rust crates, any version conflicts won't link) +# - It's also important that we don't impose an android-activity backend by taking this choice away from applications. + +## Enable the `game-activity` backend via `egui-winit` on Android +android-game-activity = ["egui-winit/android-game-activity"] +## Enable the `native-activity` backend via `egui-winit` on Android +android-native-activity = ["egui-winit/android-native-activity"] + ## If set, egui will use `include_bytes!` to bundle some fonts. ## If you plan on specifying your own fonts you may disable this feature. default_fonts = ["egui/default_fonts"] @@ -46,12 +56,6 @@ default_fonts = ["egui/default_fonts"] ## Use [`glow`](https://github.com/grovesNL/glow) for painting, via [`egui_glow`](https://github.com/emilk/egui/tree/master/crates/egui_glow). glow = ["dep:glow", "dep:egui_glow", "dep:glutin", "dep:glutin-winit"] -## Enables wayland support and fixes clipboard issue. -wayland = ["egui-winit/wayland"] - -## Enables compiling for x11. -x11 = ["egui-winit/x11"] - ## Enable saving app state to disk. persistence = [ "directories-next", @@ -63,32 +67,29 @@ persistence = [ ## Enable profiling with the [`puffin`](https://docs.rs/puffin) crate. ## -## Only enabled on native, because of the low resolution (1ms) of clocks in browsers. ## `eframe` will call `puffin::GlobalProfiler::lock().new_frame()` for you +## +## Only enabled on native, because of the low resolution (1ms) of clocks in browsers. puffin = ["dep:puffin", "egui/puffin", "egui_glow?/puffin", "egui-wgpu?/puffin"] +## Enables wayland support and fixes clipboard issue. +wayland = ["egui-winit/wayland"] + ## Enable screen reader support (requires `ctx.options_mut(|o| o.screen_reader = true);`) on web. ## -## For other platforms, use the "accesskit" feature instead. +## For other platforms, use the `accesskit` feature instead. web_screen_reader = ["tts"] -## If set, eframe will look for the env-var `EFRAME_SCREENSHOT_TO` and write a screenshot to that location, and then quit. -## This is used to generate images for the examples. -__screenshot = [] - ## Use [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui-wgpu`](https://github.com/emilk/egui/tree/master/crates/egui-wgpu)). ## This overrides the `glow` feature. wgpu = ["dep:wgpu", "dep:egui-wgpu", "dep:pollster", "dep:raw-window-handle"] -# Allow crates to choose an android-activity backend via Winit -# - It's important that most applications should not have to depend on android-activity directly, and can -# rely on Winit to pull in a suitable version (unlike most Rust crates, any version conflicts won't link) -# - It's also important that we don't impose an android-activity backend by taking this choice away from applications. +## Enables compiling for x11. +x11 = ["egui-winit/x11"] -## Enable the `native-activity` backend via `egui-winit` on Android -android-native-activity = ["egui-winit/android-native-activity"] -## Enable the `game-activity` backend via `egui-winit` on Android -android-game-activity = ["egui-winit/android-game-activity"] +## If set, eframe will look for the env-var `EFRAME_SCREENSHOT_TO` and write a screenshot to that location, and then quit. +## This is used to generate images for examples. +__screenshot = [] [dependencies] egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ diff --git a/crates/egui-winit/Cargo.toml b/crates/egui-winit/Cargo.toml index 5f670007..bc94ae9f 100644 --- a/crates/egui-winit/Cargo.toml +++ b/crates/egui-winit/Cargo.toml @@ -23,6 +23,15 @@ default = ["clipboard", "links", "wayland", "winit/default", "x11"] ## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/). accesskit = ["accesskit_winit", "egui/accesskit"] +# Allow crates to choose an android-activity backend via Winit +# - It's important that most applications should not have to depend on android-activity directly, and can +# rely on Winit to pull in a suitable version (unlike most Rust crates, any version conflicts won't link) +# - It's also important that we don't impose an android-activity backend by taking this choice away from applications. +## Enable the `game-activity` backend via Winit on Android +android-game-activity = ["winit/android-game-activity"] +## Enable the `native-activity` backend via Winit on Android +android-native-activity = ["winit/android-native-activity"] + ## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast [`egui::epaint::Vertex`], [`egui::Vec2`] etc to `&[u8]`. bytemuck = ["egui/bytemuck"] @@ -45,16 +54,6 @@ wayland = ["winit/wayland"] ## Enables compiling for x11. x11 = ["winit/x11"] -# Allow crates to choose an android-activity backend via Winit -# - It's important that most applications should not have to depend on android-activity directly, and can -# rely on Winit to pull in a suitable version (unlike most Rust crates, any version conflicts won't link) -# - It's also important that we don't impose an android-activity backend by taking this choice away from applications. - -## Enable the `native-activity` backend via Winit on Android -android-native-activity = ["winit/android-native-activity"] -## Enable the `game-activity` backend via Winit on Android -android-game-activity = ["winit/android-game-activity"] - [dependencies] egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ "log", diff --git a/crates/egui/Cargo.toml b/crates/egui/Cargo.toml index c8ae8472..cd70f192 100644 --- a/crates/egui/Cargo.toml +++ b/crates/egui/Cargo.toml @@ -22,6 +22,10 @@ all-features = true [features] default = ["default_fonts"] +## Exposes detailed accessibility implementation required by platform +## accessibility APIs. Also requires support in the egui integration. +accesskit = ["dep:accesskit"] + ## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast [`epaint::Vertex`], [`emath::Vec2`] etc to `&[u8]`. bytemuck = ["epaint/bytemuck"] @@ -81,8 +85,6 @@ ahash = { version = "0.8.1", default-features = false, features = [ nohash-hasher = "0.2" #! ### Optional dependencies -## Exposes detailed accessibility implementation required by platform -## accessibility APIs. Also requires support in the egui integration. accesskit = { version = "0.11", optional = true } backtrace = { version = "0.3", optional = true } diff --git a/crates/egui/src/lib.rs b/crates/egui/src/lib.rs index e26e2625..2647f72f 100644 --- a/crates/egui/src/lib.rs +++ b/crates/egui/src/lib.rs @@ -12,6 +12,10 @@ //! Then you add a [`Window`] or a [`SidePanel`] to get a [`Ui`], which is what you'll be using to add all the buttons and labels that you need. //! //! +//! ## Feature flags +#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] +//! +//! //! # Using egui //! //! To see what is possible to build with egui you can check out the online demo at . @@ -325,10 +329,6 @@ //! }); // the temporary settings are reverted here //! # }); //! ``` -//! -//! ## Feature flags -#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] -//! #![allow(clippy::float_cmp)] #![allow(clippy::manual_range_contains)] diff --git a/crates/egui_glow/src/lib.rs b/crates/egui_glow/src/lib.rs index 4af9e409..e5381952 100644 --- a/crates/egui_glow/src/lib.rs +++ b/crates/egui_glow/src/lib.rs @@ -1,6 +1,6 @@ //! [`egui`] bindings for [`glow`](https://github.com/grovesNL/glow). //! -//! The main types you want to look are are [`Painter`]. +//! The main type you want to look at is [`Painter`]. //! //! If you are writing an app, you may want to look at [`eframe`](https://docs.rs/eframe) instead. //! diff --git a/crates/egui_plot/src/items/values.rs b/crates/egui_plot/src/items/values.rs index 55e0e464..0527fb26 100644 --- a/crates/egui_plot/src/items/values.rs +++ b/crates/egui_plot/src/items/values.rs @@ -47,6 +47,7 @@ impl PlotPoint { // ---------------------------------------------------------------------------- +/// Solid, dotted, dashed, etc. #[derive(Debug, PartialEq, Clone, Copy)] pub enum LineStyle { Solid, @@ -319,6 +320,7 @@ impl PlotPoints { // ---------------------------------------------------------------------------- +/// Circle, Diamond, Square, Cross, … #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub enum MarkerShape { Circle, diff --git a/crates/egui_plot/src/lib.rs b/crates/egui_plot/src/lib.rs index 835a75d1..111f5f65 100644 --- a/crates/egui_plot/src/lib.rs +++ b/crates/egui_plot/src/lib.rs @@ -1,4 +1,4 @@ -//! Simple plotting library. +//! Simple plotting library for [`egui`](https://github.com/emilk/egui). //! //! ## Feature flags #![cfg_attr(feature = "document-features", doc = document_features::document_features!())] @@ -77,6 +77,7 @@ impl Default for CoordinatesFormatter { const MIN_LINE_SPACING_IN_POINTS: f64 = 6.0; // TODO(emilk): large enough for a wide label +/// Two bools, one for each axis (X and Y). #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct AxisBools {