本文整理汇总了Python中zenmapGUI.higwidgets.higtextviewers.HIGTextView类的典型用法代码示例。如果您正苦于以下问题:Python HIGTextView类的具体用法?Python HIGTextView怎么用?Python HIGTextView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HIGTextView类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __create_widgets
def __create_widgets(self):
###
# Vertical box to keep 3 boxes
self.main_whole_box = HIGVBox()
self.upper_box = HIGHBox()
self.middle_box = HIGHBox()
self.lower_box = HIGHBox()
#self.main_vbox = HIGVBox()
self.command_entry = gtk.Entry()
self.command_entry_changed_cb_id = self.command_entry.connect(
"changed", self.command_entry_changed_cb)
self.scan_button = HIGButton(_("Scan"))
self.scan_button.connect("clicked", self.run_scan)
self.notebook = gtk.Notebook()
# Profile info page
self.profile_info_vbox = HIGVBox()
self.profile_info_label = HIGSectionLabel(_('Profile Information'))
self.profile_name_label = HIGEntryLabel(_('Profile name'))
self.profile_name_entry = gtk.Entry()
self.profile_name_entry.connect(
'enter-notify-event', self.update_help_name)
self.profile_description_label = HIGEntryLabel(_('Description'))
self.profile_description_scroll = HIGScrolledWindow()
self.profile_description_scroll.set_border_width(0)
self.profile_description_text = HIGTextView()
self.profile_description_text.connect(
'motion-notify-event', self.update_help_desc)
# Buttons
self.buttons_hbox = HIGHBox()
self.cancel_button = HIGButton(stock=gtk.STOCK_CANCEL)
self.cancel_button.connect('clicked', self.exit)
self.delete_button = HIGButton(stock=gtk.STOCK_DELETE)
self.delete_button.connect('clicked', self.delete_profile)
self.save_button = HIGButton(_("Save Changes"), stock=gtk.STOCK_SAVE)
self.save_button.connect('clicked', self.save_profile)
###
self.help_vbox = HIGVBox()
self.help_label = HIGSectionLabel(_('Help'))
self.help_scroll = HIGScrolledWindow()
self.help_scroll.set_border_width(0)
self.help_field = HIGTextView()
self.help_field.set_cursor_visible(False)
self.help_field.set_left_margin(5)
self.help_field.set_editable(False)
self.help_vbox.set_size_request(200, -1)
示例2: __create_widgets
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()
示例3: ProfileEditor
#.........这里部分代码省略.........
"Description\n\nThe description is a full description of what "
"the scan does, which may be long.")
def __create_widgets(self):
###
# Vertical box to keep 3 boxes
self.main_whole_box = HIGVBox()
self.upper_box = HIGHBox()
self.middle_box = HIGHBox()
self.lower_box = HIGHBox()
#self.main_vbox = HIGVBox()
self.command_entry = gtk.Entry()
self.command_entry_changed_cb_id = self.command_entry.connect(
"changed", self.command_entry_changed_cb)
self.scan_button = HIGButton(_("Scan"))
self.scan_button.connect("clicked", self.run_scan)
self.notebook = gtk.Notebook()
# Profile info page
self.profile_info_vbox = HIGVBox()
self.profile_info_label = HIGSectionLabel(_('Profile Information'))
self.profile_name_label = HIGEntryLabel(_('Profile name'))
self.profile_name_entry = gtk.Entry()
self.profile_name_entry.connect(
'enter-notify-event', self.update_help_name)
self.profile_description_label = HIGEntryLabel(_('Description'))
self.profile_description_scroll = HIGScrolledWindow()
self.profile_description_scroll.set_border_width(0)
self.profile_description_text = HIGTextView()
self.profile_description_text.connect(
'motion-notify-event', self.update_help_desc)
# Buttons
self.buttons_hbox = HIGHBox()
self.cancel_button = HIGButton(stock=gtk.STOCK_CANCEL)
self.cancel_button.connect('clicked', self.exit)
self.delete_button = HIGButton(stock=gtk.STOCK_DELETE)
self.delete_button.connect('clicked', self.delete_profile)
self.save_button = HIGButton(_("Save Changes"), stock=gtk.STOCK_SAVE)
self.save_button.connect('clicked', self.save_profile)
###
self.help_vbox = HIGVBox()
self.help_label = HIGSectionLabel(_('Help'))
self.help_scroll = HIGScrolledWindow()
self.help_scroll.set_border_width(0)
self.help_field = HIGTextView()
self.help_field.set_cursor_visible(False)
self.help_field.set_left_margin(5)
self.help_field.set_editable(False)
self.help_vbox.set_size_request(200, -1)
###
def __pack_widgets(self):
###
self.add(self.main_whole_box)
示例4: UmitCredits
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:
#.........这里部分代码省略.........