parameters: (self, event)
docstring: Handles the wx.EVT_MOTION for L{PageContainer}.
docstring_summary: Handles the wx.EVT_MOTION for L{PageContainer}.
docstring_tokens: Handles the wx . EVT_MOTION for L { PageContainer } .
function: def OnMouseMove(self, event):
          """ Handles the wx.EVT_MOTION for L{PageContainer}. """
  
          if self._pagesInfoVec and self.IsShown():
          
              xButtonStatus = self._nXButtonStatus
              xTabButtonStatus = self._nTabXButtonStatus
              rightButtonStatus = self._nRightButtonStatus
              leftButtonStatus = self._nLeftButtonStatus
              dropDownButtonStatus = self._nArrowDownButtonStatus
              
              style = self.GetParent().GetWindowStyleFlag()
  
              self._nXButtonStatus = FNB_BTN_NONE
              self._nRightButtonStatus = FNB_BTN_NONE
              self._nLeftButtonStatus = FNB_BTN_NONE
              self._nTabXButtonStatus = FNB_BTN_NONE
              self._nArrowDownButtonStatus = FNB_BTN_NONE
  
              where, tabIdx = self.HitTest(event.GetPosition())
              
              if where == FNB_X:
                  if event.LeftIsDown():
                  
                      self._nXButtonStatus = (self._nLeftClickZone==FNB_X and [FNB_BTN_PRESSED] or [FNB_BTN_NONE])[0]
                  
                  else:
                  
                      self._nXButtonStatus = FNB_BTN_HOVER
  
              elif where == FNB_DROP_DOWN_ARROW:
                  if event.LeftIsDown():
  
                      self._nArrowDownButtonStatus = (self._nLeftClickZone==FNB_DROP_DOWN_ARROW and [FNB_BTN_PRESSED] or [FNB_BTN_NONE])[0]
  
                  else:
  
                      self._nArrowDownButtonStatus = FNB_BTN_HOVER
  
              elif where == FNB_TAB_X:
                  if event.LeftIsDown():
                  
                      self._nTabXButtonStatus = (self._nLeftClickZone==FNB_TAB_X and [FNB_BTN_PRESSED] or [FNB_BTN_NONE])[0]
                  
                  else:
  
                      self._nTabXButtonStatus = FNB_BTN_HOVER
                  
              elif where == FNB_RIGHT_ARROW:
                  if event.LeftIsDown():
                  
                      self._nRightButtonStatus = (self._nLeftClickZone==FNB_RIGHT_ARROW and [FNB_BTN_PRESSED] or [FNB_BTN_NONE])[0]
                  
                  else:
                  
                      self._nRightButtonStatus = FNB_BTN_HOVER
                  
              elif where == FNB_LEFT_ARROW:
                  if event.LeftIsDown():
                  
                      self._nLeftButtonStatus = (self._nLeftClickZone==FNB_LEFT_ARROW and [FNB_BTN_PRESSED] or [FNB_BTN_NONE])[0]
                  
                  else:
                  
                      self._nLeftButtonStatus = FNB_BTN_HOVER
                  
              elif where == FNB_TAB:
                  # Call virtual method for showing tooltip
                  self.ShowTabTooltip(tabIdx)
                  
                  if not self.GetEnabled(tabIdx):                
                      # Set the cursor to be 'No-entry'
                      wx.SetCursor(wx.StockCursor(wx.CURSOR_NO_ENTRY))
                      self._setCursor = True
                  else:
                      if self._setCursor:
                          wx.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
                          self._setCursor = False
                  
                  # Support for drag and drop
                  if event.Dragging() and not (style & FNB_NODRAG):
  
                      self._isdragging = True                
                      draginfo = FNBDragInfo(self, tabIdx)
                      drginfo = cPickle.dumps(draginfo)
                      dataobject = wx.CustomDataObject(wx.CustomDataFormat("FlatNotebook"))
                      dataobject.SetData(drginfo)
                      dragSource = FNBDropSource(self)
                      dragSource.SetData(dataobject)
                      dragSource.DoDragDrop(wx.Drag_DefaultMove)
                      
              bRedrawX = self._nXButtonStatus != xButtonStatus
              bRedrawRight = self._nRightButtonStatus != rightButtonStatus
              bRedrawLeft = self._nLeftButtonStatus != leftButtonStatus
              bRedrawTabX = self._nTabXButtonStatus != xTabButtonStatus
              bRedrawDropArrow = self._nArrowDownButtonStatus != dropDownButtonStatus
  
              render = self._mgr.GetRenderer(style)
          
              if (bRedrawX or bRedrawRight or bRedrawLeft or bRedrawTabX or bRedrawDropArrow):
  
                  dc = wx.ClientDC(self)
                  
                  if bRedrawX:
                                  
                      render.DrawX(self, dc)
                  
                  if bRedrawLeft:
                  
                      render.DrawLeftArrow(self, dc)
                  
                  if bRedrawRight:
                  
                      render.DrawRightArrow(self, dc)
                  
                  if bRedrawTabX:
                  
                      self.Refresh()
  
                  if bRedrawDropArrow:
  
                      render.DrawDropDownArrow(self, dc)
  
          event.Skip()
