zed/crates/gpui_macros
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
..
src Add a derive macro for Element 2023-06-25 07:51:50 -06:00
Cargo.toml Added complete scripts for generating third party license files 2023-01-23 12:47:12 -08:00