Emil Ernerfeldt
31d324932c
Introduce egui::FullOutput, returned from Context::run ( #1292 )
...
* Introduce `egui::FullOutput`, returned from `Context::run`
* Rename `Output` to `PlatformOutput`
2022-02-22 17:13:53 +01:00
Emil Ernerfeldt
0a46634c13
Simplify backends by adding fn paint_and_update_textures
helper
2022-02-21 21:49:52 +01:00
Emil Ernerfeldt
0fa4bb9c64
Clean up all Cargo.toml: put features higher, and document them better
2022-02-05 11:11:15 +01:00
Emil Ernerfeldt
47038c631e
Update image 0.23 -> 0.24
2022-02-04 13:31:06 +01:00
Emil Ernerfeldt
c3be566574
egui-winit: Automatically detect and apply dark or light mode ( #1045 )
2022-02-02 17:09:36 +01:00
Emil Ernerfeldt
fa43d16c41
Choose your own font and size ( #1154 )
...
* Refactor text layout: don't need &Fonts in all functions
* Replace indexing in Fonts with member function
* Wrap Fonts in a Mutex
* Remove mutex for Font::glyph_info_cache
* Remove RwLock around Font::characters
* Put FontsImpl and GalleyCache behind the same Mutex
* Round font sizes to whole pixels before deduplicating them
* Make TextStyle !Copy
* Implement user-named TextStyle:s
* round font size earlier
* Cache fonts based on family and size
* Move TextStyle into egui and Style
* Remove body_text_style
* Query graphics about max texture size and use that as font atlas size
* Recreate texture atlas when it is getting full
2022-01-24 14:32:36 +01:00
Emil Ernerfeldt
462f181db3
Partial font texture update ( #1149 )
2022-01-22 11:23:12 +01:00
Emil Ernerfeldt
66d80e2519
Texture loading in egui ( #1110 )
...
* Move texture allocation into epaint/egui proper
* Add TextureHandle
* egui_glow: cast using bytemuck instead of unsafe code
* Optimize glium painter
* Optimize WebGL
* Add example of loading an image from file
2022-01-15 13:59:52 +01:00
Emil Ernerfeldt
d5673412dd
Put everything in Context behind the same Mutex ( #1050 )
...
* Move all interior mutability from Context to CtxRef and make it a handle
* Rename `CtxRef` to `Context`
* The old `Context` is now `ContextImpl` and is non-pub
* Add benchmark Painter::rect
Co-authored-by: Daniel Keller <dklr433@gmail.com>
2022-01-10 23:13:10 +01:00
Emil Ernerfeldt
753d709d3d
Hide console on windows for all examples in release builds ( #1008 )
2021-12-30 22:43:53 +01:00
Emil Ernerfeldt
0146c7e7fc
Release 0.16.0 - Context menus and rich text
2021-12-29 12:07:05 +01:00
Emil Ernerfeldt
190c85a40f
Rename Texture
to FontImage
2021-12-28 21:19:24 +01:00
Emil Ernerfeldt
cda4c8ba13
Minor cleanup following https://github.com/emilk/egui/pull/999
2021-12-28 13:22:01 +01:00
Emil Ernerfeldt
b7441eeee7
Make epi::Frame cloneable so you can allocate textures in other threads ( #999 )
...
Closes https://github.com/emilk/egui/issues/673
Also adds `epi::Image`
2021-12-26 21:21:28 +01:00
Emil Ernerfeldt
d5efa4bbca
1.56 fix: missing_crate_level_docs -> rusdoc::missing_crate_level_docs
2021-12-26 09:56:14 +01:00
Emil Ernerfeldt
c60d17b91b
Set MSRV to 1.56.0 and use rust edition 2021 ( #998 )
2021-12-25 19:32:25 +01:00
Jay Oster
dd99f68e82
Update winit to 0.26 ( #930 )
...
Also update glium, glutin and rfd
2021-12-20 22:44:53 +01:00
d10sfan
90757ca221
Add Button::image_and_text ( #832 )
...
* Support image button with text
* Add example (`cargo run --example native_texture`)
2021-11-13 13:17:02 +01:00
Emil Ernerfeldt
105cb57050
Clean up glsl code
2021-11-13 13:09:08 +01:00
Emil Ernerfeldt
ddd5f6f4f6
winit: don't explicitly handle Cmd-Q and Alt-F4 ( #881 )
...
Closes https://github.com/emilk/egui/issues/877
Still a problem: https://github.com/rust-windowing/winit/issues/1998
2021-11-07 20:58:02 +01:00
Emil Ernerfeldt
49e43885ff
Replace Context::begin_frame/end_frame
with fn run
taking a closure ( #872 )
...
* Replace Context begin_frame/end_frame with `fn run` taking a closure
* Create `egui::__run_test_ui` to replace `Ui::__test`
* Add helper `egui::__run_test_ctx` for doctests
2021-11-03 20:11:25 +01:00
Emil Ernerfeldt
1dbe608e73
Refactor integrations ( #871 )
...
* Unify code in egui_glium and egui_glow into egui_winit::EpiIntegration
* Simplify `EguiGlium` interface
* Simplify `EguiGlow` interface
* egui_web refactor: merge `WebBackend` into `AppRunner`
2021-11-03 13:45:51 +01:00
Emil Ernerfeldt
09b8269326
Rich text for all widgets ( #855 )
...
Introduce `RichText` and `WidgetText`
2021-11-01 21:30:10 +01:00
Emil Ernerfeldt
78dfde40b2
Remove deprecated functions
2021-10-30 09:46:06 +02:00
Emil Ernerfeldt
08cc07bb2d
Release 0.15.0 - Syntax highlighting, hscroll, egui-winit and egui_glow
2021-10-24 16:15:07 +02:00
Emil Ernerfeldt
a3ba85dbb3
Improve docs
2021-10-23 06:03:45 +02:00
Caleb Smith
79d1ede496
Add Frame::set_window_title()
( #828 )
...
* Add `Frame::set_window_title()`
* Changelog and fmt for `Frame::set_window_title()`
Co-authored-by: Caleb Smith <caleb@myrvmail.com>
2021-10-23 00:03:17 +02:00
Emil Ernerfeldt
d97a369c44
End statements with semicolon (clippy::semicolon_if_nothing_returned)
2021-10-20 16:46:57 +02:00
Emil Ernerfeldt
a0cd41755e
Add more clippy lints
2021-10-20 16:30:39 +02:00
Emil Ernerfeldt
19a2a57f80
Rename and clean-up the "pure" glium and glow examples
2021-10-20 15:05:41 +02:00
Emil Ernerfeldt
8178d23d19
Deduplicate code found in both egui_glium and egui_glow ( #819 )
...
* Move window building to egui-winit
* Move icon loading to egui-winit
* `use glow::HasContext;` -> `use glow::HasContext as _;`
* Move FileStorage into epi behind a feature flag
* De-duplicate screen_size_in_pixels and native_pixels_per_point
* Move creation of FileStorage to epi
* Handle epi app output (window size changes etc) in egui-winit
* Move app and memory persistence and autosave logic to egui-winit
* fix check.sh
* Make the epi backend opt-in for egui_glium and egui_glow
* Fix persistence
* Add integration name to epi::IntegrationInfo and the demo
* Clean up Cargo.toml files and fix making egui_glium optional
* fix typo
* Make egui_glium compile without the `epi` feature
2021-10-19 21:40:55 +02:00
Emil Ernerfeldt
844dd9d7a4
Remove "seconds_since_midnight" from epi/eframe. Use chrono instead
...
chrono works both natively and on web.
Related: https://github.com/emilk/egui/issues/212
2021-10-19 15:37:20 +02:00
Emil Ernerfeldt
df3aeab434
Update egui_glium and egui_web changelogs
2021-10-18 23:13:13 +02:00
Emil Ernerfeldt
e2bdd40985
Move WindowSettings from egui_glium to egui-winit
2021-09-30 19:18:51 +02:00
Emil Ernerfeldt
3e1db880dc
Revert change to winit event loop in egui_glium ( #756 )
...
* Revert change to winit event loop in egui_glium
This reverts https://github.com/emilk/egui/pull/631
Fixes https://github.com/emilk/egui/issues/755
* Add example of file dialogs and file drag-and-drop
* fix ci
2021-09-30 18:53:41 +02:00
Emil Ernerfeldt
5539dbe620
Add separate serialize feature and better persitence control ( #753 )
...
* Rename epaint feature "persistence" to "serialize"
* Add separate "serialize" feature to egui
* egui_demo_lib: separate serialize and persistence features
* Add App::persist_native_window and App::persist_egui_memory
Controls what gets persisted
2021-09-29 08:45:13 +02:00
zu1k
f6fb4d942a
epi: drag native window ( #728 )
...
* feat: drag window
* Update epi/src/lib.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update egui_demo_lib/src/backend_panel.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* cargo fmt
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2021-09-28 17:34:58 +02:00
Emil Ernerfeldt
1b36863248
Split out new crate egui-winit from egui_glium ( #735 )
2021-09-28 17:33:28 +02:00
Emil Ernerfeldt
cf17cb2065
egui_glium: allow sharing a native glium texture using Rc
2021-09-20 22:52:29 +02:00
Emil Ernerfeldt
cfb6b31914
Improve native_texture.rs demo
2021-09-20 22:39:44 +02:00
Emil Ernerfeldt
a5a5d6176d
Improve the frame around ImageButton
...
Helps https://github.com/emilk/egui/issues/721
2021-09-20 22:37:21 +02:00
Emil Ernerfeldt
e7cfda4941
Shape refactor ( #705 )
...
* More introspection stats about vertices/indices etc
* more serde derive
* #[inline] to Shape constructors
* Introduce RectShape
* Introduce CircleShape
* Introduce PathShape
* More serde derive
* impl Copy for RectShape and CircleShape
* Simplify some code
* More serde derive
* Add helpers for appending more input or output
* Serde derives for RawInput
* Rename Fonts::from_definitions to Fonts::new
* Add Output::take
* refactor EguiGlium slightly
* Derive PartialEq for RawInput
* Improve egui::util::History interface
* tweaks
* Improve History filter: add minimum length
* Calculate galley bounding rect
* tessellator: cull line segments and paths
* tessellator: cull meshes
* Fix bug in History bandwidth estimator
2021-09-20 21:36:56 +02:00
Emil Ernerfeldt
f37180f7dc
Bump MSRV (Minimum Supported Rust Version) to 1.54.0 ( #703 )
...
1.51.0 clippy has been giving me trouble (not reporting all problems),
and so I take the easy way out and just bump MSRV.
We will upgrade to 1.56.0 once it comes around anyway
to get access to that sweet disjoint capture in closures
(https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html )
2021-09-09 00:16:06 +02:00
zu1k
19eed94499
feat: Set whether to show decorations ( #672 )
...
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2021-09-07 21:42:14 +02:00
Emil Ernerfeldt
249876523d
Increase scroll-speed on glium from 8 to 50 points per scroll tick
...
Closes https://github.com/emilk/egui/issues/461
Closes https://github.com/emilk/egui/pull/702
2021-09-07 19:45:13 +02:00
triangle drawer
203d571c8b
Add api for accessing backend texture via epi ( #695 )
...
* Define NativeTexture trait for offscreen rendering
add demo for NativeTexture trait
* write changelog
* add comment for native texture example
* formatting
* add license of Rust logo
* NativeTexture trait method rename
remove duplicate function with native texture
remove rust logo
* deprecated notice for register_glium_texture,register_webgl_texture
* collect deprecated notice
2021-09-05 11:00:45 +02:00
Emil Ernerfeldt
3b75a84d3b
Point crate repository & homepage urls to their subfolders
2021-09-03 21:12:44 +02:00
Emil Ernerfeldt
9598596bdc
Replace all http code in epi/eframe/egui_glium/egui_web with ehttp ( #697 )
...
I've extracted all the http request code and turned it
into its own crate at <https://github.com/emilk/ehttp >.
There was never a reason for the HTTP request library to be part of
`eframe`. Much better to have it as its own crate!
2021-09-03 21:04:43 +02:00
JerzySpendel
56502fbb3c
Make paint function accept anything implementing Surface trait ( #681 )
...
* Make paint function accept anything implementing Surface trait
* Remove unused imports
2021-09-02 14:44:50 +02:00
Emil Ernerfeldt
e98ae2ea7a
Revert "feat: Set whether to show decorations ( #660 )" ( #671 )
...
This reverts commit 0db74f3000
.
2021-08-28 12:29:19 +02:00