Commit graph

187 commits

Author SHA1 Message Date
Daniel Bulant
e3898bda50
Add a simple example about reading and synchronizing values from a Scroll 2024-10-16 22:41:42 +02:00
Jonathan Johnson
ab474e2b7d
Fixing example references to dependencies
Ensuring all examples use public paths to make copy/paste more likely to
be successful.
2024-10-10 09:06:43 -07:00
Daniel Bulant
899037d543
add filtermode to image example 2024-10-09 21:59:14 +02:00
Jonathan Johnson
75b7b888eb
Rename pending_handle to new_handle 2024-10-04 10:20:31 -07:00
Jonathan Johnson
4f3ef7d9ed
Nested modals 2024-10-04 10:17:40 -07:00
Jonathan Johnson
a7972309c3
File picker 2024-10-03 13:39:46 -07:00
Jonathan Johnson
2cec30df31
MessageBox + App::execute
Refs #131
2024-09-29 19:58:12 -07:00
Jonathan Johnson
20ab1ad029
Fixed initial window settings
These aren't entries in the changelog since they're bug fixes for new
code since the last release -- the entries on the changelog are
unaffected.

- focused and occluded no longer is explicitly set to false. Now, once
  the window has been fully initialized, the values are read from winit
  which will cause callbacks to be fired if the value has changed.
- The automatic_layout parameter if outer_position had its meaning
  inverted. Passing true now properly ensures the window is
  automatically positioned.
2024-09-13 10:12:01 -07:00
Jonathan Johnson
444fbbe4ed
Modal DialogBuilder 2024-09-12 14:49:37 -07:00
Jonathan Johnson
8d082ab77f
Modal layer 2024-09-11 20:54:08 -07:00
Jonathan Johnson
448482e7bf
Fullscreen example 2024-09-09 08:12:59 -07:00
Jonathan Johnson
dd4c544ba6
Window sync edge cases
- synchronize_platform_window is now called prior to the first redraw.
  This allows the `visible` attribute to be changed from false to true.
- Some window attributes are automatically set based on the incoming
  dynamic.
- Some initial window values are delayed until after the first layout to
  minimze "noisy" values.

All of these changes now allow a window that is resize_to_fit to be
initially hidden and show itself centered after being initially resized
without any flashing or on-screen movement/resizing.
2024-09-08 11:29:29 -07:00
Jonathan Johnson
bbbc8151c4
cushy::main attribute macro 2024-09-08 09:31:35 -07:00
Jonathan Johnson
0953e5ab40
Window::icon 2024-09-07 10:13:48 -07:00
Jonathan Johnson
531e6c9ab6
Window positioning properties
Closes #165
2024-09-07 09:31:40 -07:00
Jonathan Johnson
bf78da333d
App::monitors + run()/on_startup()
Closes #163
2024-09-06 11:50:35 -07:00
Jonathan Johnson
0dd18826c9
Switcher unmounts in all windows
Fixes #139
2024-08-28 08:49:26 -07:00
Jonathan Johnson
7bd79b0662
Switched to released easing-function
Also added new easings example.
2024-08-18 10:58:44 -07:00
Jonathan Johnson
18d14a0275
Fixing example test compilation issues 2024-08-18 08:01:00 -07:00
Jonathan Johnson
df748a991d
Extracting easing functions + Clippy 2024-08-17 17:44:12 -07:00
Jonathan Johnson
6726855ed0
Cleaning up figures usage in examples 2024-07-26 10:34:30 -07:00
Jonathan Johnson
ba3a4b9b02
Added Zoom factor
Closes #146
2024-07-25 11:31:38 -07:00
Jonathan Johnson
fbabbdbd99
Reverting example change
Was an unrelated test, oops.
2024-07-08 17:07:00 -07:00
Jonathan Johnson
60c7ef8859
Honoring Window::inner_size's initial value
Refs #160
2024-07-08 16:50:50 -07:00
Jonathan Johnson
24291772de
Added Window::on_close_requested
Closes #161
2024-07-08 16:06:45 -07:00
Jonathan Johnson
774a846210
animate_mouse_button + more example recordings 2024-05-12 19:12:01 -07:00
Jonathan Johnson
568f2ca327
Added plotters example capture + animate_keypress 2024-05-12 14:23:29 -07:00
Jonathan Johnson
15b8b3e452
Moved example generation into cushy
Undocumented and unsupported, but this allows generating example images.

This push is testing that the image makes it through CI.

