egui/emigui/README.md

107 lines
4.1 KiB
Markdown
Raw Normal View History

# GUI implementation
This is the core library crate Emigui. It is fully platform independent without any backend. You give the Emigui library input each frame (mouse pos etc), and it outputs a triangle mesh for you to paint.
## TODO:
2020-04-21 08:27:53 +00:00
### Widgets
2020-04-21 14:50:56 +00:00
* [x] Label
* [x] Button
* [x] Checkbox
* [x] Radiobutton
* [x] Horizontal slider
* [ ] Vertical slider
* [x] Collapsing header region
2020-04-21 14:50:56 +00:00
* [x] Tooltip
2020-04-21 08:27:53 +00:00
* [x] Movable/resizable windows
2020-05-03 11:28:47 +00:00
* [x] Kinetic windows
* [ ] Windows should open from `UI`s and be boxed by parent ui.
2020-05-08 19:31:27 +00:00
* Then we could open the example app inside a window in the example app, recursively.
* [x] Resize any side and corner on windows
2020-05-17 10:26:17 +00:00
* [ ] Fix autoshrink
2020-04-21 08:27:53 +00:00
* [ ] Scroll areas
2020-04-22 15:38:36 +00:00
* [x] Vertical scrolling
* [ ] Horizontal scrolling
2020-04-22 18:01:49 +00:00
* [x] Scroll-wheel input
2020-04-22 15:38:36 +00:00
* [x] Drag background to scroll
* [ ] Kinetic scrolling
* [x] Add support for clicking hyperlinks
* [x] Menu bar (File, Edit, etc)
* [ ] Sub-menus
* [ ] Keyboard shortcuts
2020-04-29 19:25:49 +00:00
* [ ] Text input
* [x] Input events (key presses)
* [x] Text focus
2020-05-17 10:26:17 +00:00
* [x] Cursor movement
2020-04-29 19:25:49 +00:00
* [ ] Text selection
2020-04-22 15:38:36 +00:00
* [ ] Clipboard copy/paste
2020-04-29 19:25:49 +00:00
* [ ] Move focus with tab
* [x] Handle leading/trailing space
2020-04-21 08:27:53 +00:00
* [ ] Color picker
* [ ] Style editor
2020-04-23 07:50:03 +00:00
* [ ] Table with resizable columns
* [ ] Layout
* [ ] Generalize Layout (separate from Ui)
* [ ] Cascading layout: same lite if it fits, else next line. Like text.
* [ ] Grid layout
2020-05-17 10:26:17 +00:00
* [ ] Point list
2020-05-08 19:31:27 +00:00
* [ ] Image support
2020-04-23 07:50:03 +00:00
### Web version:
* [x] Scroll input
2020-04-23 17:15:17 +00:00
* [x] Change to resize cursor on hover
* [ ] Make it a JS library for easily creating your own stuff
* [x] Read url fragment and redirect to a subpage (e.g. different examples apps)
2020-04-21 08:27:53 +00:00
2020-05-17 10:26:17 +00:00
### Visuals
* [x] Simplify button style to make for nicer collapsible headers. Maybe weak outline? Or just subtle different text color?
2020-05-17 10:26:17 +00:00
* [/] Pixel-perfect painting (round positions to nearest pixel).
* [ ] Make sure alpha blending is correct (different between web and glium)
2020-05-17 10:26:17 +00:00
* [ ] Color picker widgets
* [ ] Fix thin rounded corners rendering bug (too bright)
2020-04-21 08:27:53 +00:00
### Animations
Add extremely quick animations for some things, maybe 2-3 frames. For instance:
* [x] Animate collapsing headers with clip_rect
2020-04-21 08:27:53 +00:00
### Clip rects
* [x] Separate Ui::clip_rect from Ui::rect
2020-04-21 08:27:53 +00:00
* [x] Use clip rectangles when painting
* [x] Use clip rectangles when interacting
* [x] Adjust clip rects so edges of child widgets aren't clipped
2020-04-29 19:25:49 +00:00
* [ ] Use HW clip rects
2020-04-21 14:50:56 +00:00
### Modularity
* [x] `trait Widget` (`Label`, `Slider`, `Checkbox`, ...)
* [ ] `trait Container` (`Frame`, `Resize`, `ScrollArea`, ...)
* [ ] `widget::TextButton` implemented as a `container::Button` which contains a `widget::Label`.
* [ ] Easily chain `Container`s without nested closures.
* e.g. `ui.containers((Frame::new(), Resize::new(), ScrollArea::new()), |ui| ...)`
### Input
* [x] Distinguish between clicks and drags
2020-05-23 20:10:08 +00:00
* [x] Double-click
* [x] Text
2020-05-23 20:10:08 +00:00
* [ ] Support all mouse buttons
### Debugability / Inspection
* [x] Widget debug rectangles
* [x] Easily debug why something keeps expanding
2020-04-21 08:27:53 +00:00
### Other
* [x] Persist UI state in external storage
* [ ] Persist Example App state
* [ ] Build in a profiler which tracks which `Ui` in which window takes up CPU.
2020-04-21 08:27:53 +00:00
* [ ] Draw as flame graph
* [ ] Draw as hotmap
* [ ] Change `width.min(max_width)` to `width.at_most(max_width)`
2020-04-21 08:27:53 +00:00
### Names and structure
2020-04-22 15:38:36 +00:00
* [ ] Rename things to be more consistent with Dear ImGui
2020-05-08 20:25:28 +00:00
* [x] Combine Emigui and Context?
* [x] Solve which parts of Context are behind a mutex
2020-05-08 20:42:31 +00:00
* [x] Rename Region to Ui
* [ ] Move Path and Triangles to own crate
* [ ] Maybe find a shorter name for the library like `egui`?
2020-04-21 08:27:53 +00:00
### Global widget search
Ability to do a search for any widget. The search works even for collapsed regions and closed windows and menus. This is implemented like this: while searching, all region are layed out and their add_content functions are run. If none of the contents matches the search, the layout is reverted and nothing is shown. So windows will get temporarily opened and run, but if the search is not a match in the window it is closed again. This means then when searching your whole GUI is being run, which may be a bit slower, but it would be a really awesome feature.