'after every row/column recalculate remaining area'

def get_sizes_advanced(self, total_width, total_height, xoffset=0, yoffset=0):

    results = []
    width = total_width
    height = total_height
    while (len(results) < self.num_windows):
        remaining = (self.num_windows - len(results))
        (orien, sizes) = self._get_row_or_col(remaining, width, height, xoffset, yoffset)
        results.extend(sizes)
        if (orien == ROWCOL):
            height -= sizes[(-1)][(-1)]
            yoffset += sizes[(-1)][(-1)]
        else:
            width -= sizes[(-1)][(-2)]
            xoffset += sizes[(-1)][(-2)]
    return results
