parameters: (self, event)
docstring: Handles the ``wx.EVT_MOTION`` event for the button.
  
          :param `event`: a :class:`MouseEvent` event to be processed.
docstring_summary: Handles the ``wx.EVT_MOTION`` event for the button.
docstring_tokens: Handles the wx . EVT_MOTION event for the button .
function: def OnMotion(self, event):
          """
          Handles the ``wx.EVT_MOTION`` event for the button.
  
          :param `event`: a :class:`MouseEvent` event to be processed.
          """
  
          if not self.IsEnabled():
              return
  
          if event.LeftIsDown() and self.HasCapture():
  
              x,y = event.GetPositionTuple()
              w,h = self.GetClientSizeTuple()
  
              if not self.IsOutside(x, y):
                  self._isup = not self._saveup
                  self.Refresh()
                  return
  
              if self.IsOutside(x,y):
                  self._isup = self._saveup
                  self.Refresh()
                  return
  
          event.Skip()
function_tokens: def OnMotion ( self , event ) : if not self . IsEnabled ( ) : return if event . LeftIsDown ( ) and self . HasCapture ( ) : x , y = event . GetPositionTuple ( ) w , h = self . GetClientSizeTuple ( ) if not self . IsOutside ( x , y ) : self . _isup = not self . _saveup self . Refresh ( ) return if self . IsOutside ( x , y ) : self . _isup = self . _saveup self . Refresh ( ) return event . Skip ( )