docs: def on_button_press(self, event):
          """Handle button press events.
  
          If the (mouse) button is pressed on top of a Handle (item.Handle), that handle is grabbed and can be
          dragged around.
          """
          if not event.get_button()[1] == 1:  # left mouse button
              return False
          view = self.view
  
          if isinstance(view.hovered_item, StateView):
              distance = view.hovered_item.border_width / 2.
              item, handle = HandleFinder(view.hovered_item, view).get_handle_at_point((event.x, event.y), distance)
          else:
              item, handle = HandleFinder(view.hovered_item, view).get_handle_at_point((event.x, event.y))
  
          if not handle:
              return False
  
          # Only move ports when the MOVE_PORT_MODIFIER key is pressed
          if isinstance(item, (StateView, PortView)) and \
              handle in [port.handle for port in item.get_all_ports()] and \
                  not (event.get_state()[1] & constants.MOVE_PORT_MODIFIER):
              return False
  
          # Do not move from/to handles of connections (only their waypoints)
          if isinstance(item, ConnectionView) and handle in item.end_handles(include_waypoints=True):
              return False
  
          if handle:
              view.hovered_item = item
  
              self.motion_handle = None
  
              self.grab_handle(item, handle)
  
              return True