| 3 | | |
| 4 | | == Widget Decorations - widgets with one child == |
| 5 | | |
| 6 | | Some widgets contain a single widget and only serve to modify that widget's display/behaviour. |
| 7 | | These widgets are called widget decorations and have WidgetDecoration as a base class. |
| 8 | | |
| 9 | | source:urwid/decoration.py |
| 10 | | |
| 11 | | Note: WidgetWrap is not a Decoration widget. WidgetWrap is a base class of widgets that use other |
| 12 | | widgets to implement their display/behaviour, but the "wrapped" widgets are not supposed to |
| 13 | | be accessed directly by the user of the WidgetWrap subclass. |
| 14 | | |
| 15 | | Widget Decorations have a get/set .original_widget property to access or change the widget that |
| 16 | | they contain. They also have a .base_widget attribute to unwrap all the decorations and return |
| 17 | | the last contained widget. |