Metaclasses

class urwid.WidgetMeta(name, bases, namespace, /, **kwargs)

Bases: MetaSignals.

Automatic caching of render and rows methods.

The render, rows, pack, keypress and mouse_event methods a class defines raise WidgetSizingError when they get a size of a sizing mode the widget does not support.

Class variable no_cache is a list of names of methods to not cache automatically. Valid method names for no_cache are 'render' and 'rows'.

Class variable ignore_focus if defined and set to True indicates that the canvas this widget renders is not affected by the focus parameter, so it may be ignored when caching.

Wrap the new class’s widget methods with the sizing check, and render/rows with caching.

render and rows are not cached when listed in no_cache.

class urwid.MetaSignals(name, bases, namespace, /, **kwargs)

Register the list of signals in the class variable signals, including signals in superclasses.

Collect signals from the new class and its superclasses into the new class’s own list.