(self, window, widget, title, focus)
| 20 | |
| 21 | class StackWidget(urwid.Frame): |
| 22 | def __init__(self, window, widget, title, focus): |
| 23 | self.is_focused = focus |
| 24 | self.window = window |
| 25 | |
| 26 | if title: |
| 27 | header = urwid.AttrMap( |
| 28 | urwid.Text(title), "heading" if focus else "heading_inactive" |
| 29 | ) |
| 30 | else: |
| 31 | header = None |
| 32 | super().__init__(widget, header=header) |
| 33 | |
| 34 | def mouse_event(self, size, event, button, col, row, focus): |
| 35 | if event == "mouse press" and button == 1 and not self.is_focused: |