function_tokens: def OnMouseMove ( self , event ) : if self . _pagesInfoVec and self . IsShown ( ) : xButtonStatus = self . _nXButtonStatus xTabButtonStatus = self . _nTabXButtonStatus rightButtonStatus = self . _nRightButtonStatus leftButtonStatus = self . _nLeftButtonStatus dropDownButtonStatus = self . _nArrowDownButtonStatus style = self . GetParent ( ) . GetWindowStyleFlag ( ) self . _nXButtonStatus = FNB_BTN_NONE self . _nRightButtonStatus = FNB_BTN_NONE self . _nLeftButtonStatus = FNB_BTN_NONE self . _nTabXButtonStatus = FNB_BTN_NONE self . _nArrowDownButtonStatus = FNB_BTN_NONE where , tabIdx = self . HitTest ( event . GetPosition ( ) ) if where == FNB_X : if event . LeftIsDown ( ) : self . _nXButtonStatus = ( self . _nLeftClickZone == FNB_X and [ FNB_BTN_PRESSED ] or [ FNB_BTN_NONE ] ) [ 0 ] else : self . _nXButtonStatus = FNB_BTN_HOVER elif where == FNB_DROP_DOWN_ARROW : if event . LeftIsDown ( ) : self . _nArrowDownButtonStatus = ( self . _nLeftClickZone == FNB_DROP_DOWN_ARROW and [ FNB_BTN_PRESSED ] or [ FNB_BTN_NONE ] ) [ 0 ] else : self . _nArrowDownButtonStatus = FNB_BTN_HOVER elif where == FNB_TAB_X : if event . LeftIsDown ( ) : self . _nTabXButtonStatus = ( self . _nLeftClickZone == FNB_TAB_X and [ FNB_BTN_PRESSED ] or [ FNB_BTN_NONE ] ) [ 0 ] else : self . _nTabXButtonStatus = FNB_BTN_HOVER elif where == FNB_RIGHT_ARROW : if event . LeftIsDown ( ) : self . _nRightButtonStatus = ( self . _nLeftClickZone == FNB_RIGHT_ARROW and [ FNB_BTN_PRESSED ] or [ FNB_BTN_NONE ] ) [ 0 ] else : self . _nRightButtonStatus = FNB_BTN_HOVER elif where == FNB_LEFT_ARROW : if event . LeftIsDown ( ) : self . _nLeftButtonStatus = ( self . _nLeftClickZone == FNB_LEFT_ARROW and [ FNB_BTN_PRESSED ] or [ FNB_BTN_NONE ] ) [ 0 ] else : self . _nLeftButtonStatus = FNB_BTN_HOVER elif where == FNB_TAB : # Call virtual method for showing tooltip self . ShowTabTooltip ( tabIdx ) if not self . GetEnabled ( tabIdx ) : # Set the cursor to be 'No-entry' wx . SetCursor ( wx . StockCursor ( wx . CURSOR_NO_ENTRY ) ) self . _setCursor = True else : if self . _setCursor : wx . SetCursor ( wx . StockCursor ( wx . CURSOR_ARROW ) ) self . _setCursor = False # Support for drag and drop if event . Dragging ( ) and not ( style & FNB_NODRAG ) : self . _isdragging = True draginfo = FNBDragInfo ( self , tabIdx ) drginfo = cPickle . dumps ( draginfo ) dataobject = wx . CustomDataObject ( wx . CustomDataFormat ( "FlatNotebook" ) ) dataobject . SetData ( drginfo ) dragSource = FNBDropSource ( self ) dragSource . SetData ( dataobject ) dragSource . DoDragDrop ( wx . Drag_DefaultMove ) bRedrawX = self . _nXButtonStatus != xButtonStatus bRedrawRight = self . _nRightButtonStatus != rightButtonStatus bRedrawLeft = self . _nLeftButtonStatus != leftButtonStatus bRedrawTabX = self . _nTabXButtonStatus != xTabButtonStatus bRedrawDropArrow = self . _nArrowDownButtonStatus != dropDownButtonStatus render = self . _mgr . GetRenderer ( style ) if ( bRedrawX or bRedrawRight or bRedrawLeft or bRedrawTabX or bRedrawDropArrow ) : dc = wx . ClientDC ( self ) if bRedrawX : render . DrawX ( self , dc ) if bRedrawLeft : render . DrawLeftArrow ( self , dc ) if bRedrawRight : render . DrawRightArrow ( self , dc ) if bRedrawTabX : self . Refresh ( ) if bRedrawDropArrow : render . DrawDropDownArrow ( self , dc ) event . Skip ( )