egui/TODO.md

183 lines
7.3 KiB
Markdown
Raw Normal View History

2020-08-29 16:16:43 +00:00
# TODO
2020-09-09 15:13:02 +00:00
2020-08-29 16:16:43 +00:00
TODO-list for the Egui project. If you looking for something to do, look here.
## Top priority
* Text input: text selection etc
* Fix `is_mouse_over_area()` for menu bar:
* Probably a good time to create some sort of `ctx.top_panel()` allocation system and refactor paint layers
## Other
2020-09-08 07:19:40 +00:00
* Widgets
2020-10-01 20:40:49 +00:00
* [ ] Tooltips:
* [ ] Tooltip widget: Something that looks like this: (?) :that shows text on hover.
2020-10-01 20:53:11 +00:00
* [ ] ui.info_button().on_hover_text("More info here");
2020-10-01 20:40:49 +00:00
* [ ] Allow adding multiple tooltips to the same widget, showing them all one after the other.
2020-09-09 15:13:02 +00:00
* [ ] Text input
* [x] Input
* [x] Text focus
* [x] Cursor movement
* [ ] Text selection
* [ ] Clipboard copy/paste
* [ ] Move focus with tab
* [ ] Vertical slider
2020-09-09 15:13:02 +00:00
* [/] Color picker
* [x] linear rgb <-> sRGB
* [x] HSV
* [x] Color edit button with popup color picker
* [x] Gamma for value (brightness) slider
* [x] Easily edit users own (s)RGBA quadruplets (`&mut [u8;4]`/`[f32;4]`)
* [x] RGB editing without alpha
2020-09-09 15:13:02 +00:00
* [ ] Additive blending aware color picker
* [ ] Premultiplied alpha is a bit of a pain in the ass. Maybe rethink this a bit.
* [ ] Hue wheel
* Containers
2020-09-09 15:13:02 +00:00
* [ ] Scroll areas
* [x] Vertical scrolling
* [x] Scroll-wheel input
* [x] Drag background to scroll
* [x] Kinetic scrolling
* [ ] Horizontal scrolling
2020-09-08 07:19:40 +00:00
* Input
2020-09-09 15:13:02 +00:00
* [x] Distinguish between clicks and drags
* [x] Double-click
* [x] Text
* [ ] Support all mouse buttons
* [ ] Distinguish between touch input and mouse input
* [ ] Get modifier keys
* [ ] Keyboard shortcuts
* [ ] Copy, paste, undo, ...
2020-10-01 20:40:49 +00:00
* Text
2020-09-09 15:13:02 +00:00
* [/] Unicode
* [x] Shared mutable expanding texture map
* [ ] Text editing of unicode
* [ ] Change text style/color and continue in same layout
2020-10-01 20:40:49 +00:00
* Menu bar (File, Edit, etc)
2020-09-09 15:13:02 +00:00
* [ ] Sub-menus
* [ ] Keyboard shortcuts
2020-10-01 20:40:49 +00:00
* Layout
2020-09-09 15:13:02 +00:00
* [x] Generalize Layout (separate from Ui)
2020-10-01 20:40:49 +00:00
* [ ] Break out `Region` with min_size + max_size + cursor + layout
2020-09-09 15:13:02 +00:00
* [ ] Table with resizable columns
* [ ] Grid layout
* [ ] Point list
2020-08-29 16:16:43 +00:00
* Windows
2020-09-09 15:13:02 +00:00
* [ ] Positioning preference: `window.preference(Top, Right)`
* [ ] Keeping right/bottom on expand. Maybe cover jitteryness with quick animation?
* [ ] Make auto-positioning of windows respect permanent side-bars.
2020-08-29 16:16:43 +00:00
* Visuals
2020-09-09 15:13:02 +00:00
* [x] Pixel-perfect painting (round positions to nearest pixel).
* [x] Fix `aa_size`: should be 1, currently fudged at 1.5
* [x] Fix thin rounded corners rendering bug (too bright)
* [x] Smoother animation (e.g. ease-out)? NO: animation are too brief for subtelty
* [x] Veriy alpha and sRGB correctness
2020-09-09 15:13:02 +00:00
* [x] sRGBA decode in fragment shader
* [ ] Fix alpha blending / sRGB weirdness in WebGL (EXT_sRGB)
2020-09-09 15:13:02 +00:00
* [ ] Thin circles look bad
2020-10-01 20:40:49 +00:00
* [ ] Optimize small filled circles with the global texture.
2020-09-08 07:19:40 +00:00
* Id
2020-09-09 15:13:02 +00:00
* struct TempId(u64); struct StateId(u64);
* `TempId` is count-based. Only good for interaction. Can't be used for storing state.
* `StateId` must be generated from e.g. label (window title, ...), and is required for storing state (window position, ...).
* Both can be conveted to `Id` which is used for temporary stuff like interactions and animations.
* An `Ui`:s has two seed ids: one state, one temp. State is ONLY generated by `StateId`, no polution. A new `Ui` region is either created with e.g. a label to generate a new child `StateId`, or the region inherits the same id as the parent (but different `TempId` seed).
2020-09-08 07:19:40 +00:00
* Demo
2020-09-09 15:13:02 +00:00
* Manual layout example:
* ui.child_ui_pos(pos).label("Label at specific position");
* ui.child_ui_rect(rect).label("Label in a rectangle");
2020-10-01 20:40:49 +00:00
* Reactive mode
* [ ] Ask Egui if an event requires repainting
* [ ] Only repaint when mouse is over a Egui window (or is pressed and there is an active widget)
## Backends
* [ ] Extract egui_app as egui_backend
2020-08-29 16:16:43 +00:00
2020-10-01 20:40:49 +00:00
* egui_glium
* egui_web
* [ ] async HTTP requests
* [ ] egui_bitmap: slow reference rasterizer for tests
* Port https://github.com/emilk/imgui_software_renderer
* Less important: fast rasterizer for embedded 🤷‍♀️
* [ ] egui_terminal (think ncurses)
* [ ] replace `round_to_pixel` with `round_to_X` where user can select X to be e.g. width of a letter
* [ ] egui_svg: No idea what this would be for :)
### egui_web
2020-09-09 15:13:02 +00:00
* [x] Scroll input
* [x] Change to resize cursor on hover
* [x] Port most code to Rust
* [x] Read url fragment and redirect to a subpage (e.g. different examples apps)]
2020-10-01 20:40:49 +00:00
* [ ] Async HTTP requests
* [ ] Fix WebGL colors/blending (try EXT_sRGB)
2020-09-09 15:13:02 +00:00
* [ ] Embeddability
* [ ] Support canvas that does NOT cover entire screen.
* [ ] Support multiple eguis in one web page.
* [ ] Filtering events to avoid too frequent repaints
* [ ] Multiple canvases from the same rust code
* Different Egui instances, same app
* Allows very nice web integration
2020-08-29 16:16:43 +00:00
## Modularity
2020-09-09 15:13:02 +00:00
2020-08-29 16:16:43 +00:00
* [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.
2020-10-01 20:40:49 +00:00
* e.g. `ui.wrap(Frame::new()).wrap(Resize::new()).wrap(ScrollArea::new()).show(|ui| ...)`
2020-08-29 16:16:43 +00:00
* [ ] Attach labels to checkboxes, radio buttons and sliders with a separate wrapper-widget ?
## Other
2020-09-09 15:13:02 +00:00
2020-08-29 16:16:43 +00:00
* [x] Persist UI state in external storage
* [x] Persist Example App state
* [ ] Create an Egui icon (or use an emoji)
* [ ] Build in a profiler which tracks which `Ui` in which window takes up CPU.
2020-09-09 15:13:02 +00:00
* [ ] Draw as flame graph
* [ ] Draw as hotmap
2020-10-01 20:40:49 +00:00
* [ ] Integrate puffin?
2020-08-29 16:16:43 +00:00
* [ ] Windows should open from `UI`s and be boxed by parent ui.
2020-09-09 15:13:02 +00:00
* Then we could open the example app inside a window in the example app, recursively.
2020-08-29 16:16:43 +00:00
* [ ] Implement a minimal markdown viewer
## Names and structure
2020-09-09 15:13:02 +00:00
2020-08-29 16:16:43 +00:00
* [ ] Rename things to be more consistent with Dear ImGui ?
2020-09-08 07:19:40 +00:00
* [ ] Put everything in `Context` behind the same Mutex? `struct Context(Arc<Mutex<ContextImpl>>);`, with e.g. `context.lock().memory.foo`?
* [ ] Resolve the various uses of "heading", "header", "title" etc
2020-08-29 16:16:43 +00:00
## Global widget search
2020-09-09 15:13:02 +00:00
2020-08-29 16:16:43 +00:00
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.
2020-09-09 15:13:02 +00:00
## Done
2020-08-29 16:16:43 +00:00
* Widgets
2020-09-09 15:13:02 +00:00
* [x] Label
* [x] Button
* [x] Checkbox
* [x] Radiobutton
* [x] Collapsing header region
* [x] Tooltip
* [x] Movable/resizable windows
* [x] Kinetic windows
* [x] Add support for clicking hyperlinks
2020-08-29 16:16:43 +00:00
* Containers
2020-09-09 15:13:02 +00:00
* [x] Vertical slider
* [x] Resize any side and corner on windows
* [x] Fix autoshrink
* [x] Automatic positioning of new windows
2020-08-29 16:16:43 +00:00
* Simple animations
* Clip rects
2020-09-09 15:13:02 +00:00
* [x] Separate Ui::clip_rect from Ui::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
* [x] Use HW clip rects
2020-10-01 20:40:49 +00:00
* [x] Image support
* [x] Show user textures
* [x] API for creating a texture managed by `egui::app::Backend`