code: private StateUpdater createSelection(Viewer viewer, Cursor cursor, SelectorModel model, StateUpdater reset)
      {
          return (extrp, current) ->
          {
              computeSelection(viewer, cursor, model);
  
              if (model.getSelectionClick() != cursor.getClick())
              {
                  collidable.setEnabled(true);
                  final Rectangle sel = model.getSelectionArea();
                  final Area done = Geom.createArea(sel.getX(), sel.getY(), sel.getWidthReal(), sel.getHeightReal());
                  for (final SelectorListener listener : listeners)
                  {
                      listener.notifySelectionDone(done);
                  }
                  sel.set(-1, -1, 0, 0);
                  model.setSelecting(false);
  
                  return reset;
              }
              return current;
          };
      }
docs: Create selection action.
  
  @param viewer The viewer reference.
  @param cursor The cursor reference.
  @param model The selector model.
  @param reset The reset action.
  @return The selection action.