modern_urwid.lifecycle.controller

Classes

Controller([manager, context])

Utility class to handle lifecycle hooks and extra UI logic

class modern_urwid.lifecycle.controller.Controller(manager: LifecycleManager | None = None, context: CompileContext | None = None)

Bases: object

Utility class to handle lifecycle hooks and extra UI logic

make_widget_from_builder(builder_cls: type[WidgetBuilder], *args, id: str | None = None, classes: str | None = None, **kwargs) Widget

Make an urwid widget from a given WidgetBuilder

on_enter()

Called when the parent layout is rendered on the mainloop with switch().

on_exit()

Called when the parent layout is removed from the mainloop with switch().

on_load()

Called when loading the parent layout in register().