Implement rendering display lines
This commit is contained in:
parent
01a97c4147
commit
9df8338b0e
3 changed files with 88 additions and 11 deletions
|
|
@ -40,9 +40,10 @@ class Element(abc.ABC):
|
|||
|
||||
@abc.abstractmethod
|
||||
def render(self,
|
||||
width: int,
|
||||
depth: int,
|
||||
highlighted: bool,
|
||||
folded: bool,
|
||||
highlighted: bool = False,
|
||||
folded: bool = False,
|
||||
) -> RenderedElement:
|
||||
pass
|
||||
|
||||
|
|
@ -153,6 +154,10 @@ class RenderedElement:
|
|||
def element(self) -> Element:
|
||||
return self._element
|
||||
|
||||
@property
|
||||
def lines(self) -> List[AttributedText]:
|
||||
return self._lines
|
||||
|
||||
@property
|
||||
def height(self) -> int:
|
||||
return len(self._lines)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue