本文整理汇总了Python中higwidgets.higboxes.HIGVBox.pack_end方法的典型用法代码示例。如果您正苦于以下问题:Python HIGVBox.pack_end方法的具体用法?Python HIGVBox.pack_end怎么用?Python HIGVBox.pack_end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类higwidgets.higboxes.HIGVBox
的用法示例。
在下文中一共展示了HIGVBox.pack_end方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TabBox
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import pack_end [as 别名]
class TabBox(gtk.ScrolledWindow):
"""
it's a page of TabsWidget
"""
def __init__(self, name):
gtk.ScrolledWindow.__init__(self)
self.frame = TabFrame(name)
self.frame.set_shadow_type(gtk.SHADOW_ETCHED_IN)
self.__main_box = HIGVBox()
self.frame.add(self.__main_box)
self._create_widgets()
self.viewport = gtk.Viewport()
self.viewport.add(self.frame)
self.add(self.viewport)
self.viewport.set_shadow_type(gtk.SHADOW_NONE)
self.props.shadow_type = gtk.SHADOW_NONE
self.__main_box.set_border_width(6)
self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
def _create_widgets(self):
""" Overwrite me, it's subclass """
# Box Interface
def pack_start(self, *args):
self.__main_box.pack_start(*args)
def pack_end(self, *args):
self.__main_box.pack_end(*args)
def destroy(self):
pass
示例2: __do_layout
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import pack_end [as 别名]
def __do_layout(self, create_buttons):
main_vbox = HIGVBox()
# timeline frame
tl_settings_align = gtk.Alignment(0.5, 0.5, 1, 1)
tl_settings_align.set_padding(6, 0, 12, 0)
tl_settings_vbox = HIGVBox()
mode_hbox = HIGHBox()
mode_hbox._pack_noexpand_nofill(self.tl_mode_lbl)
mode_hbox._pack_expand_fill(self.tl_mode)
kind_hbox = HIGHBox()
kind_hbox._pack_noexpand_nofill(self.tl_kind_lbl)
kind_hbox._pack_expand_fill(self.tl_kind)
tl_settings_vbox._pack_noexpand_nofill(mode_hbox)
tl_settings_vbox._pack_noexpand_nofill(kind_hbox)
tl_settings_align.add(tl_settings_vbox)
self.timeline.add(tl_settings_align)
main_vbox._pack_noexpand_nofill(self.timeline)
# end timeline frame
# statusbar frame
sbar_settings_align = gtk.Alignment(0.5, 0.5, 1, 1)
sbar_settings_align.set_padding(6, 0, 12, 0)
sbar_settings_vbox = HIGVBox()
sbar_settings_vbox._pack_noexpand_nofill(self.sbar_tips)
sbar_settings_align.add(sbar_settings_vbox)
self.sbar.add(sbar_settings_align)
main_vbox._pack_noexpand_nofill(self.sbar)
# end statusbar frame
# tabs frame
tabs_settings_align = gtk.Alignment(0.5, 0.5, 1, 1)
tabs_settings_align.set_padding(6, 0, 12, 0)
tabs_settings_vbox = HIGVBox()
tabs_settings_vbox._pack_noexpand_nofill(self.tabs_cbtn)
tabs_settings_align.add(tabs_settings_vbox)
self.tabs.add(tabs_settings_align)
main_vbox._pack_noexpand_nofill(self.tabs)
# end tabs frame
if create_buttons:
# buttons box
btnsbox = HIGHBox()
btnsbox._pack_noexpand_nofill(self.apply)
btnsbox._pack_noexpand_nofill(self.cancel)
btnsbox._pack_noexpand_nofill(self.ok)
bbox = gtk.HBox()
bbox.pack_end(btnsbox, False, False, 0)
main_vbox.pack_end(bbox, False, False, 0)
main_vbox.pack_end(gtk.HSeparator(), False, False, 0)
# end buttons box
return main_vbox
示例3: __do_layout
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import pack_end [as 别名]
def __do_layout(self):
"""
Layout widgets in window.
"""
main_vbox = HIGVBox()
main_vbox.set_border_width(5)
main_vbox.set_spacing(12)
header_hbox = HIGHBox()
schema_table = HIGTable()
auth_table = HIGTable()
btns_hbox = HIGHBox()
header_hbox._pack_expand_fill(self.ttitle)
header_hbox._pack_noexpand_nofill(self.umit_logo)
# schema name
schema_table.attach_label(self.schema_name_lbl, 0, 1, 0, 1)
schema_table.attach_entry(self.schema_name, 1, 2, 0, 1)
# smtp server
schema_table.attach_label(self.smtp_server_lbl, 0, 1, 1, 2)
schema_table.attach_entry(self.smtp_server, 1, 2, 1, 2)
# smtp server port
schema_table.attach_label(self.smtp_port_lbl, 0, 1, 2, 3)
schema_table.attach_entry(self.smtp_port, 1, 2, 2, 3)
# smtp mail from
schema_table.attach_label(self.smtp_mailfrom_lbl, 0, 1, 3, 4)
schema_table.attach_entry(self.smtp_mailfrom, 1, 2, 3, 4)
# smtp user
auth_table.attach_label(self.smtp_login_lbl, 0, 1, 0, 1)
auth_table.attach_entry(self.smtp_login, 1, 2, 0, 1)
# smtp passwd
auth_table.attach_label(self.smtp_passwd_lbl, 0, 1, 1, 2)
auth_table.attach_label(self.smtp_passwd, 1, 2, 1, 2)
# 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.apply)
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(schema_table)
main_vbox._pack_noexpand_nofill(gtk.HSeparator())
main_vbox._pack_noexpand_nofill(self.smtp_need_auth)
main_vbox._pack_noexpand_nofill(auth_table)
main_vbox._pack_noexpand_nofill(gtk.HSeparator())
main_vbox._pack_noexpand_nofill(self.smtp_encrypt_tls)
main_vbox.pack_end(btns_hbox, False, False, 0)
self.add(main_vbox)
示例4: __do_layout
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import pack_end [as 别名]
def __do_layout(self):
"""
Layout window widgets.
"""
main_vbox = HIGVBox()
main_vbox.set_border_width(5)
main_vbox.set_spacing(12)
header_hbox = HIGHBox()
schedp_hbox = HIGHBox()
cron_box = HIGVBox()
cron_table = HIGTable(5, 2)
btns_hbox = HIGHBox()
header_hbox._pack_expand_fill(self.ttitle)
header_hbox._pack_noexpand_nofill(self.umit_logo)
schedp_hbox._pack_noexpand_nofill(self.schedp_name_lbl)
schedp_hbox._pack_expand_fill(self.schedp_name)
# cron format
settings_align = gtk.Alignment(0.5, 0.5, 1, 1)
settings_align.set_padding(6, 0, 12, 0)
cron_table.attach(self.cron_minute_lbl, 0, 1, 0, 1)
cron_table.attach(self.cron_minute, 1, 2, 0, 1)
cron_table.attach(self.cron_hour_lbl, 0, 1, 1, 2)
cron_table.attach(self.cron_hour, 1, 2, 1, 2)
cron_table.attach(self.cron_day_lbl, 0, 1, 2, 3)
cron_table.attach(self.cron_day, 1, 2, 2, 3)
cron_table.attach(self.cron_month_lbl, 0, 1, 3, 4)
cron_table.attach(self.cron_month, 1, 2, 3, 4)
cron_table.attach(self.cron_weekday_lbl, 0, 1, 4, 5)
cron_table.attach(self.cron_weekday, 1, 2, 4, 5)
cron_box._pack_noexpand_nofill(cron_table)
settings_align.add(cron_box)
self.cron_frame.add(settings_align)
# 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.apply)
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(schedp_hbox)
main_vbox._pack_noexpand_nofill(self.cron_frame)
main_vbox.pack_end(btns_hbox, False, False, 0)
self.add(main_vbox)
示例5: __do_layout
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import pack_end [as 别名]
def __do_layout(self):
"""
Layout window widgets.
"""
main_vbox = HIGVBox()
days_box = HIGHBox()
btns_box = HIGHBox()
days_box._pack_noexpand_nofill(self.data_lbl)
days_box._pack_expand_fill(self.days)
days_box._pack_noexpand_nofill(self.days_lbl)
btns_box.pack_end(self.apply, False, False, 0)
btns_box.pack_end(self.cancel, False, False, 0)
main_vbox._pack_noexpand_nofill(days_box)
main_vbox.pack_end(btns_box, False, False, 0)
self.add(main_vbox)
示例6: __do_layout
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import pack_end [as 别名]
#.........这里部分代码省略.........
"""
Add left padding for a widget.
"""
left_padding_align = gtk.Alignment(0.5, 0.5, 1, 1)
left_padding_align.set_padding(0, 0, 12, 0)
left_padding_align.add(widget)
return left_padding_align
main_vbox = HIGVBox()
main_vbox.set_border_width(5)
main_vbox.set_spacing(12)
header_hbox = HIGHBox()
profile_hbox = HIGHBox()
hdivs_hbox = HIGHBox()
arcdraw_vbox = HIGVBox()
vdivs_vbox = HIGVBox()
bgfill_vbox = HIGVBox()
selectfill_vbox = HIGVBox()
btns_hbox = HIGHBox()
# header
header_hbox._pack_expand_fill(self.ttitle)
header_hbox._pack_noexpand_nofill(self.umit_logo)
# profiles
profile_hbox._pack_noexpand_nofill(self.graph_profile_lbl)
profile_hbox._pack_noexpand_nofill(self.graph_profile)
# horizontal divisors
hdivs_hbox._pack_noexpand_nofill(self.hdivs_lbl)
hdivs_hbox._pack_noexpand_nofill(self.hdivs)
# arc drawing
arcdraw_vbox._pack_noexpand_nofill(self.draw_arc_lbl)
arcdraw_when = HIGHBox()
arcdraw_when._pack_noexpand_nofill(self.draw_arc_onsel)
arcdraw_when._pack_noexpand_nofill(self.draw_arc_always)
arcdraw_where = HIGHBox()
arcdraw_where._pack_noexpand_nofill(self.draw_arc_bounds)
arcdraw_where._pack_noexpand_nofill(self.draw_arc_allpts)
arcdraw_vbox._pack_noexpand_nofill(left_padding(arcdraw_when))
arcdraw_vbox._pack_noexpand_nofill(left_padding(arcdraw_where))
arcdraw_vbox._pack_noexpand_nofill(left_padding(self.balloons))
# vertical divisors
vdivs_vbox._pack_noexpand_nofill(self.draw_vertdiv)
vdivs_kind = HIGHBox()
vdivs_kind._pack_noexpand_nofill(self.draw_vertdiv_dash)
vdivs_kind._pack_noexpand_nofill(self.draw_vertdiv_solid)
vdivs_vbox._pack_noexpand_nofill(left_padding(vdivs_kind))
# background fill
bgfill_vbox._pack_noexpand_nofill(self.bg_gradient)
bgfill_gtype = HIGHBox()
bgfill_gtype._pack_noexpand_nofill(self.bg_gradient_vert)
bgfill_gtype._pack_noexpand_nofill(self.bg_gradient_horiz)
bgfill_vbox._pack_noexpand_nofill(left_padding(bgfill_gtype))
# selection fill
selectfill_vbox._pack_noexpand_nofill(self.selection_fill)
selectfill_kind = HIGHBox()
selectfill_kind._pack_noexpand_nofill(self.selection_fill_solid)
selectfill_kind._pack_noexpand_nofill(self.selection_fill_gradient)
selectfill_vbox._pack_noexpand_nofill(left_padding(selectfill_kind))
# 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.apply)
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(profile_hbox)
main_vbox._pack_noexpand_nofill(gtk.HSeparator())
main_vbox._pack_noexpand_nofill(hdivs_hbox)
main_vbox._pack_noexpand_nofill(gtk.HSeparator())
main_vbox._pack_noexpand_nofill(arcdraw_vbox)
main_vbox._pack_noexpand_nofill(gtk.HSeparator())
main_vbox._pack_noexpand_nofill(vdivs_vbox)
main_vbox._pack_noexpand_nofill(gtk.HSeparator())
main_vbox._pack_noexpand_nofill(bgfill_vbox)
main_vbox._pack_noexpand_nofill(gtk.HSeparator())
main_vbox._pack_noexpand_nofill(selectfill_vbox)
main_vbox.pack_end(btns_hbox, False, False, 0)
main_vbox.pack_end(gtk.HSeparator(), False, False, 0)
self.add(main_vbox)
示例7: __do_layout
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import pack_end [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)
示例8: InterfaceEditor
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import pack_end [as 别名]
#.........这里部分代码省略.........
def __option_display(self):
self.display_frame.set_label("Options")
self.opt_display = OptionDisplayMainFrame()
self.opt_display.set_options_list(self.list_options_box)
self.list_options_box.set_option_display(self.opt_display)
self.display_frame.add_with_properties(self.opt_display)
self.vbox_left.pack_start(self.display_frame, False, False)
def __pack_widgets(self):
"""
Packing widgets of mainly windows
"""
self.add(self.main_vbox)
# Pack widgets to main_box
self.main_vbox.pack_start(self.hbox_edit, True, True)
# Paned
self.hbox_edit.pack_start(self.hspacer)
separator = gtk.VSeparator()
self.hspacer.pack1(self.vbox_left, False, False)
self.hspacer.set_position(580)
self.hspacer.pack2(self.vbox_right, False, True)
# Edit Mode
self.edit_mode_exp.add(self.edit_mode_box)
self.edit_mode_exp.set_expanded(True)
# Frame right
self.vbox_right.pack_start(self.edit_mode_exp, False, False)
self.vbox_right.pack_end(self.notebook, True, True)
# Status bar
self.main_vbox.pack_start(self.statusbar, False, False)
def create_edit_mode(self):
"""
Create a treeview that contains a three edit modes
returns vbox contains a treeview
@return: returns the treeview with list of edit modes
@rtype: vbox
"""
model = gtk.TreeStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING)
self.edit_mode_tv = gtk.TreeView(model)
self.edit_mode_tv.set_headers_visible(False)
renderer = gtk.CellRendererText()
cell_renderer_pix = gtk.CellRendererPixbuf()
column = gtk.TreeViewColumn()
column.set_title(_("Name"))
column.pack_start(cell_renderer_pix, False)
column.add_attribute(cell_renderer_pix, "pixbuf", 0)
column.pack_start(renderer, True)
column.add_attribute(renderer, "text", 1)
self.edit_mode_tv.append_column(column)
myiter = model.insert_before(None, None)
icon = gtk.Image()
icon = icon.render_icon("gtk-edit", gtk.ICON_SIZE_MENU)
model.set_value(myiter, 0, icon)
model.set_value(myiter, 1, "Profile")
myiter = model.insert_before(None, None)
示例9: __layout
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import pack_end [as 别名]
def __layout(self):
"""
Layout widgets
"""
main_vbox = HIGVBox()
main_vbox.set_border_width(5)
main_vbox.set_spacing(12)
main_hpaned = gtk.HPaned()
btns_hbox = HIGHBox()
left_box = HIGVBox()
right_box = gtk.VBox()
header_hbox = HIGHBox()
hostdetect_hbox = HIGHBox()
targetl_hbox = HIGHBox()
targetv_hbox = HIGHBox()
targetr_hbox = HIGHBox()
# header
header_hbox._pack_expand_fill(self.ttitle)
header_hbox._pack_noexpand_nofill(self.umit_logo)
# network list
netframe = HIGFrame(_("Network list"))
settings_align = gtk.Alignment(0.5, 0.5, 1, 1)
settings_align.set_padding(6, 0, 12, 0)
nbox = HIGVBox()
entry = gtk.Entry()
entry.set_text(_("Sample 192.168.254.0/24"))
nbox._pack_noexpand_nofill(entry)
addnw_hbox = HIGHBox()
addnw_hbox._pack_noexpand_nofill(self.addnetworks)
nbox.pack_end(addnw_hbox, False, False, 0)
self.networks_box = nbox
settings_align.add(nbox)
netframe.add(settings_align)
# detection
hostdetect_hbox._pack_noexpand_nofill(self.netdetect_btn)
hostdetect_hbox._pack_noexpand_nofill(self.hostdetect_btn)
# target list
targetl_hbox._pack_noexpand_nofill(self.target_lbl)
targetv_hbox._pack_expand_fill(self.tview)
targetr_hbox.pack_end(self.target_remove, False, False, 0)
# 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.apply)
# change apply button stock text
lbl = self.apply.get_children()[0].get_children()[0].get_children()[1]
lbl.set_text(_("Use target list"))
left_box._pack_noexpand_nofill(netframe)
left_box.pack_end(hostdetect_hbox, False, False, 0)
right_box.pack_start(targetl_hbox, False, False, 0)
right_box.pack_start(targetv_hbox, True, True, 6)
right_box.pack_start(targetr_hbox, False, False, 0)
left_align = gtk.Alignment(0.5, 0.5, 1, 1)
left_align.set_padding(0, 0, 0, 6)
left_align.add(left_box)
right_align = gtk.Alignment(0.5, 0.5, 1, 1)
right_align.set_padding(0, 0, 6, 0)
right_align.add(right_box)
main_hpaned.add1(left_align)
main_hpaned.add2(right_align)
main_vbox._pack_noexpand_nofill(header_hbox)
main_vbox._pack_noexpand_nofill(gtk.HSeparator())
main_vbox._pack_expand_fill(main_hpaned)
main_vbox.pack_end(btns_hbox, False, False, 0)
self.add(main_vbox)