def __init__(self): ScrolledWindow.__init__(self) MDSplusWidget.__init__(self) tv = TextView() tv.set_wrap_mode(WRAP_WORD) self.buffer = tv.get_buffer() self.add(tv)
def __init__(self, name='TemplateEditor'): TextView.__init__(self) self.set_name(name) self.buffer = TextTemplate(name=name) self.set_buffer(self.buffer) self.dialogs = {}.fromkeys(['create', 'preview']) self.set_editable(True) self.show()
def __init__(self, name="TemplateEditor"): TextView.__init__(self) self.set_name(name) self.buffer = TextTemplate(name=name) self.set_buffer(self.buffer) self.dialogs = {}.fromkeys(["create", "preview"]) self.set_editable(True) self.show()
def __init__(self, cfg=None, name='TemplateEditor'): TextView.__init__(self) self.cfg = cfg self.set_name(name) self.buffer = TextTemplate(name=name) self.set_buffer(self.buffer) self.dialogs = {}.fromkeys(['create', 'preview']) self.set_editable(True) self.show()
def __init__(self, text, font=None, name='TextScroll'): ScrolledWindow.__init__(self) self.set_name(name) self.tview = TextView() self.tview.set_name(name) self.tbuffer = self.tview.get_buffer() self.add(self.tview) self.tview.set_editable(0) self.tview.set_wrap_mode(WRAP_WORD) self.tbuffer.set_text(text) self.tview.show() self.show()
class TextScroll(ScrolledWindow): def __init__(self, text, font=None, name='TextScroll'): ScrolledWindow.__init__(self) self.set_name(name) self.tview = TextView() self.tview.set_name(name) self.tbuffer = self.tview.get_buffer() self.add(self.tview) self.tview.set_editable(0) self.tview.set_wrap_mode(WRAP_WORD) self.tbuffer.set_text(text) self.tview.show() self.show() def set_text(self, text): self.tbuffer.set_text(text)