def __init__(self, _): _FrameWindow.__init__(self) self.pos = {'x': self.frame.pos['buttonbg']['x'], 'y': self.frame.pos['buttonbg']['y'], 'width': self.frame.pos['buttonbg']['width'], 'height': self.frame.pos['buttonbg']['height']} self.configure(y=self.pos['y'], width=self.pos['width'], height=self.pos['height']) self.map()
def __init__(self, _): _FrameWindow.__init__(self) self.pos = {'x': self.frame.pos['title_bar']['x'], 'y': self.frame.pos['title_bar']['y'], 'width': self.frame.pos['title_bar']['width'], 'height': self.frame.pos['title_bar']['height']} self.configure(x=self.pos['x'], y=self.pos['y'], height=self.pos['height']) mousebind.register('title', self, self.id) self.map()
def __init__(self, *_): _FrameWindow.__init__(self) self._imgs = dict([(st, None) for st in self.frame.allowed_states]) self._img_w = self._img_h = None self.pos = { 'x': self.frame.pos[self.frm_ident]['x'], 'y': self.frame.pos[self.frm_ident]['y'], 'width': self.frame.pos[self.frm_ident]['width'], 'height': self.frame.pos[self.frm_ident]['height'] } events.register_drag(self.frame.client.cb_move_start, self.frame.client.cb_move_drag, self.frame.client.cb_move_end, self.id, 'Mod4-1', grab=False) events.register_drag(partial(self.frame.client.cb_resize_start, direction=self.direction), self.frame.client.cb_resize_drag, self.frame.client.cb_resize_end, self.id, '1', grab=False) # If this is a corner, then make sure normal resizing uses the # appropriate direction. if self.frm_ident.find('side') == -1: rs_start = partial(self.frame.client.cb_resize_start, direction=self.direction) else: rs_start = self.frame.client.cb_resize_start events.register_drag(rs_start, self.frame.client.cb_resize_drag, self.frame.client.cb_resize_end, self.id, 'Mod4-3', grab=False) self.setup() self.map()
def __init__(self, _): _FrameWindow.__init__(self) self._imgs = dict([(st, None) for st in self.frame.allowed_states]) self.pos = {'x': self.frame.pos['icon']['x'], 'y': self.frame.pos['icon']['y'], 'width': self.frame.pos['icon']['width'], 'height': self.frame.pos['icon']['height']} self.configure(x=self.pos['x'], y=self.pos['y'], width=self.pos['width'], height=self.pos['height']) mousebind.register('title', self, self.id) self.setup() self.map()
def __init__(self, *_): _FrameWindow.__init__(self) self._imgs = dict([(st, None) for st in self.frame.allowed_states]) self._img_w = self._img_h = None self.pos = {'x': self.frame.pos[self.frm_ident]['x'], 'y': self.frame.pos[self.frm_ident]['y'], 'width': self.frame.pos[self.frm_ident]['width'], 'height': self.frame.pos[self.frm_ident]['height']} events.register_drag(self.frame.client.cb_move_start, self.frame.client.cb_move_drag, self.frame.client.cb_move_end, self.id, 'Mod4-1', grab=False) events.register_drag(partial(self.frame.client.cb_resize_start, direction=self.direction), self.frame.client.cb_resize_drag, self.frame.client.cb_resize_end, self.id, '1', grab=False) # If this is a corner, then make sure normal resizing uses the # appropriate direction. if self.frm_ident.find('side') == -1: rs_start = partial(self.frame.client.cb_resize_start, direction=self.direction) else: rs_start = self.frame.client.cb_resize_start events.register_drag(rs_start, self.frame.client.cb_resize_drag, self.frame.client.cb_resize_end, self.id, 'Mod4-3', grab=False) self.setup() self.map()
def __init__(self, _): _FrameWindow.__init__(self) self._imgs = dict([(st, None) for st in self.frame.allowed_states]) self._fwidth = 0 self._fheight = 0 self.pos = {'x': self.frame.pos['title']['x'], 'y': self.frame.pos['title']['y'], 'width': self.frame.pos['title']['width'], 'height': self.frame.pos['title']['height']} self.configure(x=self.pos['x'], y=self.pos['y'], height=self.pos['height']) events.register_callback(xcb.xproto.PropertyNotifyEvent, self.cb_PropertyNotifyEvent, self.frame.client.win.id) mousebind.register('title', self, self.id) self.set_text(self.frame.client.win.wmname) self.map()
def __init__(self, *_): _FrameWindow.__init__(self) self._imgs = {st: {'normal': None, 'hover': None, 'click': None} for st in self.frame.allowed_states} self._secondary = set() self.pos = {'x': self.frame.pos[self.ident]['x'], 'y': self.frame.pos[self.ident]['y'], 'width': self.frame.pos[self.ident]['width'], 'height': self.frame.pos[self.ident]['height']} self.configure(y=self.pos['y'], width=self.pos['width'], height=self.pos['height']) events.register_callback(xcb.xproto.EnterNotifyEvent, self.cb_enter, self.id) events.register_callback(xcb.xproto.LeaveNotifyEvent, self.cb_leave, self.id) mousebind.register('button', self, self.id) self.setup() self.map()