def __init__(self, cap, cb): Button.__init__(self, '') urwid.connect_signal(self, 'click', cb) self._w = AttrMap( urwid.SelectableIcon([' \N{BULLET}', cap], 2), None, 'selected', )
def __init__(self, label, on_press=None, user_data=None): Button.__init__(self, label, on_press, user_data) self._w = self._label
def __init__(self, transport, click=False): self.transport = transport self.click = click label = 'Click ON' if self.click else 'Click OFF' Button.__init__(self, label, self.on_click) self._w = self._label
def __init__(self, transport): self.transport = transport label = 'Tempo {0}BPM'.format(self.transport.tempo) Button.__init__(self, label) self._w = self._label