def __init__(self, columns, factory=factories.wrap_line_into_column): logging.debug("[ColumnWidget] constructor received data: %s" % columns) self.factory = factory self.content = map(self.factory, columns) logging.debug("[ColumnWidget] init with content: %s" % self.content) urwid.ListBox.__init__(self, self.content) BaseWidgetClass.__init__(self)
def __init__(self, content, factory=factories.wrap_item_into_widget, index=0): logging.debug("[ListWidget] init with content: %s" % list(content)) BaseWidgetClass.__init__(self) self.factory = factory self.content = map(self.factory, content) urwid.ListBox.__init__(self, self.content) self.set_focus(index)
def __init__(self, content, factory=factories.section_list_factory, index=1): logging.debug("[SectionListWidget] init with content: %s" % list(content)) BaseWidgetClass.__init__(self) self.structured_data = SectionList(content) self.factory = factory self.content = self.factory(self.structured_data) urwid.ListBox.__init__(self, self.content) self.set_focus(index)
def __init__(self, *args, **kwargs): self.callback = kwargs["callback"] del kwargs["callback"] urwid.Edit.__init__(self, *args, **kwargs) BaseWidgetClass.__init__(self)
def __init__(self, text, callback, *args, **kwargs): self.callback = callback urwid.Text.__init__(self, text, *args, **kwargs) BaseWidgetClass.__init__(self)