parameters: (self, dock)
return_statement: return positions, sizes
docstring: Returns all the panes positions and sizes in a dock.
  
          :param `dock`: a :class:`AuiDockInfo` instance.
docstring_summary: Returns all the panes positions and sizes in a dock.
docstring_tokens: Returns all the panes positions and sizes in a dock .
function: def GetPanePositionsAndSizes(self, dock):
          """
          Returns all the panes positions and sizes in a dock.
  
          :param `dock`: a :class:`AuiDockInfo` instance.
          """
  
          caption_size = self._art.GetMetric(AUI_DOCKART_CAPTION_SIZE)
          pane_border_size = self._art.GetMetric(AUI_DOCKART_PANE_BORDER_SIZE)
          gripper_size = self._art.GetMetric(AUI_DOCKART_GRIPPER_SIZE)
  
          positions = []
          sizes = []
  
          action_pane = -1
          pane_count = len(dock.panes)
  
          # find the pane marked as our action pane
          for pane_i in xrange(pane_count):
              pane = dock.panes[pane_i]
              if pane.HasFlag(AuiPaneInfo.actionPane):
                  if action_pane != -1:
                      raise Exception("Too many action panes!")
                  action_pane = pane_i
  
          # set up each panes default position, and
          # determine the size (width or height, depending
          # on the dock's orientation) of each pane
          for pane in dock.panes:
              positions.append(pane.dock_pos)
              size = 0
  
              if pane.HasBorder():
                  size += pane_border_size*2
  
              if dock.IsHorizontal():
                  if pane.HasGripper() and not pane.HasGripperTop():
                      size += gripper_size
  
                  if pane.HasCaptionLeft():
                      size += caption_size
  
                  size += pane.best_size.x
  
              else:
                  if pane.HasGripper() and pane.HasGripperTop():
                      size += gripper_size
  
                  if pane.HasCaption() and not pane.HasCaptionLeft():
                      size += caption_size
  
                  size += pane.best_size.y
  
              sizes.append(size)
  
          # if there is no action pane, just return the default
          # positions (as specified in pane.pane_pos)
          if action_pane == -1:
              return positions, sizes
  
          offset = 0
          for pane_i in xrange(action_pane-1, -1, -1):
              amount = positions[pane_i+1] - (positions[pane_i] + sizes[pane_i])
              if amount >= 0:
                  offset += amount
              else:
                  positions[pane_i] -= -amount
  
              offset += sizes[pane_i]
  
          # if the dock mode is fixed, make sure none of the panes
          # overlap we will bump panes that overlap
          offset = 0
          for pane_i in xrange(action_pane, pane_count):
              amount = positions[pane_i] - offset
              if amount >= 0:
                  offset += amount
              else:
                  positions[pane_i] += -amount
  
              offset += sizes[pane_i]
  
          return positions, sizes
function_tokens: def GetPanePositionsAndSizes ( self , dock ) : caption_size = self . _art . GetMetric ( AUI_DOCKART_CAPTION_SIZE ) pane_border_size = self . _art . GetMetric ( AUI_DOCKART_PANE_BORDER_SIZE ) gripper_size = self . _art . GetMetric ( AUI_DOCKART_GRIPPER_SIZE ) positions = [ ] sizes = [ ] action_pane = - 1 pane_count = len ( dock . panes ) # find the pane marked as our action pane for pane_i in xrange ( pane_count ) : pane = dock . panes [ pane_i ] if pane . HasFlag ( AuiPaneInfo . actionPane ) : if action_pane != - 1 : raise Exception ( "Too many action panes!" ) action_pane = pane_i # set up each panes default position, and # determine the size (width or height, depending # on the dock's orientation) of each pane for pane in dock . panes : positions . append ( pane . dock_pos ) size = 0 if pane . HasBorder ( ) : size += pane_border_size * 2 if dock . IsHorizontal ( ) : if pane . HasGripper ( ) and not pane . HasGripperTop ( ) : size += gripper_size if pane . HasCaptionLeft ( ) : size += caption_size size += pane . best_size . x else : if pane . HasGripper ( ) and pane . HasGripperTop ( ) : size += gripper_size if pane . HasCaption ( ) and not pane . HasCaptionLeft ( ) : size += caption_size size += pane . best_size . y sizes . append ( size ) # if there is no action pane, just return the default # positions (as specified in pane.pane_pos) if action_pane == - 1 : return positions , sizes offset = 0 for pane_i in xrange ( action_pane - 1 , - 1 , - 1 ) : amount = positions [ pane_i + 1 ] - ( positions [ pane_i ] + sizes [ pane_i ] ) if amount >= 0 : offset += amount else : positions [ pane_i ] -= - amount offset += sizes [ pane_i ] # if the dock mode is fixed, make sure none of the panes # overlap we will bump panes that overlap offset = 0 for pane_i in xrange ( action_pane , pane_count ) : amount = positions [ pane_i ] - offset if amount >= 0 : offset += amount else : positions [ pane_i ] += - amount offset += sizes [ pane_i ] return positions , sizes