Overhaul the entire element system

Now the Element trait is designed to be wrapped in a Lifecycle enum that gets placed inside an ElementBox. This allows the framework to store data on behalf of the Element implementation, such as sizes, bounds, and also implementation-specific LayoutState and PaintState types. This makes it easier to reason about which data is available in each Element method.
This commit is contained in:
Nathan Sobo 2021-03-21 20:54:23 -06:00
parent 046fe3fff9
commit 119aa452b6
27 changed files with 931 additions and 642 deletions

7
Cargo.lock generated
View file

@ -757,6 +757,7 @@ dependencies = [
"pathfinder_geometry",
"pin-project",
"rand 0.8.3",
"replace_with",
"smallvec",
"smol",
"tree-sitter",
@ -1259,6 +1260,12 @@ dependencies = [
"winapi",
]
[[package]]
name = "replace_with"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3a8614ee435691de62bcffcf4a66d91b3594bf1428a5722e79103249a095690"
[[package]]
name = "rust-argon2"
version = "0.8.3"