ZIm/crates/gpui
Nathan Sobo bede668b14 Add a derive macro for Element
To turn any struct into a composite element, you can implement a render method
with the following signature:

fn render<V: View>(&mut self, view: &mut V, cx: &mut ViewContext<V>) -> AnyElement<V>;

Then add #[derive(Element)] to the struct definition.

This will make it easier to introduce higher-level components that are expressed in
terms of other elements.
2023-06-25 07:51:50 -06:00
..
examples Generalize Text element to let you add arbitrary scene primitives for runs of text 2023-04-27 13:58:06 -07:00
src Add a derive macro for Element 2023-06-25 07:51:50 -06:00
build.rs Use a hand-coded parser for keymap context predicates 2023-01-16 15:53:49 -08:00
Cargo.toml chore: remove ts-rs 2023-06-16 21:45:37 +02:00