1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 15:13:12 -04:00
Files
egui/ARCHITECTURE.md
Francisco Ayala Le Brun 6a785d4b47 Taking over egui_glium (#3535)
Hello. I would like to maintain egui_glium. I have already updated my
fork to the newest version of glium. You can find it at:
https://github.com/fayalalebrun/egui_glium

Let me know about next steps regarding access to crates.io.

<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review you PR, but my time is limited!
-->
2023-11-11 18:35:57 +01:00

2.0 KiB

Architecture

This document describes how the crates that make up egui are all connected.

Also see CONTRIBUTING.md for what to do before opening a PR.

Crate overview

The crates in this repository are: egui, emath, epaint, egui_extras, egui_plot, egui-winit, egui_glow, egui_demo_lib, egui_demo_app.

egui: The main GUI library.

Example code: if ui.button("Click me").clicked() { … } This is the crate where the bulk of the code is at. egui depends only on emath and epaint.

emath: minimal 2D math library

Examples: Vec2, Pos2, Rect, lerp, remap

epaint

2d shapes and text that can be turned into textured triangles.

Example: Shape::Circle { center, radius, fill, stroke }

Depends on emath.

egui_extras

This adds additional features on top of egui.

egui_plot

Plotting for egui.

egui-winit

This crates provides bindings between egui and winit.

The library translates winit events to egui, handled copy/paste, updates the cursor, open links clicked in egui, etc.

egui_glow

Puts an egui app inside a native window on your laptop. Paints the triangles that egui outputs using glow.

eframe

eframe is the official egui framework, built so you can compile the same app for either web or native.

The demo that you can see at https://www.egui.rs is using eframe to host the egui. The demo code is found in:

egui_demo_lib

Depends on egui. This contains a bunch of uses of egui and looks like the ui code you would write for an egui app.

egui_demo_app

Thin wrapper around egui_demo_lib so we can compile it to a web site or a native app executable. Depends on egui_demo_lib + eframe.

Other integrations

There are also many great integrations for game engines such as bevy and miniquad which you can find at https://github.com/emilk/egui#integrations.