本文整理汇总了Python中zenmapGUI.higwidgets.higtextviewers.HIGTextView.set_wrap_mode方法的典型用法代码示例。如果您正苦于以下问题:Python HIGTextView.set_wrap_mode方法的具体用法?Python HIGTextView.set_wrap_mode怎么用?Python HIGTextView.set_wrap_mode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类zenmapGUI.higwidgets.higtextviewers.HIGTextView
的用法示例。
在下文中一共展示了HIGTextView.set_wrap_mode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: UmitCredits
# 需要导入模块: from zenmapGUI.higwidgets.higtextviewers import HIGTextView [as 别名]
# 或者: from zenmapGUI.higwidgets.higtextviewers.HIGTextView import set_wrap_mode [as 别名]
class UmitCredits(HIGWindow):
def __init__(self):
HIGWindow.__init__(self)
self.set_title(_("%s credits") % UMIT_DISPLAY_NAME)
self.set_size_request(-1, 250)
self.set_position(gtk.WIN_POS_CENTER)
self.__create_widgets()
self.__packing()
self.set_text()
def __create_widgets(self):
self.vbox = HIGVBox()
self.hbox = HIGHBox()
self.notebook = HIGNotebook()
self.btn_close = HIGButton(stock=gtk.STOCK_CLOSE)
self.written_by_scroll = HIGScrolledWindow()
self.written_by_text = HIGTextView()
self.design_scroll = HIGScrolledWindow()
self.design_text = HIGTextView()
self.soc2007_scroll = HIGScrolledWindow()
self.soc2007_text = HIGTextView()
self.contributors_scroll = HIGScrolledWindow()
self.contributors_text = HIGTextView()
self.translation_scroll = HIGScrolledWindow()
self.translation_text = HIGTextView()
self.nokia_scroll = HIGScrolledWindow()
self.nokia_text = HIGTextView()
def __packing(self):
self.add(self.vbox)
self.vbox.set_spacing(12)
self.vbox._pack_expand_fill(self.notebook)
self.vbox._pack_noexpand_nofill(self.hbox)
self.hbox._pack_expand_fill(hig_box_space_holder())
self.hbox._pack_noexpand_nofill(self.btn_close)
self.notebook.append_page(
self.written_by_scroll, gtk.Label(_("Written by")))
self.notebook.append_page(
self.design_scroll, gtk.Label(_("Design")))
self.notebook.append_page(
self.soc2007_scroll, gtk.Label(_("SoC 2007")))
self.notebook.append_page(
self.contributors_scroll, gtk.Label(_("Contributors")))
self.notebook.append_page(
self.translation_scroll, gtk.Label(_("Translation")))
self.notebook.append_page(
self.nokia_scroll, gtk.Label(_("Maemo")))
self.written_by_scroll.add(self.written_by_text)
self.written_by_text.set_wrap_mode(gtk.WRAP_NONE)
self.design_scroll.add(self.design_text)
self.design_text.set_wrap_mode(gtk.WRAP_NONE)
self.soc2007_scroll.add(self.soc2007_text)
self.soc2007_text.set_wrap_mode(gtk.WRAP_NONE)
self.contributors_scroll.add(self.contributors_text)
self.contributors_text.set_wrap_mode(gtk.WRAP_NONE)
self.translation_scroll.add(self.translation_text)
self.translation_text.set_wrap_mode(gtk.WRAP_NONE)
self.nokia_scroll.add(self.nokia_text)
self.nokia_text.set_wrap_mode(gtk.WRAP_NONE)
self.btn_close.connect('clicked', lambda x, y=None: self.destroy())
def set_text(self):
b = self.written_by_text.get_buffer()
b.set_text("""Adriano Monteiro Marques <[email protected]>""")
b = self.design_text.get_buffer()
b.set_text("""Operating System and Vulnerability Icons:
Takeshi Alexandre Gondo <[email protected]>
Logo, Application Icons and Splash screen:
Virgílio Carlo de Menezes Vasconcelos <[email protected]>
The Umit Project Web Site Design:
Joao Paulo Pacheco <[email protected]>""")
b = self.soc2007_text.get_buffer()
b.set_text("""Independent Features:
Adriano Monteiro Marques <[email protected]>
Frederico Silva Ribeiro <[email protected]>
Network Inventory:
Guilherme Henrique Polo Gonçalves <[email protected]>
Umit Radial Mapper:
#.........这里部分代码省略.........