本文整理汇总了Python中etk.docking.DockGroup.show方法的典型用法代码示例。如果您正苦于以下问题:Python DockGroup.show方法的具体用法?Python DockGroup.show怎么用?Python DockGroup.show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类etk.docking.DockGroup
的用法示例。
在下文中一共展示了DockGroup.show方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: dock_group_factory
# 需要导入模块: from etk.docking import DockGroup [as 别名]
# 或者: from etk.docking.DockGroup import show [as 别名]
def dock_group_factory(parent, weight=None, name=None):
group = DockGroup()
if name:
group.set_name(name)
if weight is not None:
parent.insert_item(group, weight=float(weight) / 100.)
else:
parent.add(group)
group.show()
return group
示例2: default_window
# 需要导入模块: from etk.docking import DockGroup [as 别名]
# 或者: from etk.docking.DockGroup import show [as 别名]
def default_window(n_groups):
world.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
world.window.set_default_size(800, 150)
world.frame = DockFrame()
world.window.add(world.frame)
world.layout = DockLayout()
world.layout.add(world.frame)
paned = DockPaned()
world.frame.add(paned)
world.window.show()
world.frame.show()
paned.show()
world.groups = []
for i in range(int(n_groups)):
group = DockGroup()
paned.add(group)
group.show()
world.groups.append(group)
示例3: create_item
# 需要导入模块: from etk.docking import DockGroup [as 别名]
# 或者: from etk.docking.DockGroup import show [as 别名]
def create_item(self, ui_component): #, widget, title, placement=None):
"""
Create an item for a ui component. This method can be called from UIComponents.
"""
item = DockItem(ui_component.title)
item.add(ui_component.open())
group = DockGroup()
group.insert_item(item)
placement = ui_component.placement
if placement:
if placement == 'floating':
add_new_group_floating(group, self.layout, ui_component.size)
else:
location = self.layout.get_widgets(placement[1])[0]
{ 'left': add_new_group_left,
'right': add_new_group_right,
'above': add_new_group_above,
'below': add_new_group_below }[placement[0]](location, group)
else:
add_new_group_floating(group)
item.show()
item.ui_component = ui_component
group.show()