egui/emigui/README.md

99 lines
3.8 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
* [ ] BUG FIX: Don't catch clicks on closed windows
2020-05-08 19:31:27 +00:00
* [ ] Windows should open from Regions and be boxed by parent region.
* Then we could open the example app inside a window in the example app, recursively.
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
2020-04-23 17:15:17 +00:00
* [x] Add support for clicking links
2020-04-21 08:27:53 +00:00
* [ ] Menu bar (File, Edit, etc)
2020-04-29 19:25:49 +00:00
* [ ] Text input
* [x] Input events (key presses)
* [x] Text focus
* [ ] Cursor movement
* [ ] 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
* [ ] 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 Region)
* [ ] Cascading layout: same lite if it fits, else next line. Like text.
* [ ] Grid layout
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
2020-05-08 19:31:27 +00:00
* [ ] Read url fragment and redirect to a subpage (e.g. different examples apps)
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 Region::clip_rect from Region::rect
* [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. `region.containers((Frame::new(), Resize::new(), ScrollArea::new()), |ui| ...)`
### Input
* [ ] Distinguish between clicks and drags
* [ ] Double-click
* [x] Text
### Debugability / Inspection
* [x] Widget debug rectangles
* [ ] Easily debug why something keeps expanding
2020-04-21 08:27:53 +00:00
### Other
* [x] Persist UI state in external storage
2020-04-23 17:15:17 +00:00
* [ ] Pixel-perfect rendering (round positions to nearest pixel).
2020-04-21 08:27:53 +00:00
* [ ] Build in a profiler which tracks which region in which window takes up CPU.
* [ ] Draw as flame graph
* [ ] Draw as hotmap
### 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?
2020-05-04 19:35:16 +00:00
* [ ] Solve which parts of Context are behind a mutex
* [ ] All of Context behind one mutex?
* [ } Break up Context into Input, State, Output ?
2020-04-21 08:27:53 +00:00
* [ ] Rename Region to something shorter?
* `region: &Region` `region.add(...)` :/
* `gui: &Gui` `gui.add(...)` :)
* `ui: &Ui` `ui.add(...)` :)
* [ ] 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.