Separate WrappedLines from ShapedLines
ShapedLines are never wrapped, whereas WrappedLines are optionally wrapped if they are associated with a wrap width. I tried to combine everything because wrapping is inherently optional for the Text element, but we have a bunch of APIs that don't make sense on a line that may wrap, so we need a distinct type for that case.
This commit is contained in:
parent
e5ada92b7b
commit
9558da8681
12 changed files with 563 additions and 330 deletions
|
@ -13,7 +13,7 @@ pub trait Element<V: 'static> {
|
|||
fn layout(
|
||||
&mut self,
|
||||
view_state: &mut V,
|
||||
previous_element_state: Option<Self::ElementState>,
|
||||
element_state: Option<Self::ElementState>,
|
||||
cx: &mut ViewContext<V>,
|
||||
) -> (LayoutId, Self::ElementState);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue