parameters: (self, docks, panes, target, pt, offset)
return_statement: return self.ProcessDockResult(target, drop)
docstring: Handles the situation in which the dropped pane contains a toolbar.
  
          :param `docks`: a list of :class:`AuiDockInfo` classes;
          :param `panes`: a list of :class:`AuiPaneInfo` instances;
          :param AuiPaneInfo `target`: the target pane containing the toolbar;
          :param Point `pt`: a mouse position to check for a drop operation;
          :param Point `offset`: a possible offset from the input point `pt`.
docstring_summary: Handles the situation in which the dropped pane contains a toolbar.
docstring_tokens: Handles the situation in which the dropped pane contains a toolbar .
function: def DoDropToolbar(self, docks, panes, target, pt, offset):
          """
          Handles the situation in which the dropped pane contains a toolbar.
  
          :param `docks`: a list of :class:`AuiDockInfo` classes;
          :param `panes`: a list of :class:`AuiPaneInfo` instances;
          :param AuiPaneInfo `target`: the target pane containing the toolbar;
          :param Point `pt`: a mouse position to check for a drop operation;
          :param Point `offset`: a possible offset from the input point `pt`.
          """
  
          drop = self.CopyTarget(target)
  
          # The result should always be shown
          drop.Show()
  
          # Check to see if the toolbar has been dragged out of the window
          if CheckOutOfWindow(self._frame, pt):
              if self._agwFlags & AUI_MGR_ALLOW_FLOATING and drop.IsFloatable():
                  drop.Float()
  
              return self.ProcessDockResult(target, drop)
  
          # Allow directional change when the cursor leaves this rect
          safeRect = wx.Rect(*target.rect)
          if target.IsHorizontal():
              safeRect.Inflate(100, 50)
          else:
              safeRect.Inflate(50, 100)
  
          # Check to see if the toolbar has been dragged to edge of the frame
          dropDir = CheckEdgeDrop(self._frame, docks, pt)
  
          if dropDir != -1:
  
              if dropDir == wx.LEFT:
                  drop.Dock().Left().Layer(auiToolBarLayer).Row(0). \
                      Position(pt.y - self.GetDockPixelOffset(drop) - offset.y)
  
              elif dropDir == wx.RIGHT:
                  drop.Dock().Right().Layer(auiToolBarLayer).Row(0). \
                      Position(pt.y - self.GetDockPixelOffset(drop) - offset.y)
  
              elif dropDir == wx.TOP:
                  drop.Dock().Top().Layer(auiToolBarLayer).Row(0). \
                      Position(pt.x - self.GetDockPixelOffset(drop) - offset.x)
  
              elif dropDir == wx.BOTTOM:
                  drop.Dock().Bottom().Layer(auiToolBarLayer).Row(0). \
                      Position(pt.x - self.GetDockPixelOffset(drop) - offset.x)
  
              if not target.IsFloating() and safeRect.Contains(pt) and \
                 target.dock_direction != drop.dock_direction:
                  return False, target
  
              return self.ProcessDockResult(target, drop)
  
          # If the windows is floating and out of the client area, do nothing
          if drop.IsFloating() and not self._frame.GetClientRect().Contains(pt):
              return False, target
  
          # Ok, can't drop on edge - check internals ...
  
          clientSize = self._frame.GetClientSize()
          x = Clip(pt.x, 0, clientSize.x - 1)
          y = Clip(pt.y, 0, clientSize.y - 1)
          part = self.HitTest(x, y)
  
          if not part or not part.dock:
              return False, target
  
          dock = part.dock
  
          # toolbars may only be moved in and to fixed-pane docks,
          # otherwise we will try to float the pane.  Also, the pane
          # should float if being dragged over center pane windows
          if not dock.fixed or dock.dock_direction == AUI_DOCK_CENTER:
  
              if (self._agwFlags & AUI_MGR_ALLOW_FLOATING and drop.IsFloatable()) or \
                 dock.dock_direction not in [AUI_DOCK_CENTER, AUI_DOCK_NONE]:
                  if drop.IsFloatable():
                      drop.Float()
  
              return self.ProcessDockResult(target, drop)
  
          # calculate the offset from where the dock begins
          # to the point where the user dropped the pane
          dockDropOffset = 0
          if dock.IsHorizontal():
              dockDropOffset = pt.x - dock.rect.x - offset.x
          else:
              dockDropOffset = pt.y - dock.rect.y - offset.y
  
          drop.Dock().Direction(dock.dock_direction).Layer(dock.dock_layer). \
              Row(dock.dock_row).Position(dockDropOffset)
  
          if (pt.y <= dock.rect.GetTop() + 2 and dock.IsHorizontal()) or \
             (pt.x <= dock.rect.GetLeft() + 2 and dock.IsVertical()):
  
              if dock.dock_direction in [AUI_DOCK_TOP, AUI_DOCK_LEFT]:
                  row = drop.dock_row
                  panes = DoInsertDockRow(panes, dock.dock_direction, dock.dock_layer, dock.dock_row)
                  drop.dock_row = row
  
              else:
                  panes = DoInsertDockRow(panes, dock.dock_direction, dock.dock_layer, dock.dock_row+1)
                  drop.dock_row = dock.dock_row + 1
  
          if (pt.y >= dock.rect.GetBottom() - 2 and dock.IsHorizontal()) or \
             (pt.x >= dock.rect.GetRight() - 2 and dock.IsVertical()):
  
              if dock.dock_direction in [AUI_DOCK_TOP, AUI_DOCK_LEFT]:
                  panes = DoInsertDockRow(panes, dock.dock_direction, dock.dock_layer, dock.dock_row+1)
                  drop.dock_row = dock.dock_row+1
  
              else:
                  row = drop.dock_row
                  panes = DoInsertDockRow(panes, dock.dock_direction, dock.dock_layer, dock.dock_row)
                  drop.dock_row = row
  
          if not target.IsFloating() and safeRect.Contains(pt) and \
             target.dock_direction != drop.dock_direction:
              return False, target
  
          return self.ProcessDockResult(target, drop)
