<!--
{
  "availability" : [
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PaperKit",
  "identifier" : "/documentation/PaperKit/MarkupToolbarViewController/Delegate-swift.protocol",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "PaperKit"
    ],
    "preciseIdentifier" : "s:8PaperKit27MarkupToolbarViewControllerC8DelegateP"
  },
  "title" : "MarkupToolbarViewController.Delegate"
}
-->

# MarkupToolbarViewController.Delegate

The delegate for a PaperKit toolbar.

```
protocol Delegate : AnyObject
```

## Topics

### Inserting content

[`func markupToolbarViewController(MarkupToolbarViewController, insertNewShape: ShapeConfiguration.Shape)`](/documentation/PaperKit/MarkupToolbarViewController/Delegate-swift.protocol/markupToolbarViewController(_:insertNewShape:))

Add a new shape on top of the paper.

[`func markupToolbarViewControllerInsertNewTextbox(MarkupToolbarViewController)`](/documentation/PaperKit/MarkupToolbarViewController/Delegate-swift.protocol/markupToolbarViewControllerInsertNewTextbox(_:))

Add a new textbox on top of the paper.

[`func markupToolbarViewController(MarkupToolbarViewController, insertNewLineWithStartMarker: Bool, endMarker: Bool)`](/documentation/PaperKit/MarkupToolbarViewController/Delegate-swift.protocol/markupToolbarViewController(_:insertNewLineWithStartMarker:endMarker:))

Add a new line on top of the paper.

[`func markupToolbarViewController(MarkupToolbarViewController, insertNewContents: PaperMarkup)`](/documentation/PaperKit/MarkupToolbarViewController/Delegate-swift.protocol/markupToolbarViewController(_:insertNewContents:))

Add new content on top of the paper.

### Responding to changes

[`func markupToolbarViewControllerSelectedIndirectPointerTouchModeChanged(MarkupToolbarViewController)`](/documentation/PaperKit/MarkupToolbarViewController/Delegate-swift.protocol/markupToolbarViewControllerSelectedIndirectPointerTouchModeChanged(_:))

Called when the `selectedIndirectPointerTouchMode` changes.

[`func markupToolbarViewControllerSelectedDrawingToolChanged(MarkupToolbarViewController)`](/documentation/PaperKit/MarkupToolbarViewController/Delegate-swift.protocol/markupToolbarViewControllerSelectedDrawingToolChanged(_:))

Called when the `selectedDrawingTool` changes.

## Relationships

### Conforming Types

[`PaperMarkupViewController`](/documentation/PaperKit/PaperMarkupViewController)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)