Commit graph

174 commits

Author SHA1 Message Date
dc6265f837 Add Text widget 2024-03-07 23:43:12 +01:00
fe33465564 Make widgets generic over global state 2024-03-07 16:34:10 +01:00
715be147f9 Add lots of layout helper functions 2024-03-07 15:54:35 +01:00
fb1deaabe5 Render tree of Widgets as RgbImage 2024-03-07 15:54:35 +01:00
bea5e03834 Add Widget and Node 2024-03-07 13:58:10 +01:00
eb04b3fb50 Rip out buffer and widgets
I've decided to use the "taffy" crate for layouting. To make the API
somewhat bearable to use, I've decided to perform all rendering in a
good ol' rgb image buffer (in this case, an ImageBuffer from the "image"
crate). The pixels will be converted to their final representation just
before being sent to whatever device will be displaying them.

I've removed the buffer and the color traits because they're no longer
necessary. I've also removed the existing widgets because the widget
system will have to be redesigned to work well with taffy.
2024-03-06 00:36:19 +01:00
04ed092c4f Fix warnings 2024-03-05 00:51:44 +01:00
a2867b7188 Import teepee code 2024-03-05 00:50:43 +01:00
6b62c3fd54 Tweak Widget naming and docs 2024-03-05 00:42:05 +01:00
f3f8af39d4 Use Color in View 2024-03-05 00:21:48 +01:00
097f4ee548 Add ColorBw for printer 2024-03-05 00:09:34 +01:00
59a1235b1d Add Color trait 2024-03-05 00:09:32 +01:00
fd1b337cd1 Add Background widget 2024-03-04 00:26:20 +01:00
1000de5bcf Add Empty widget 2024-03-04 00:25:43 +01:00
ba68e34d0d Add Widget and BoxedWidget 2024-03-04 00:25:43 +01:00
d6b9aea273 Add Rect::ZERO and make stuff const
Also tweaks the comments because they're not worth a separate commit.
2024-03-03 23:33:03 +01:00
b31c2de425 Add View 2024-03-03 23:04:20 +01:00
97a8099b7a Add Vec2 arithmetic tests 2024-03-03 23:04:10 +01:00
4bf7a0c9b2 Add Rect 2024-03-03 23:04:10 +01:00
52c5778a19 Add Buffer 2024-03-03 00:09:08 +01:00
0487bdb465 Add Vec2 2024-03-02 23:54:55 +01:00
14c9dac398 Optimize dependencies even in debug mode 2024-03-02 23:21:29 +01:00
8aa38070ca Set up workspace-wide lints 2024-03-02 23:21:06 +01:00
44294830af Create project 2024-03-02 23:02:32 +01:00