switchTool(tool) {
    if (this.#prevActive !== null) {
      // Cursor tools cannot be used in PresentationMode/AnnotationEditor.
      return;
    }
    this.#switchTool(tool);
  }
@param {number} tool - The cursor mode that should be switched to,
                       must be one of the values in {CursorTool}.