parameters: (self, eventOrPt)
docstring: Sub-handler for the :meth:`OnMotion` event.
  
          :param `event`: a :class:`MouseEvent` to be processed.
docstring_summary: Sub-handler for the :meth:`OnMotion` event.
docstring_tokens: Sub - handler for the : meth : OnMotion event .
function: def OnMotion_DragToolbarPane(self, eventOrPt):
          """
          Sub-handler for the :meth:`OnMotion` event.
  
          :param `event`: a :class:`MouseEvent` to be processed.
          """
  
          isPoint = False
          if isinstance(eventOrPt, wx.Point):
              clientPt = self._frame.ScreenToClient(eventOrPt)
              screenPt = wx.Point(*eventOrPt)
              isPoint = True
          else:
              clientPt = eventOrPt.GetPosition()
              screenPt = self._frame.ClientToScreen(clientPt)
  
          pane = self.GetPane(self._action_window)
          if not pane.IsOk():
              raise Exception("Pane window not found")
  
          pane.state |= AuiPaneInfo.actionPane
          indx = self._panes.index(pane)
  
          ret = False
          wasFloating = pane.IsFloating()
          # is the pane dockable?
          if self.CanDockPanel(pane):
              # do the drop calculation
              ret, pane = self.DoDrop(self._docks, self._panes, pane, clientPt, self._action_offset)
  
          # update floating position
          if pane.IsFloating():
              pane.floating_pos = screenPt - self._toolbar_action_offset
  
          # move the pane window
          if pane.frame:
              if wx.Platform == "__WXMSW__" and (self._agwFlags & AUI_MGR_TRANSPARENT_DRAG) == 0: # and not self.CheckPaneMove(pane):
                  # return
                  # HACK: Terrible hack on wxMSW (!)
                  pane.frame.SetTransparent(254)
  
              self._from_move = True
              pane.frame.Move(pane.floating_pos)
              self._from_move = False
  
              if self._agwFlags & AUI_MGR_TRANSPARENT_DRAG:
                  pane.frame.SetTransparent(150)
  
          self._panes[indx] = pane
          if ret and wasFloating != pane.IsFloating() or (ret and not wasFloating):
              wx.CallAfter(self.Update)
  
          # when release the button out of the window.
          # TODO: a better fix is needed.
  
          if _VERSION_STRING < "2.9":
              leftDown = wx.GetMouseState().LeftDown()
          else:
              leftDown = wx.GetMouseState().LeftIsDown()
  
          if not leftDown:
              self._action = actionNone
              self.OnLeftUp_DragToolbarPane(eventOrPt)
function_tokens: def OnMotion_DragToolbarPane ( self , eventOrPt ) : isPoint = False if isinstance ( eventOrPt , wx . Point ) : clientPt = self . _frame . ScreenToClient ( eventOrPt ) screenPt = wx . Point ( * eventOrPt ) isPoint = True else : clientPt = eventOrPt . GetPosition ( ) screenPt = self . _frame . ClientToScreen ( clientPt ) pane = self . GetPane ( self . _action_window ) if not pane . IsOk ( ) : raise Exception ( "Pane window not found" ) pane . state |= AuiPaneInfo . actionPane indx = self . _panes . index ( pane ) ret = False wasFloating = pane . IsFloating ( ) # is the pane dockable? if self . CanDockPanel ( pane ) : # do the drop calculation ret , pane = self . DoDrop ( self . _docks , self . _panes , pane , clientPt , self . _action_offset ) # update floating position if pane . IsFloating ( ) : pane . floating_pos = screenPt - self . _toolbar_action_offset # move the pane window if pane . frame : if wx . Platform == "__WXMSW__" and ( self . _agwFlags & AUI_MGR_TRANSPARENT_DRAG ) == 0 : # and not self.CheckPaneMove(pane): # return # HACK: Terrible hack on wxMSW (!) pane . frame . SetTransparent ( 254 ) self . _from_move = True pane . frame . Move ( pane . floating_pos ) self . _from_move = False if self . _agwFlags & AUI_MGR_TRANSPARENT_DRAG : pane . frame . SetTransparent ( 150 ) self . _panes [ indx ] = pane if ret and wasFloating != pane . IsFloating ( ) or ( ret and not wasFloating ) : wx . CallAfter ( self . Update ) # when release the button out of the window. # TODO: a better fix is needed. if _VERSION_STRING < "2.9" : leftDown = wx . GetMouseState ( ) . LeftDown ( ) else : leftDown = wx . GetMouseState ( ) . LeftIsDown ( ) if not leftDown : self . _action = actionNone self . OnLeftUp_DragToolbarPane ( eventOrPt )