本文整理汇总了Python中higwidgets.higboxes.HIGVBox.add方法的典型用法代码示例。如果您正苦于以下问题:Python HIGVBox.add方法的具体用法?Python HIGVBox.add怎么用?Python HIGVBox.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类higwidgets.higboxes.HIGVBox
的用法示例。
在下文中一共展示了HIGVBox.add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ZionHostsView
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import add [as 别名]
class ZionHostsView(gtk.Notebook):
"""
"""
def __init__(self):
"""
"""
gtk.Notebook.__init__(self)
self.set_border_width(6)
self.set_tab_pos(gtk.POS_TOP)
self.__create_widgets()
def __create_widgets(self):
"""
"""
self.__scans_page = ZionScansPage()
self.__ports_page = HIGVBox()
self.open_ports = ScanOpenPortsPage()
self.append_page(self.__scans_page, gtk.Label(_('Scans')))
self.append_page(self.__ports_page, gtk.Label(_('Ports')))
self.__ports_page.add(self.open_ports)
def port_mode(self):
self.open_ports.host.port_mode()
def get_scans_page(self):
"""
"""
return self.__scans_page
示例2: __do_layout
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import add [as 别名]
def __do_layout(self):
"""
Layout widgets.
"""
main_vbox = HIGVBox()
main_vbox.set_border_width(5)
main_vbox.set_spacing(12)
header_hbox = HIGHBox()
invname_hbox = HIGHBox()
scan_hbox = HIGHBox()
scanadv_hbox = HIGHBox()
scantarget_hbox = HIGHBox()
sched_box = HIGHBox()
btns_hbox = HIGHBox()
# header
header_hbox._pack_expand_fill(self.ttitle)
header_hbox._pack_noexpand_nofill(self.umit_logo)
# inventory's name
invname_hbox._pack_noexpand_nofill(self.invname_lbl)
invname_hbox._pack_expand_fill(self.invname)
invname_hbox._pack_noexpand_nofill(self.invname_inuse)
invname_hbox._pack_noexpand_nofill(self.invenabled)
# scan command
scan_hbox._pack_noexpand_nofill(self.scandefault)
scan_hbox._pack_noexpand_nofill(self.scandefault_tip)
scanadv_hbox._pack_expand_fill(self.scanadv)
adv_box = HIGVBox()
scanadv_align = gtk.Alignment(0.5, 0.5, 1, 1)
scanadv_align.set_padding(6, 0, 12, 0)
scanname_box = HIGHBox()
scanname_box._pack_noexpand_nofill(self.scan_name_lbl)
scanname_box._pack_expand_fill(self.scan_name)
scanname_box._pack_noexpand_nofill(self.cmd_wizard)
adv_box.add(scanname_box)
scancmd_box = HIGHBox()
scancmd_box._pack_noexpand_nofill(self.scan_command_lbl)
scancmd_box._pack_expand_fill(self.scan_command)
adv_box.add(scancmd_box)
scanadv_align.add(adv_box)
self.scanadv.add(scanadv_align)
# scan target
scantarget_hbox._pack_noexpand_nofill(self.scantarget_lbl)
scantarget_hbox._pack_expand_fill(self.scantarget)
scantarget_hbox._pack_noexpand_nofill(self.scantarget_discovery)
# scheduling profiles
sched_box._pack_noexpand_nofill(self.sched_name_lbl)
sched_box._pack_expand_fill(self.sched_name)
sched_box._pack_noexpand_nofill(self.sched_name_edit)
# bottom buttons
btns_hbox.set_homogeneous(True)
btns_hbox._pack_expand_fill(self.help)
btns_hbox._pack_expand_fill(hig_box_space_holder())
btns_hbox._pack_expand_fill(self.cancel)
btns_hbox._pack_expand_fill(self.ok)
main_vbox._pack_noexpand_nofill(header_hbox)
main_vbox._pack_noexpand_nofill(gtk.HSeparator())
main_vbox._pack_noexpand_nofill(invname_hbox)
main_vbox._pack_noexpand_nofill(scan_hbox)
main_vbox._pack_noexpand_nofill(scanadv_hbox)
main_vbox._pack_noexpand_nofill(scantarget_hbox)
if self.loaded_command and self.edit_mode:
view_cmd_box = HIGHBox()
view_cmd_box._pack_noexpand_nofill(gtk.Label(_("Command")))
# XXX Why don't reuse scan_command?
self.cmd_entry = gtk.Entry()
self.cmd_entry.set_text(self.loaded_command)
view_cmd_box._pack_expand_fill(self.cmd_entry)
img_info = gtk.Image()
img_info.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_MENU)
eb = gtk.EventBox()
eb.add(img_info)
self.tooltips.set_tip(eb, _("Changes in command won't be saved!"))
view_cmd_box.pack_end(eb, False, False, 0)
main_vbox._pack_noexpand_nofill(view_cmd_box)
main_vbox._pack_noexpand_nofill(sched_box)
main_vbox.pack_end(btns_hbox, False, False, 0)
main_vbox.pack_end(gtk.HSeparator(), False, False, 0)
self.add(main_vbox)