Awareness
elva.widgets.awareness
Textual
widgets for displaying awareness states.
Classes:
-
ClientView
–Widget defining the view of a singular awareness state.
-
AwarenessView
–Container representing all awareness states.
ClientView
Bases: Static
Widget defining the view of a singular awareness state.
AwarenessView
Bases: VerticalScroll
Container representing all awareness states.
Methods:
-
compose
–Hook adding child widgets.
-
get_client_view
–Get the client view for a singular awareness state.
Attributes:
-
BORDER_TITLE
–The default border title.
-
DEFAULT_CSS
–Default CSS.
-
states
–Attribute holding the awareness states.
BORDER_TITLE = 'Clients'
class-attribute
instance-attribute
The default border title.
DEFAULT_CSS = '\n AwarenessView {\n * {\n padding: 0 0 1 0;\n }\n }\n '
class-attribute
instance-attribute
Default CSS.
states = reactive(tuple, recompose=True)
class-attribute
instance-attribute
Attribute holding the awareness states.
It causes a recompose of this widget on being changed.
compose()
Hook adding child widgets.
get_client_view(state, local=False)
Get the client view for a singular awareness state.
Parameters:
-
state
(tuple[int, dict]
) –a tuple from the awareness states mapping holding the client ID and the corresponding state value mapping.
-
local
(bool
, default:False
) –flag whether to tag this client view as local (
True
) or not (False
).
Returns:
-
ClientView
–the widget representing the client state.