parameters: (self, widget, event)
return_statement: return True
docstring: !
          Panning motion function.
  
          @param self: class object.
          @param widget: widget.
          @param event: event.
          @return true if successful
docstring_summary: !
          Panning motion function.
docstring_tokens: ! Panning motion function .
function: def _panning_motion(self, widget, event):
          """!
          Panning motion function.
  
          @param self: class object.
          @param widget: widget.
          @param event: event.
          @return true if successful
          """
          assert self._panning_state is not None
          if event.is_hint:
              pos = widget.get_window().get_device_position(event.device)
              x, y = pos.x, pos.y
          else:
              x, y = event.x, event.y
  
          hadj = self._scrolled_window.get_hadjustment()
          vadj = self._scrolled_window.get_vadjustment()
          mx0, my0 = self._panning_state.initial_mouse_pos
          cx0, cy0 = self._panning_state.initial_canvas_pos
  
          dx = x - mx0
          dy = y - my0
          hadj.set_value(cx0 - dx)
          vadj.set_value(cy0 - dy)
          return True
function_tokens: def _panning_motion ( self , widget , event ) : assert self . _panning_state is not None if event . is_hint : pos = widget . get_window ( ) . get_device_position ( event . device ) x , y = pos . x , pos . y else : x , y = event . x , event . y hadj = self . _scrolled_window . get_hadjustment ( ) vadj = self . _scrolled_window . get_vadjustment ( ) mx0 , my0 = self . _panning_state . initial_mouse_pos cx0 , cy0 = self . _panning_state . initial_canvas_pos dx = x - mx0 dy = y - my0 hadj . set_value ( cx0 - dx ) vadj . set_value ( cy0 - dy ) return True