### Highlights
- Make the Masonry Split widget generic over its children (fixes a todo)
- Adds a new Xilem view for the widget
- Updated the `http_cats` example to use it for the main divider.
---
I'm unsure how exactly the `message` function works on a Xilem view as
it was hard to find documentation on that, so I've tried my best to
implement it, by looking at other views. Please double check that I did
it right.
I also changed some defaults on the split widget. First, I changed
`draggable` to default to true, since I believe this is the intended
behaviour for the view, similar to how a button is not disabled by
default.
I changed the constructors of the widget to not include the `split_axis`
but rather let it be optional with vertical (row) being the default
axis. I feel this made it more ergonomic to integrate with Xilem.
Add `Properties[Mut]` argument to widget methods.
Add a third TreeArena to sort per-widget arbitrary property values.
For the type-to-value map, I considered the following crates:
- https://docs.rs/typemap/latest/typemap/
- https://crates.io/crates/typemap_rev
- https://crates.io/crates/typemap-ors
- https://github.com/chris-morgan/anymap
- https://github.com/reivilibre/anymap3
Of these, anymap3 is the only one actively maintained (last commit less
than 12 months ago). The code source itself is extremely light and
simple; we may or may not decide to roll out our own implementation down
the line.
Add a BackgroundBrush property used by SizedBox as a proof of concept.
Note that SizedBox still has its `background` field, but we should
expect future widgets to use almost *exclusively* properties; properties
usually shouldn't be redundant with local fields.
To get there, we'll first need to better integrate properties in Xilem.
I've ignored most of the changes and the projects still compile and test
fine. Changes I did commit:
Add `+ use<>` after functions.
Remove `ref mut` from some patterns.
Bump MSRV.
Apply new rustfmt format.
This removes the need to ignore `unused_qualifications`.
The `extern crate std` isn't *strictly* needed, but it will make future
debugging easier (you can do `println` or `dbg!`, for example).
so that it's available to widgets that can fix blurry lines due to bad
overlapping positioning of its internal elements
partially addresses https://github.com/linebender/xilem/issues/869
---------
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
I don't think there is a reason not to, and you need winit for some
types so currently you must define the crate yourself, which risks
version errors etc.
I wanted to create a custom button view, but when needing to pass to the
masonry type could not convert the pod to a widgetpod.
So I'd like to make this method pub to allow that
---------
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
Remove outdated TODO comments.
Rewrite some other TODO comments.
Remove references to tarpaulin.
(cargo-tarpaulin is a tool used for code coverage. Masonry hasn't used
it for years, and anyway we'll probably use `#[coverage]` annotations
once they stabilize.)
---------
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
**Draft**
This PR is the proposal for xilem docs starting page. But I think I will
be able to make some more commits to improve documentation.

---------
Co-authored-by: Artyom Sinyugin <writers@altlinux.org>
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
Co-authored-by: Tom Churchman <thomas@kepow.org>
Make tests more spread out and more readable.
Add comments detailing the state of the arena being tested.
Fix a lifetime error in unsafe API.
Rename Arena[Ref/Mut]Children to Arena[Ref/Mut]List
Rename a lot of methods.
Rework documentation.
Unify safe and unsafe APIs.
This PR includes improvements to page selector.
Specifically it now shows the full percentage range instead of just the
start of it, and it hides the buttons when you reach the end of the
range.
For some reason it panics when I get to the end.
Having `Box<dyn Widget>` implement the `Widget` trait is a crutch that
makes a bunch of things more complicated.
It leads to double-boxing in cases when the `dyn Widget` is itself a
`Box<dyn Widget>` (especially since the arena's current implementation
boxes all widgets by default), makes it harder to reason about
downcasting, and ends up producing a lot of code to handle the edge
cases.
On the xilem side, `Box<dyn Widget>` is slightly redundant with
`DynWidget`.
This PR still leaves a lot of boxing. On the long term, we'd like for
the arena to pack arbitrary widgets efficiently using some kind of
archetype scheme, but in the meantime, boxing will have to do.
Changes in this PR:
- New `FromDynWidget` trait that maybe-downcasts widgets to a
maybe-sized `Widget` type.
- Most places that accept `Widget` now accept `Widget + ?Sized`.
- Remove `impl Widget for Box<dyn Widget>`.
- Replace all instances of `WidgetPod<Box<dyn Widget>>` with
`WidgetPod<dyn Widget>`.
- Replace all instances of `xilem::Pod<Box<dyn Widget>>` with
`xilem::Pod<dyn Widget>`.
- Rename WidgetPod to WidgetBox in xilem_core example to avoid
ambiguity.
Rewrite "Creating a new Widget" tutorial to interleave description of
the Widget trait with example.
Go into more details.
Rewrite tutorials to use current WidgetMut syntax (the one with free
functions instead of methods).

Some notes:
1) The accessibility of this example probably isn't great. Not sure what
to do about this.
2) Our layout primitives aren't great; we use a grid, but ideally the
number of rows would be reactive to the available space.
3) The pagination is slightly hacked together - it should really try and
give you page numbers. I'm not planning to address this, unless someone
provides the algorithm
This was originally created to act as a screenshot for
https://github.com/linebender/linebender.github.io/pull/56