def tile_horizontally_on_area(windows_list, x, y, w, h, dws): """Tile the Given Windows Horizontally on the Given Area""" step = (w / len(windows_list)) win_num = 0 for checked_window in windows_list: support.moveresize(checked_window, x + win_num * step, y, step, h, dws) win_num += 1
def tile_vertically_on_area(windows_list, x, y, w, h, dws): """Tile the Given Windows Vertically on the Given Area""" step = (h / len(windows_list)) win_num = 0 for checked_window in windows_list: support.moveresize(checked_window, x, y + win_num * step, w, step, dws) win_num += 1
def tile_grid_on_area(rows, cols, windows_list, x, y, w, h, dws): """Tile the Given Windows Grid on the Given Area""" if len(windows_list) > rows*cols: windows_list = windows_list[0:rows*cols] step_h = (h / rows) step_w = (w / cols) for index,checked_window in enumerate(windows_list): xo = step_w*(index%cols) yo = step_h*(index/cols) support.moveresize(checked_window, x+xo, y+yo, step_w , step_h, dws)
def tile_quad_on_area(windows_list, x, y, w, h, dws): """Tile the Given Windows Quad on the Given Area""" if len(windows_list) > 4: windows_list = windows_list[0:4] for index, checked_window in enumerate(windows_list): if index in [1, 3]: xo = w / 2 else: xo = 0 if index > 1: yo = h / 2 else: yo = 0 support.moveresize(checked_window, (x + xo), (y + yo), w / 2, h / 2, dws)
def tile_triangle_right_on_area(windows_list, x, y, w, h, dws): """Tile 3 Windows in Triangle Right Scheme on the Given Area""" if len(windows_list) > 3: windows_list = windows_list[0:3] for index,checked_window in enumerate(windows_list): if index == 1: xo = w/2 else: xo = 0 if index == 2: yo = h/2 else: yo = 0 if index == 1: height = h else: height = h/2 support.moveresize(checked_window, (x + xo), (y + yo), w/2 , height, dws)
def tile_triangle_up_on_area(windows_list, x, y, w, h, dws): """Tile 3 Windows in Triangle Up Scheme on the Given Area""" if len(windows_list) > 3: windows_list = windows_list[0:3] for index,checked_window in enumerate(windows_list): if index == 2: xo = w/2 else: xo = 0 if index > 0: yo = h/2 else: yo = 0 if index == 0: width = w else: width = w/2 support.moveresize(checked_window, (x + xo), (y + yo), width, h/2, dws)
def tile_quad_on_area(windows_list, x, y, w, h, dws): """Tile the Given Windows Quad on the Given Area""" print ("###@: tile_quad_on_area: x=" + str(x) + ", y=" + str(y) + ", w=" + str(w) + ", h=" + str(h)); if len(windows_list) > 4: windows_list = windows_list[0:4] for index,checked_window in enumerate(windows_list): if index in [1, 3]: xo = w/2 + glob.screen_margin_start else: xo = 0 if index > 1: yo = h/2 + glob.screen_margin_top else: yo = 0 support.moveresize(checked_window, (x + xo), (y + yo), w/2 , h/2, dws)