Refs #125
2024-05-12 07:58:09 -07:00
Jonathan Johnson
b57188f80f
Added optional tokio integration
Closes #147
2024-05-11 21:25:54 -07:00
Jonathan Johnson
c5f1832b3e
Disabled menu item support 2024-05-10 10:16:47 -07:00
Jonathan Johnson
b8410cd4ba
Separators in menus 2024-05-10 09:51:02 -07:00
Jonathan Johnson
38cdea9816
Submenu support in context menus 2024-05-10 09:10:39 -07:00
Jonathan Johnson
8b96966031
Basic context menus
Missing a ton of functionality (separators, keyboard accessibility,
submenus), but the basic concept is working.
2024-05-09 08:16:34 -07:00
Jonathan Johnson
1c8d4e0176
ButtonClick + Overlays at locations
The overlay example now supports right-clicking to open overlays at the
clicked location, showing how a context menu widget can begin being
built.
2024-05-08 08:38:26 -07:00
Jonathan Johnson
46c4eb9ed8
winit 0.30 2024-05-01 12:49:03 -07:00
Jonathan Johnson
20ae2b7c72
map_each deadlock prevention
map_each previously was written such that if a chain of mappings fed
each other, a deadlock could occur because while the first one was
mapped, the second callback gets invoked and tries to update the first
value while it's still being held.

This refactor switches from std Mutex to parking_lot, allowing me to
remove a workaround for needing to run drop callbacks in a separate
thread during the drop of a DynamicGuard.

In addition to that change, the lower level `map_generational` calls now
take a DynamicGuard as their parameter. This allows these functions to
drop ownership of the referenced data during the callback.

The map_each implementation takes advantage of this by ensuring that the
guard is dropped before set is invoked, minimizing potential lock overlaps.

With this refactor, some old code of mine with complex validations now works
again.
2024-04-05 16:14:26 -07:00
Jonathan Johnson
3762bc6dc1
Dynamic font loading
Closes #145
2024-03-06 16:53:36 -08:00
Jonathan Johnson
0e02a513bb
Updating dependencies
This makes the lockfile build against the new release of wgpu.
2024-03-06 09:21:43 -08:00
Jonathan Johnson
e2e5085b1f
Added List widget 2024-01-18 13:29:50 -08:00
Jonathan Johnson
76a42e2788
Updated to wgpu 0.19.0
Most of the changes were figures-related. Go figure.
2024-01-18 06:37:29 -08:00
Jonathan Johnson
cc207fbf8c
Added optional plotters integration
Closes #133

The real work was done in Kludgine.
2024-01-11 20:52:40 -08:00
Jonathan Johnson
55b43cb4aa
Renamed example
Also fixed a comment I missed updating
2024-01-11 09:49:27 -08:00
Jonathan Johnson
956e4109f9
Added InvalidationBatch 2024-01-11 09:47:51 -08:00
Jonathan Johnson
8a274df730
Added more color pickers
This set of changes is making me think of adding Rgb/Rgba types and
having our own color enum.
2024-01-10 13:27:12 -08:00
Jonathan Johnson
246352fed2
Added HslPicker 2024-01-10 08:17:09 -08:00
Jonathan Johnson
6ad6cca32d
Children renamed to WidgetList
Plus more work on the user's guide, which inspired the rename.
2024-01-09 13:26:14 -08:00
Jonathan Johnson
d7fde0815f
Trying to make Mac CI fail gracefully
This message may be repeated multiple times as I work on the CI
configuration.

Refs #129
2024-01-08 09:17:03 -08:00
Jonathan Johnson
a197bb5e81
Unit-tested, auto-generated screenshots
This commit adds my first take at creating a harness for a user's guide
using the new capture functionality. The example has tests that ensure
the align widget creates the expected results.
2024-01-04 13:56:45 -08:00
Jonathan Johnson
eb20133116
Reinstating weak_clone and non-weak callbacks
Somehow I missed that my changes for weak callbacks broke the theme
editor. I thought I had it working with the try_get changes, but I
discovered several flaws in this approach.

In the end, ownership has been transferred to the CallbackHandle, and a
CallbackHandle can relinquish its reference to create weak graphs. This
is how weak_clone now works.
2024-01-04 13:56:26 -08:00
Jonathan Johnson
36b80e8f34
Moved frame mapping to its own thread
This ensures frames render consistently.

This change only affects the animation recorder. The regular virtual
recorder interface blocks when refresh is called.
2024-01-03 20:15:00 -08:00