def DoInsertPane(panes, dock_direction, dock_layer, dock_row, dock_pos):
    """
    This is an internal function that inserts a new pane
    by incrementing all existing dock position values by one.

    :param `panes`: a list of :class:`AuiPaneInfo`;
    :param integer `dock_direction`: the :class:`AuiDockInfo` docking direction to analyze;
    :param integer `dock_layer`: the :class:`AuiDockInfo` layer to analyze.
    :param integer `dock_row`: the :class:`AuiDockInfo` row to analyze;
    :param integer `dock_pos`: the :class:`AuiDockInfo` position to analyze.
    """
    for ii in range(len(panes)):
        pane = panes[ii]
        if (not pane.IsFloating() and pane.dock_direction == dock_direction and
            pane.dock_layer == dock_layer and pane.dock_row == dock_row and
            pane.dock_pos >= dock_pos):
            pane.dock_pos = pane.dock_pos + 1
        panes[ii] = pane
    return panes
