egui/crates/egui_demo_lib/tests/snapshots/demos
lucasmerlin a8e98d3f9b
Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713)
This introduces new `Tooltip` and `Popup` structs that unify and extend
the old popups and tooltips.

`Popup` handles the positioning and optionally stores state on whether
the popup is open (for click based popups like `ComboBox`, menus,
context menus).
`Tooltip` is based on `Popup` and handles state of whether the tooltip
should be shown (which turns out to be quite complex to handles all the
edge cases).

Both `Popup` and `Tooltip` can easily be constructed from a `Response`
and then customized via builder methods.

This also introduces `PositionAlign`, for aligning something outside of
a `Rect` (in contrast to `Align2` for aligning inside a `Rect`). But I
don't like the name, any suggestions? Inspired by [mui's tooltip
positioning](https://mui.com/material-ui/react-tooltip/#positioned-tooltips).

* Part of #4607 
* [x] I have followed the instructions in the PR template

TODOs:
- [x] Automatic tooltip positioning based on available space
- [x] Review / fix / remove all code TODOs 
- [x] ~Update the helper fns on `Response` to be consistent in naming
and parameters (Some use tooltip, some hover_ui, some take &self, some
take self)~ actually, I think the naming and parameter make sense on
second thought
- [x] Make sure all old code is marked deprecated

For discussion during review:
- the following check in `show_tooltip_for` still necessary?:
```rust
     let is_touch_screen = ctx.input(|i| i.any_touches());
     let allow_placing_below = !is_touch_screen; // There is a finger below. TODO: Needed?
```
2025-02-18 15:53:07 +01:00
..
Bézier Curve.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Code Editor.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Code Example.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Context Menus.png Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713) 2025-02-18 15:53:07 +01:00
Dancing Strings.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Drag and Drop.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Extra Viewport.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Font Book.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Frame.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Highlighting.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Interactive Container.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Misc Demos.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Modals.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Multi Touch.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Painting.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Pan Zoom.png Change `Harness::run` to run until no more repaints are requested (#5580) 2025-01-07 08:33:44 +01:00
Panels.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Popups.png Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713) 2025-02-18 15:53:07 +01:00
Scene.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Screenshot.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Scrolling.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Sliders.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Strip.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Table.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Text Layout.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
TextEdit.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Tooltips.png Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713) 2025-02-18 15:53:07 +01:00
Undo Redo.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Window Options.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00