Commit graph

34 commits

Author SHA1 Message Date
Jonathan Johnson
bc52be440f
Added animation recording + event wiring
Not great, but it technically exists.
2024-01-03 17:45:11 -08:00
Jonathan Johnson
be0399279c
Initial implementation of offscreen rendering 2024-01-03 11:35:43 -08:00
Jonathan Johnson
e70e92726c
Source<T> + Destination<T> (breaking)
Refs #98

This refactor overhauls the reactive system to move all the reactive
methods to traits. The side effect of this change is that now
DynamicReader's API is the same as Dynamic's API, but because it only
implements Source<T>, DynamicReader does not offer any mutation
functions.

While it's unfortunate to have more traits to include to use Cushy, this
seems like the best option, and it offers a path to try to integrate
this into the tuple ForEach/MapEach traits. Unfortunately, my attempt at
doing those in this set of changes led to issues specifying generic
associated lifetimes for the DynamicGuard. But, I was also in the middle
of this larger refactoring, so it might be that a fresh attempt will
succeed.
2024-01-02 09:00:29 -08:00
Jonathan Johnson
32d6fffd3b
WidgetRef::unmount_in
This should be all the locations that WidgetRef::unmount_in should be
called.
2023-12-29 13:59:28 -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
2b46b0b34c
Fixing scrollbar showing/hiding + hit detection 2023-12-15 14:00:31 -08:00
Jonathan Johnson
eb91e73a6e
Scrollbars are now clickable 2023-12-14 16:55:02 -08:00
Jonathan Johnson
35576f9214
Image widget
Closes #23

(Feels good to close a 3 year old issue!)
2023-12-09 13:18:46 -08:00
Jonathan Johnson
16af20269e
Updated figures + kludgine 2023-12-07 15:49:03 -08:00
Jonathan Johnson
0e6796318b
Added Widget::summarize
Debug printing widgets was quite verbose. While developing a widget, you
often want to see a full debug printout, but this feature assumes that
debug printing a WidgetInstance should show a summary of the widget, not
a full debug printout containing cached glyph information of every
label.

By default, summarize just calls Debug, but this extra layer allows
widgets to provide a more condensed summary and exclude details like
caches.

Originally, adding dbg!() around the theme example's UI yielded a
whopping 20,324 lines of text. The summary code only prints 3,858
lines.
2023-12-03 06:40:19 -08:00
Jonathan Johnson
a826b91173
Fixing gutter calculations + scroll canvas sizing 2023-11-30 08:46:41 -08:00
Jonathan Johnson
b2fdf06e60
Dynamic now requires PartialEq
This reduces the complexity of operations capable with Dynamic, and also
makes it easier to shortcut deadlocking operations.
2023-11-23 11:53:59 -08:00
Jonathan Johnson
b63e4d66d2
Bug fixes 2023-11-22 18:53:41 -08:00
Jonathan Johnson
3e651c2964
CursorIcon + disabled refactoring
Input can now accept focus while disabled, and all controls should do
the right thing with regard to cursor icons now.
2023-11-22 12:06:29 -08:00
Jonathan Johnson
d5bde44e27
Subpixels + Feathering + figures refactor
Much curves
2023-11-19 10:34:06 -08:00
Jonathan Johnson
8ae315e229
Drawing refactor from Kludgine 2023-11-17 08:07:37 -08:00
Jonathan Johnson
54e01f1911
Checkbox, ButtonKind, linked/linked_string + more 2023-11-14 20:39:29 -08:00
Jonathan Johnson
40343e163f
Scroll fixes, resize helpers 2023-11-13 11:30:45 -08:00
Jonathan Johnson
07b93397c5
Optimizations 2023-11-12 19:54:10 -08:00
Jonathan Johnson
2a50bb32d4
define_components embrace, sanitize, docs, export 2023-11-12 09:21:49 -08:00
Jonathan Johnson
68339dfb62
Scroll fixes 2023-11-11 10:23:24 -08:00
Jonathan Johnson
eb4b24f4a9
Slider 2023-11-11 09:42:53 -08:00
Jonathan Johnson
d7384b63d8
Added WIP theming system 2023-11-10 09:39:33 -08:00
Jonathan Johnson
1714948174
Styles are now reactive 2023-11-09 10:42:56 -08:00
Jonathan Johnson
a2e28cb522
Dynamic::take, align helpers, scroll fix
Scroll was previously taking the graphics region as its control size as
opposed to the constraints. This was due to this code originally living
in redraw. This fixes scroll areas being able to scroll their contents
fully when sharing window space with other widgts.
2023-11-09 10:04:09 -08:00
Jonathan Johnson
e4092532d3
Line scroll honors LineHeight, ignore no scroll 2023-11-09 07:58:59 -08:00
Jonathan Johnson
5e5d826267
Checkpoint
Progress on tab focus
2023-11-07 15:16:29 -08:00
Jonathan Johnson
e7b4fe00b6
Updating to intentional 2023-11-06 14:30:03 -08:00
Jonathan Johnson
0f6d3838b1
LayoutContext
measure() now is layout(). LayoutContext can either persist layout
information or be used temporarily for measurement. While this caching
is constantly thrown out currently, this is a step towards being able to
only re-layout widgets if they've been invalidated.
2023-11-05 11:50:59 -08:00
Jonathan Johnson
6f5ffd80b4
Easing functions as styles 2023-11-03 13:37:27 -07:00
Jonathan Johnson
501eecd7a5
Async, better scroll, Input::on_key 2023-11-03 07:15:34 -07:00
Jonathan Johnson
ed31805693
Tuple animations 2023-11-02 07:48:30 -07:00
Jonathan Johnson
64f46a46e2
Button animations, hover fixes, ComponentType 2023-11-01 20:11:05 -07:00
Jonathan Johnson
79be9a063b
Scroll and Animations
Scroll is only working to the absolute barest of requirements.
2023-11-01 15:15:14 -07:00