function_tokens: def DoDropToolbar ( self , docks , panes , target , pt , offset ) : drop = self . CopyTarget ( target ) # The result should always be shown drop . Show ( ) # Check to see if the toolbar has been dragged out of the window if CheckOutOfWindow ( self . _frame , pt ) : if self . _agwFlags & AUI_MGR_ALLOW_FLOATING and drop . IsFloatable ( ) : drop . Float ( ) return self . ProcessDockResult ( target , drop ) # Allow directional change when the cursor leaves this rect safeRect = wx . Rect ( * target . rect ) if target . IsHorizontal ( ) : safeRect . Inflate ( 100 , 50 ) else : safeRect . Inflate ( 50 , 100 ) # Check to see if the toolbar has been dragged to edge of the frame dropDir = CheckEdgeDrop ( self . _frame , docks , pt ) if dropDir != - 1 : if dropDir == wx . LEFT : drop . Dock ( ) . Left ( ) . Layer ( auiToolBarLayer ) . Row ( 0 ) . Position ( pt . y - self . GetDockPixelOffset ( drop ) - offset . y ) elif dropDir == wx . RIGHT : drop . Dock ( ) . Right ( ) . Layer ( auiToolBarLayer ) . Row ( 0 ) . Position ( pt . y - self . GetDockPixelOffset ( drop ) - offset . y ) elif dropDir == wx . TOP : drop . Dock ( ) . Top ( ) . Layer ( auiToolBarLayer ) . Row ( 0 ) . Position ( pt . x - self . GetDockPixelOffset ( drop ) - offset . x ) elif dropDir == wx . BOTTOM : drop . Dock ( ) . Bottom ( ) . Layer ( auiToolBarLayer ) . Row ( 0 ) . Position ( pt . x - self . GetDockPixelOffset ( drop ) - offset . x ) if not target . IsFloating ( ) and safeRect . Contains ( pt ) and target . dock_direction != drop . dock_direction : return False , target return self . ProcessDockResult ( target , drop ) # If the windows is floating and out of the client area, do nothing if drop . IsFloating ( ) and not self . _frame . GetClientRect ( ) . Contains ( pt ) : return False , target # Ok, can't drop on edge - check internals ... clientSize = self . _frame . GetClientSize ( ) x = Clip ( pt . x , 0 , clientSize . x - 1 ) y = Clip ( pt . y , 0 , clientSize . y - 1 ) part = self . HitTest ( x , y ) if not part or not part . dock : return False , target dock = part . dock # toolbars may only be moved in and to fixed-pane docks, # otherwise we will try to float the pane.  Also, the pane # should float if being dragged over center pane windows if not dock . fixed or dock . dock_direction == AUI_DOCK_CENTER : if ( self . _agwFlags & AUI_MGR_ALLOW_FLOATING and drop . IsFloatable ( ) ) or dock . dock_direction not in [ AUI_DOCK_CENTER , AUI_DOCK_NONE ] : if drop . IsFloatable ( ) : drop . Float ( ) return self . ProcessDockResult ( target , drop ) # calculate the offset from where the dock begins # to the point where the user dropped the pane dockDropOffset = 0 if dock . IsHorizontal ( ) : dockDropOffset = pt . x - dock . rect . x - offset . x else : dockDropOffset = pt . y - dock . rect . y - offset . y drop . Dock ( ) . Direction ( dock . dock_direction ) . Layer ( dock . dock_layer ) . Row ( dock . dock_row ) . Position ( dockDropOffset ) if ( pt . y <= dock . rect . GetTop ( ) + 2 and dock . IsHorizontal ( ) ) or ( pt . x <= dock . rect . GetLeft ( ) + 2 and dock . IsVertical ( ) ) : if dock . dock_direction in [ AUI_DOCK_TOP , AUI_DOCK_LEFT ] : row = drop . dock_row panes = DoInsertDockRow ( panes , dock . dock_direction , dock . dock_layer , dock . dock_row ) drop . dock_row = row else : panes = DoInsertDockRow ( panes , dock . dock_direction , dock . dock_layer , dock . dock_row + 1 ) drop . dock_row = dock . dock_row + 1 if ( pt . y >= dock . rect . GetBottom ( ) - 2 and dock . IsHorizontal ( ) ) or ( pt . x >= dock . rect . GetRight ( ) - 2 and dock . IsVertical ( ) ) : if dock . dock_direction in [ AUI_DOCK_TOP , AUI_DOCK_LEFT ] : panes = DoInsertDockRow ( panes , dock . dock_direction , dock . dock_layer , dock . dock_row + 1 ) drop . dock_row = dock . dock_row + 1 else : row = drop . dock_row panes = DoInsertDockRow ( panes , dock . dock_direction , dock . dock_layer , dock . dock_row ) drop . dock_row = row if not target . IsFloating ( ) and safeRect . Contains ( pt ) and target . dock_direction != drop . dock_direction : return False , target return self . ProcessDockResult ( target , drop )