Document Interactions

Handle selections, work with annotation actions, convert page and view points, and work with mouse events in a document.

Topics

Handling Selections

currentSelection

The current selection.

- setCurrentSelection:animate:

Sets the current selection, in an animated way, if desired.

- selectAll:

Selects all text in the document.

- clearSelection

Clears the selection.

- copy:

Copies the text in the selection, if any, to the Pasteboard.

- scrollSelectionToVisible:

Scrolls the view until the selection is visible.

highlightedSelections

Returns the array of selections that are highlighted using setHighlightedSelections.

Working with Annotation Actions

- annotationsChangedOnPage:

Tells the PDF view that an annotation on the specified page has changed.

Link Annotations

Validate and handle links in a PDF view.

Converting Page and View Points

- pageForPoint:nearest:

Returns the page containing a point specified in view coordinates.

- convertPoint:toPage:

Converts a point from view space to page space.

- convertRect:toPage:

Converts a rectangle from view space to page space.

- convertPoint:fromPage:

Converts a point from page space to view space.

- convertRect:fromPage:

Converts a rectangle from page space to view space.

Working with Mouse Position and Events

- areaOfInterestForMouse:

Returns the type of area the mouse cursor is over.

- areaOfInterestForPoint:

Returns the type of area for a specific cursor location point.

PDFAreaOfInterest

The mouse position over PDF view areas.

- setCursorForAreaOfInterest:

Sets the type of mouse cursor according to the type of area the mouse cursor is over.

- performAction:

Performs the specified action.

Drag Operations

Define drag operations allowed for a view.