Update pane coordinate tuples based on their height and width relative to other panes
        within the dimensions of the current window.

        We account for panes with a height of 1 where the bottom coordinates are the same as the top.
        Account for floating panes and self-coordinating panes adjacent to panes set to EXPAND.

        Coordinates are of the form:
        [
          ((top-left-from-top, top-left-from-left),
           (top-right-from-top, top-right-from-left)),
          ((bottom-left-from-top, bottom-left-from-left),
           (bottom-right-from-top, bottom-right-from-left))
        ]

        We can then use these to determine things such as whether corners are inverted and how
        many characters may be drawn

def coordinate(self, panes=[], index=0):
        """
        Update pane coordinate tuples based on their height and width relative to other panes
        within the dimensions of the current window.

        We account for panes with a height of 1 where the bottom coordinates are the same as the top.
        Account for floating panes and self-coordinating panes adjacent to panes set to EXPAND.

        Coordinates are of the form:
        [
          ((top-left-from-top, top-left-from-left),
           (top-right-from-top, top-right-from-left)),
          ((bottom-left-from-top, bottom-left-from-left),
           (bottom-right-from-top, bottom-right-from-left))
        ]

        We can then use these to determine things such as whether corners are inverted and how
        many characters may be drawn

        """        
        y = 0 # height

        for i, element in enumerate(self.panes):
            x = 0 # width
            if isinstance(element, list):
                current_height = 0
                for j, pane in enumerate(element):
                    if pane.hidden: continue
                    current_width  = pane.width
                    current_height = pane.height
                    upper          = ((y, x), (y, x+current_width))
                    lower          = ((y+(current_height if current_height > 1 else 0), x),
                                      (y+(current_height if current_height > 1 else 0), x+current_width))
                    pane.coords    = [upper, lower]
                    x += current_width
                y += (current_height+1 if current_height > 1 else 1)
            else:
                if element.hidden: continue
                current_width  = element.width
                current_height = element.height
                upper          = ((y, x), (y, x+current_width))
                lower          = ((y+(current_height if current_height > 1 else 0), x),
                                  (y+(current_height if current_height > 1 else 0), x+current_width))
                element.coords = [upper, lower]
                y += (current_height+1 if current_height > 1 else 1)

            if self.debug:
                coordinates = "Coordinates: " + str([p.coords for p in self])
                if len(coordinates) > self.width:
                    coordinates  = coordinates[:self.width - 3]
                    coordinates += '...'
                self.addstr(self.height-3, 0, coordinates)