本文整理匯總了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:
#.........這裏部分代碼省略.........