本文整理匯總了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()