Clean up a bit
This commit is contained in:
parent
5e7089f320
commit
8336794342
3 changed files with 16 additions and 25 deletions
|
|
@ -77,6 +77,16 @@ class CursorTreeRenderer(Generic[E]):
|
|||
# Configurable variables
|
||||
if indent_width < 0:
|
||||
raise ValueError("indent width must be 0 or greater")
|
||||
if len(indent) != 1:
|
||||
raise ValueError() # TODO add description to exception
|
||||
if len(indent_fill) != 1:
|
||||
raise ValueError() # TODO add description to exception
|
||||
if len(cursor_indent) != 1:
|
||||
raise ValueError() # TODO add description to exception
|
||||
if len(cursor_corner) != 1:
|
||||
raise ValueError() # TODO add description to exception
|
||||
if len(cursor_fill) != 1:
|
||||
raise ValueError() # TODO add description to exception
|
||||
if scrolloff < 0:
|
||||
raise ValueError("scrolloff must be 0 or greater")
|
||||
self._indent_width = indent_width
|
||||
|
|
@ -89,6 +99,8 @@ class CursorTreeRenderer(Generic[E]):
|
|||
self._cursor_indent_attrs = cursor_indent_attrs
|
||||
self._scrolloff = scrolloff
|
||||
|
||||
# Some properties
|
||||
|
||||
@property
|
||||
def lines(self) -> AttributedLines:
|
||||
# Not sure if the between() is necessary
|
||||
|
|
@ -98,6 +110,10 @@ class CursorTreeRenderer(Generic[E]):
|
|||
def hit_top(self) -> bool:
|
||||
return self._hit_top
|
||||
|
||||
@property
|
||||
def cursor_id(self) -> Optional[Id]:
|
||||
return self._cursor_id
|
||||
|
||||
# Offsets
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
__all__ = ["MessageEditorWidget"]
|
||||
|
||||
|
||||
class MessageEditorWidget:
|
||||
"""
|
||||
This widget allows the user to compose a new message. It is based on
|
||||
urwid's Edit widget.
|
||||
|
||||
One day, it will (hopefully) support syntax highlighting and tab
|
||||
completion.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
__all__ = ["UserListWidget"]
|
||||
|
||||
|
||||
class UserListWidget:
|
||||
"""
|
||||
This widget displays the users currently connected to a Room.
|
||||
|
||||
It must be notified of changes in the user list by the RoomWidget it is a
|
||||
part of.
|
||||
"""
|
||||
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue