Commit graph

119 commits

Author SHA1 Message Date
Jonathan Johnson
0dd18826c9
Switcher unmounts in all windows
Fixes #139
2024-08-28 08:49:26 -07:00
Jonathan Johnson
ba8d73b6b7
Bumping version 2024-08-20 12:30:41 -07:00
Jonathan Johnson
5f604c41dc
Switching to released kludgine 2024-08-20 12:09: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
ffb1475e30
Fixing padding/shadow calculations on Container
Fixes #158
2024-07-26 08:58:59 -07:00
Jonathan Johnson
ba3a4b9b02
Added Zoom factor
Closes #146
2024-07-25 11:31:38 -07:00
Jonathan Johnson
83fe4b05ef
Switching to released Kludgine 2024-07-22 08:31:11 -07:00
Jonathan Johnson
3de9d0597f
Updating kludgine and figures 2024-07-22 08:06:03 -07:00
Jonathan Johnson
553c4ab959
Updating Kludgine for wgpu
The dependence on git is just to let CI run before releasing a kludgine
update with wgpu 22.0.0 support.
2024-07-22 07:19:58 -07:00
Jonathan Johnson
cf78c9defa
Updating cushy-macros
(And really releasing v0.3.0)
2024-05-12 08:52:19 -07:00
Jonathan Johnson
c566bc2fcf
Fixing guide-examples reference to Cushy 2024-05-12 08:35:14 -07:00
Jonathan Johnson
db2296c626
Preparing v0.3.0 2024-05-12 08:30:43 -07:00
Jonathan Johnson
a3903463ea
Added note in changelog for appit fix 2024-05-12 06:45:27 -07:00
Jonathan Johnson
b57188f80f
Added optional tokio integration
Closes #147
2024-05-11 21:25:54 -07:00
Jonathan Johnson
46c4eb9ed8
winit 0.30 2024-05-01 12:49:03 -07:00
Jonathan Johnson
8880fece3a
Updated kludgine 2024-05-01 08:52:53 -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
173fb2d540
Allowing changing multisampling on all windows 2024-03-21 09:02:07 -07:00
Jonathan Johnson
18abfc66f2
Added ability to disable vsync 2024-03-17 08:44:02 -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
7f1bf75f45
Updated to cosmic-text 0.11.2 2024-02-21 12:09:44 -08:00
Jonathan Johnson
3f8fed65c3
Added Chinese ListStyles
This may seem like a lot of options, but here's the reasoning:

- The CSS spec offers four variations: Simplified/Traditional and
  Formal/Informal. This spec defines a character set for all for
  variations, and it also associates rules for omitting digits in the
  informal variants.
- The chinese_number crate does not implement a variant that includes
  the tens digit, as required by the cSS spec for the formal variants.

To be able to provide the enumerations that the CSS spec offers *and* to
provide the variations that the chinese_number crate supports, I've aded
8 total list styles for selecting a specific Chinese variation.

Technically nominals supports even more options, but the myriad counting
scale coveres u128::MAX and seems to be the most common counting style.
2024-01-18 15:06:54 -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
856fb6231b
Updating Kludgine to fix MSRV 2024-01-12 07:08:27 -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
a3e76f6472
Calling set_ime_cursor_location
Currently passing the entire input area because it's easy. Not closing
the issue because the correct thing to do would be to constrain the
location to a smaller area on the current line (or the current line).

Refs #122
2024-01-04 17:08:05 -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
bc52be440f
Added animation recording + event wiring
Not great, but it technically exists.
2024-01-03 17:45:11 -08:00
Jonathan Johnson
cdef6bcbc3
Removed unnecessary bytemuck usage
This was copy-pasted from a Buffer<T> implementation that was removed
from Kludgine, since Buffer<T> isn't public.
2024-01-03 11:41:26 -08:00
Jonathan Johnson
be0399279c
Initial implementation of offscreen rendering 2024-01-03 11:35:43 -08:00
Jonathan Johnson
a9a41a1582
Refactored Dymamics to be weak + drop bug fixes
After adding weak_clone, I realized that all map functions should use
weak references anyways. In the process of implementing this, I ran
tests a lot and found other edge cases where I hadn't properly reasoned
about Drop behavior.

While some of the state cleanup is a bit overkill at the moment, this is
in anticipation of wanting a WeakDynamicReader-like type.
2024-01-01 12:35:21 -08:00
Jonathan Johnson
9e4e079bf5
WindowLocal + Custom Observers
This cascaded into a lot more work than expected. However, in general,
if one clones a `WidgetInstance` and shares it between two windows, it
should now work. Widget authors must ensure that when they cache
information, they do so with either a `WidgetCacheKey` or use a
`WindowLocal<T>` if per-window state is desired.

This is demonstrated in the debug-window example, where the counter of
open windows is next to a clone of the same button from the main window
that opens a new window.
2023-12-29 13:21:39 -08:00
Jonathan Johnson
3fc49d2424
Initial DebugContext implementation 2023-12-28 21:30:25 -08:00
Jonathan Johnson
a0478e266a
Added Disclose widget 2023-12-28 14:12:26 -08:00
Jonathan Johnson
2fe28729df
Directly depending on figures
While this was a workaround for a docs.rs issue (Px/Lp are not
linked), I decided having the shorter import path would look better in
the examples.

It probably wasn't necessary to update all of the references in the
internal code, but I decided it was worth the consistency.
2023-12-28 09:35:24 -08:00
Jonathan Johnson
98f8d3a43d
Preparing v0.2.0 2023-12-27 19:08:34 -08:00
Jonathan Johnson
f73452c880
Updating Kludgine 2023-12-27 19:04:41 -08:00
Jonathan Johnson
df479e983e
Renaming crate to Cushy
Refs #117
2023-12-27 19:02:59 -08:00
Jonathan Johnson
884febecfa
Added WindowHandle
Closes #109
2023-12-27 08:10:44 -08:00
Jonathan Johnson
492da3b6ed
Updated dependencies 2023-12-26 22:27:22 -08:00
Jonathan Johnson
4379565e3d
Label/Input caches invalidate across windows
When combined with changes in Kludgine, this should round out support
for sharing content between multiple windows.

Closes #110
2023-12-26 13:57:23 -08:00
Jonathan Johnson
180232261a
Label now ensures pixel alignment for its text
This is also paired with a fix in Kludgine.
2023-12-26 06:35:49 -08:00
Jonathan Johnson
8d3a4a42cf
Updating Kludgine
This fixes a few issues, the most important being a crash when a window
is minimized
2023-12-22 12:18:04 -08:00
Jonathan Johnson
6b33b0f686
Fixed reference cyle in ManagedWidget 2023-12-22 09:51:06 -08:00
Jonathan Johnson
564b9e5a96
Added comments to multi-window
Also made it open a second window before startup
2023-12-21 15:41:34 -08:00
Jonathan Johnson
f1a2a711ff
Multi-window support
Closes #91

There's some details to still figure out, which are in new issues:

- #109: When opening a window, no handle is returned that gives access to the
  window from the opener. Technically this can all be wired up manually,
  with exception of requeesting the window close.
- #107: How can a window close itself? Once we have a handle type, we still
  need a mechanism to allow a button on a window request that the window
  closes gracefully. The examples that currently close the window
  call exit instad.
2023-12-21 14:57:29 -08:00