本文整理汇总了Python中base.SingleWindow类的典型用法代码示例。如果您正苦于以下问题:Python SingleWindow类的具体用法?Python SingleWindow怎么用?Python SingleWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SingleWindow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, **config):
SingleWindow.__init__(self, **config)
self.add_defaults(TreeTab.defaults)
self._focused = None
self._panel = None
self._tree = Root(self.sections)
self._nodes = {}
示例2: focus
def focus(self, win):
old = self.lastfocus
if old and self.property_name:
old.window.set_property(self.property_name,
self.property_small, "STRING", format=8)
SingleWindow.focus(self, win)
if self.property_name:
win = self.clients[0]
win.window.set_property(self.property_name,
self.property_big, "STRING", format=8)
self.lastfocus = win
示例3: focus
def focus(self, win):
if self.focused and self.property_name:
self.focused.window.set_property(
self.property_name,
self.property_small,
"STRING",
format=8
)
SingleWindow.focus(self, win)
if self.property_name:
self.focused = win
win.window.set_property(
self.property_name,
self.property_big,
"STRING",
format=8
)
示例4: __init__
def __init__(self, ratio=_med_ratio, align=_left, change_ratio=.05, change_size=20, **config):
"""
- ratio : The percent of the screen-space the
master pane should occupy by default.
- align : Which side the master pane will be placed.
- change_size : Resize change in pixels
"""
SingleWindow.__init__( self, **config)
self.clients = []
self.sizes = []
self.ratio = ratio
self.align = align
self.change_size = change_size
self.change_ratio = change_ratio
self._focus = 0
示例5: clone
def clone(self, group):
"Clone layout for other groups"
c = SingleWindow.clone(self, group)
c.clients = []
c.sizes = []
c.ratio = self.ratio
c.align = self.align
c._focus = 0
return c
示例6: layout
def layout(self, windows, screen):
panel, body = screen.hsplit(self.panel_width)
self._resize_panel(panel)
SingleWindow.layout(self, windows, body)
示例7: info
def info(self):
d = SingleWindow.info(self)
d["clients"] = [i.name for i in self._nodes]
d["sections"] = [i.title for i in self._tree.children]
return d
示例8: clone
def clone(self, group):
c = SingleWindow.clone(self, group)
c._focused = None
c._panel = None
c._tree = Root(self.sections)
return c
示例9: clone
def clone(self, group):
c = SingleWindow.clone(self, group)
c.clients = []
return c
示例10: __init__
def __init__(self, **config):
SingleWindow.__init__(self, **config)
self.add_defaults(Zoomy.defaults)
self.clients = []
self.focused = None
示例11: info
def info(self):
d = SingleWindow.info(self)
d["clients"] = [x.name for x in self.clients]
return d
示例12: __init__
def __init__(self):
SingleWindow.__init__(self)
self.window = None
示例13: __init__
def __init__(self, **config):
SingleWindow.__init__(self, **config)
self.clients = []
self.add_defaults(Max.defaults)
示例14: __init__
def __init__(self):
SingleWindow.__init__(self)
self.clients = []
示例15: __init__
def __init__(self, **config):
SingleWindow.__init__(self, **config)
self.clients = []