egui/examples
Ian Hobson 30277233ce
Add support for the safe area on iOS (#7578)
This PR is a continuation of #4915 by @frederik-uni and @lucasmerlin
that introduces support for keeping egui content within the 'safe area'
on iOS (avoiding the notch / dynamic island / menu bar etc.), with the
following changes:

- `SafeArea` now wraps `MarginF32` and has been renamed to
`SafeAreaInsets` to clarify its purpose.
- `InputState::screen_rect` is now marked as deprecated in favour of
either `viewport_rect` (which contains the entire screen), or
`content_rect` (which is the viewport rect with the safe area insets
removed).
- I added some comments to the safe area insets logic pointing out the
[safe area API coming in winit
v0.31](https://github.com/rust-windowing/winit/issues/3910).

---------

Co-authored-by: frederik-uni <147479464+frederik-uni@users.noreply.github.com>
Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-10-07 12:30:09 +02:00
..
confirm_exit Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
custom_3d_glow Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
custom_font Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
custom_font_style Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
custom_keypad Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
custom_style Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
custom_window_frame Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
external_eventloop Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
external_eventloop_async Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
file_dialog Add support for the safe area on iOS (#7578) 2025-10-07 12:30:09 +02:00
hello_android Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
hello_world Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
hello_world_par Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
hello_world_simple Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
images Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
keyboard_events Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
multiple_viewports Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
popups Release 0.32.0 - Atoms, popups, and better SVG support (#7329) 2025-07-10 16:58:39 +02:00
puffin_profiler Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
screenshot Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
serial_windows Update MSRV from 1.86 to 1.88 (#7579) 2025-10-02 19:12:29 +02:00
user_attention Use a lot more let-else (#7582) 2025-10-02 19:47:00 +02:00
README.md Rename `master` branch to `main` (#7034) 2025-05-08 09:15:42 +02:00
run_all.sh Fix up some examples (#3614) 2023-11-23 12:58:44 +01:00

README.md

egui and eframe examples

All the examples in this folder uses eframe to set up a window for egui. Some examples are specific to eframe, but many are applicable to any egui integration.

There are a lot more examples at https://www.egui.rs, and it has links to the source code of each example.

Also check out the official docs at https://docs.rs/egui and https://docs.rs/eframe.

Note that all the examples on main are for the latest main version of egui.

If you want to look for examples for a specific version of egui, go to that tag, e.g. https://github.com/emilk/egui/tree/latest/examples.