* Silence a few clippy warnings
* Use named threads
* Remove some deprecated functions
* Document Context and Ui fully
* Use `parking_lot::Mutex` in `eframe`
* Expand clippy.toml files
* build fix
* Add `TextFormat::extra_letter_spacing`
* Add control of line height
* Add to text layout demo
* Move the text layout demo to its own window in the demo app
* Fix doclink
* Better document points vs pixels
* Better documentation and code cleanup
* Get a reference to `IntegrationInfo`
* Add doc comment
* Change `info` to return a reference
* Clone integration info
* Remove `&`
* Clone integration info in another place
* Add generations to serialized state
* Make IdTypeMap into a field struct
* Less code duplication
* Implement garbage collection during serialization
* Add unit-test
* Add docstring
* Build fix
* another fix
* Allow widget focus change with keyboard arrows
* remove set id function
* docs
* Emilk feedback round 1
* Fix compile error
* undo example
* Move out functions from range to memory.rs
* remove contains range
* Use docstrings
* code cleanup
* Improve candidate logic
* More tweaks
* Less `pub`
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
I encountered a case where I needed to know if an egui context menu was
open, even if the mouse cursor was not in an egui area (full details in
discord). I found that every resource I needed to detect that the menu
was open was either private, or pub(crate). While it is possible to
wrap the `Response::context_menu()` in code to do state-tracking, it
becomes necessary to duplicate that code in every place you use a
context menu.
In this commit, I add `Context::is_context_menu_open()`. Named similarly
to `Context::is_pointer_over_area()`, this method will return true if
any context menu is open. This is possible because the context menu
uses a temp var with a fixed Id to store its state. This method just
fetches the state, and interrogates it to see if there is a menu
present.
One helper method, `BarState::has_root()`, was added as all the fields
needed to perform the check were private to the `menu` module.
I've also updated the Context Menu demo to show the result of
`is_context_menu_open()` to verify the code functions as expected.
* Fix the app only taking up half the screen size on iPad
* Fix request_repaint not working on iOS
* Always use run_and_exit on iOS since run_and_return is not supported by winit on iOS right now.
* Fix typo
* Fix eframe glow on ios
* Handle more cases
* Add tooltip_delay option
Similar to the show_tooltips_only_when_still option, but allows the user
to configure a specific delay in seconds, and also makes the tooltip
disappear if the mouse is moved again.
Closes#3232
* Update crates/egui/src/response.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Improved wgpu callbacks
* update documentation on egui_wgpu callbacks
* make shared callback resource map pub
* make it nicer to create epaint::PaintCallback from egui_wgpu callback
* constrain ClippedPrimitive lifetime to outlive wgpu::RenderPass
* Revert callback resources to TypeMap, put finish_prepare on callback trait
* doc string fixes
* Add option to clip text to wrap width
* Spelling
* Better naming, and report back wether the text was elided
* Improve docstrings
* Simplify
* Fix max_rows with multiple paragraphs
* Add note
* Typos
* fix doclink
* Add `Label::elide`
* Label: show full non-elided text on hover
* Add demo of `Label::elide`
* Call it `Label::truncate`
* Clarify limitations of `break_anywhere`
* Better docstrings
We had a bunch of `cfg!(windows)` and `cfg!(macos)` which should
have been `cfg!(target_os = "windows")`.
I wonder what the effects of this PR will be fore Windows 😬
* Bump `wgpu` to 0.17.0
This required bumping wasm-bindgen to 0.2.87
* cargo deny exception for `foreign-types`
* sort deny.toml
* Add fragile-send-sync-non-atomic-wasm feature to wgpu
* cargo deny: ignore children of foreign-types
---------
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>