WIP
This commit is contained in:
parent
a8ecc1a643
commit
fea987b459
4 changed files with 46 additions and 20 deletions
36
crates/gpui/playground/src/text.rs
Normal file
36
crates/gpui/playground/src/text.rs
Normal file
|
@ -0,0 +1,36 @@
|
|||
use std::borrow::Cow;
|
||||
|
||||
use crate::element::Element;
|
||||
|
||||
impl<V, S> Element<V> for S
|
||||
where
|
||||
V: 'static,
|
||||
S: 'static + Into<Cow<'static, str>>,
|
||||
{
|
||||
type Layout = Cow<'static, str>;
|
||||
|
||||
fn style_mut(&mut self) -> &mut crate::style::ElementStyle {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn handlers_mut(&mut self) -> &mut crate::element::ElementHandlers<V> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn layout(
|
||||
&mut self,
|
||||
view: &mut V,
|
||||
cx: &mut crate::element::LayoutContext<V>,
|
||||
) -> anyhow::Result<(taffy::tree::NodeId, Self::Layout)> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn paint<'a>(
|
||||
&mut self,
|
||||
layout: crate::element::Layout<Self::Layout>,
|
||||
view: &mut V,
|
||||
cx: &mut crate::element::PaintContext<V>,
|
||||
) -> anyhow::Result<()> {
|
||||
todo!()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue