本文整理汇总了Python中zenmapGUI.higwidgets.higboxes.hig_box_space_holder函数的典型用法代码示例。如果您正苦于以下问题:Python hig_box_space_holder函数的具体用法?Python hig_box_space_holder怎么用?Python hig_box_space_holder使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hig_box_space_holder函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __pack_widgets
def __pack_widgets(self):
###
self.add(self.main_whole_box)
# Packing command entry to upper box
self.upper_box._pack_expand_fill(self.command_entry)
self.upper_box._pack_noexpand_nofill(self.scan_button)
# Packing notebook (left) and help box (right) to middle box
self.middle_box._pack_expand_fill(self.notebook)
self.middle_box._pack_expand_fill(self.help_vbox)
# Packing buttons to lower box
self.lower_box.pack_end(self.buttons_hbox)
# Packing the three vertical boxes to the main box
self.main_whole_box._pack_noexpand_nofill(self.upper_box)
self.main_whole_box._pack_expand_fill(self.middle_box)
self.main_whole_box._pack_noexpand_nofill(self.lower_box)
###
# Packing profile information tab on notebook
self.notebook.append_page(self.profile_info_vbox, gtk.Label(_('Profile')))
self.profile_info_vbox.set_border_width(5)
table = HIGTable()
self.profile_info_vbox._pack_noexpand_nofill(self.profile_info_label)
self.profile_info_vbox._pack_expand_fill(HIGSpacer(table))
self.profile_description_scroll.add(self.profile_description_text)
vbox_desc = HIGVBox()
vbox_desc._pack_noexpand_nofill(self.profile_description_label)
vbox_desc._pack_expand_fill(hig_box_space_holder())
vbox_ann = HIGVBox()
vbox_ann._pack_expand_fill(hig_box_space_holder())
table.attach(self.profile_name_label,0,1,0,1,xoptions=0,yoptions=0)
table.attach(self.profile_name_entry,1,2,0,1,yoptions=0)
table.attach(vbox_desc,0,1,1,2,xoptions=0)
table.attach(self.profile_description_scroll,1,2,1,2)
# Packing buttons on button_hbox
self.buttons_hbox._pack_expand_fill(hig_box_space_holder())
if self.deletable:
self.buttons_hbox._pack_noexpand_nofill(self.delete_button)
self.buttons_hbox._pack_noexpand_nofill(self.cancel_button)
self.buttons_hbox._pack_noexpand_nofill(self.save_button)
self.buttons_hbox.set_border_width(5)
self.buttons_hbox.set_spacing(6)
###
self.help_vbox._pack_noexpand_nofill(self.help_label)
self.help_vbox._pack_expand_fill(self.help_scroll)
self.help_scroll.add(self.help_field)
self.help_vbox.set_border_width(1)
self.help_vbox.set_spacing(1)
示例2: make_scaninfo_display
def make_scaninfo_display(self, scaninfo):
"""Return a widget displaying a scan's "scaninfo" information: type,
protocol, number of scanned ports, and list of services."""
hbox = HIGHBox()
table = HIGTable()
table.set_border_width(5)
table.set_row_spacings(6)
table.set_col_spacings(6)
table.attach(HIGEntryLabel(_('Scan type:')), 0, 1, 0, 1)
table.attach(HIGEntryLabel(scaninfo['type']), 1, 2, 0, 1)
table.attach(HIGEntryLabel(_('Protocol:')), 0, 1, 1, 2)
table.attach(HIGEntryLabel(scaninfo['protocol']), 1, 2, 1, 2)
table.attach(HIGEntryLabel(_('# scanned ports:')), 0, 1, 2, 3)
table.attach(HIGEntryLabel(scaninfo['numservices']), 1, 2, 2, 3)
table.attach(HIGEntryLabel(_('Services:')), 0, 1, 3, 4)
table.attach(
self.make_services_display(scaninfo['services']), 1, 2, 3, 4)
hbox._pack_noexpand_nofill(hig_box_space_holder())
hbox._pack_noexpand_nofill(table)
return hbox
示例3: __packing
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())
示例4: create_table_hbox
def create_table_hbox(self):
table = HIGTable()
hbox = HIGHBox()
hbox._pack_noexpand_nofill(hig_box_space_holder())
hbox._pack_noexpand_nofill(table)
return table, hbox
示例5: _pack_hbox
def _pack_hbox(self):
self.hbox._pack_noexpand_nofill(hig_box_space_holder())
self.hbox._pack_expand_fill(self.table)
示例6: __init__
def __init__(self, scan):
HIGVBox.__init__(self)
na = _('Not available')
# Command info
self.command_label = HIGEntryLabel(_('Command:'))
self.info_command_label = HIGEntryLabel(na)
self.nmap_version_label = HIGEntryLabel(_('Nmap Version:'))
self.info_nmap_version_label = HIGEntryLabel(na)
self.verbose_label = HIGEntryLabel(_('Verbosity level:'))
self.info_verbose_label = HIGEntryLabel(na)
self.debug_label = HIGEntryLabel(_('Debug level:'))
self.info_debug_label = HIGEntryLabel(na)
self.command_expander = gtk.Expander(
"<b>" + _("Command Info") + "</b>")
self.command_expander.set_use_markup(True)
self.command_table = HIGTable()
self.command_table.set_border_width(5)
self.command_table.set_row_spacings(6)
self.command_table.set_col_spacings(6)
self.command_hbox = HIGHBox()
self.command_hbox._pack_noexpand_nofill(hig_box_space_holder())
self.command_hbox._pack_noexpand_nofill(self.command_table)
self.command_table.attach(self.command_label, 0, 1, 0, 1)
self.command_table.attach(self.info_command_label, 1, 2, 0, 1)
self.command_table.attach(self.nmap_version_label, 0, 1, 1, 2)
self.command_table.attach(self.info_nmap_version_label, 1, 2, 1, 2)
self.command_table.attach(self.verbose_label, 0, 1, 2, 3)
self.command_table.attach(self.info_verbose_label, 1, 2, 2, 3)
self.command_table.attach(self.debug_label, 0, 1, 3, 4)
self.command_table.attach(self.info_debug_label, 1, 2, 3, 4)
self.command_expander.add(self.command_hbox)
self._pack_noexpand_nofill(self.command_expander)
self.command_expander.set_expanded(True)
# General info:
self.start_label = HIGEntryLabel(_('Started on:'))
self.info_start_label = HIGEntryLabel(na)
self.finished_label = HIGEntryLabel(_('Finished on:'))
self.info_finished_label = HIGEntryLabel(na)
self.host_up_label = HIGEntryLabel(_('Hosts up:'))
self.info_hosts_up_label = HIGEntryLabel(na)
self.host_down_label = HIGEntryLabel(_('Hosts down:'))
self.info_hosts_down_label = HIGEntryLabel(na)
self.host_scanned_label = HIGEntryLabel(_('Hosts scanned:'))
self.info_hosts_scanned_label = HIGEntryLabel(na)
self.open_label = HIGEntryLabel(_('Open ports:'))
self.info_open_label = HIGEntryLabel(na)
self.filtered_label = HIGEntryLabel(_('Filtered ports:'))
self.info_filtered_label = HIGEntryLabel(na)
self.closed_label = HIGEntryLabel(_('Closed ports:'))
self.info_closed_label = HIGEntryLabel(na)
self.general_expander = gtk.Expander(
"<b>" + _("General Info") + "</b>")
self.general_expander.set_use_markup(True)
self.general_table = HIGTable()
self.general_table.set_border_width(5)
self.general_table.set_row_spacings(6)
self.general_table.set_col_spacings(6)
self.general_hbox = HIGHBox()
self.general_hbox._pack_noexpand_nofill(hig_box_space_holder())
self.general_hbox._pack_noexpand_nofill(self.general_table)
self.general_table.attach(self.start_label, 0, 1, 0, 1)
self.general_table.attach(self.info_start_label, 1, 2, 0, 1)
self.general_table.attach(self.finished_label, 0, 1, 1, 2)
self.general_table.attach(self.info_finished_label, 1, 2, 1, 2)
self.general_table.attach(self.host_up_label, 0, 1, 2, 3)
self.general_table.attach(self.info_hosts_up_label, 1, 2, 2, 3)
self.general_table.attach(self.host_down_label, 0, 1, 3, 4)
self.general_table.attach(self.info_hosts_down_label, 1, 2, 3, 4)
self.general_table.attach(self.host_scanned_label, 0, 1, 4, 5)
self.general_table.attach(self.info_hosts_scanned_label, 1, 2, 4, 5)
#.........这里部分代码省略.........