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
  
          item, handle = HandleFinder(view.hovered_item, view).get_handle_at_point((event.x, event.y))
  
          if not handle:  # Require a handle
              return False
  
          # Connection handle must belong to a port and the MOVE_PORT_MODIFIER must not be pressed
          if not isinstance(item, StateView) or handle not in [port.handle for port in item.get_all_ports()] or (
                      event.get_state()[1] & constants.MOVE_PORT_MODIFIER):
              return False
  
          for port in item.get_all_ports():
              if port.handle is handle:
                  self._start_port_v = port
                  if port in item.get_logic_ports():
                      self._is_transition = True
                  if port is item.income or isinstance(port, InputPortView) or port in item.scoped_variables:
                      self._parent_state_v = port.parent
                  elif port.parent.parent:
                      self._parent_state_v = port.parent.parent
                  else:  # Outgoing port of the root state was clicked on, no connection can be drawn here
                      self._parent_state_v = None
  
          return True