Class

NSPrintPanel

An NSPrintPanel object creates the Print panel used to query the user for information about a print job. This panel may lets the user select the range of pages to print and the number of copies before executing the Print command.

Overview

Print panels can display a simplified interface when printing certain types of data. For example, the panel can display a list of print-setting presets, which lets the user enable print settings in groups as opposed to individually. Assigning an appropriate string to the jobStyleHint property activates the simplified interface and identifies which presets to display.

Symbols

Customizing the Panel

var jobStyleHint: String?

The type of settings that the print panel displays.

var options: NSPrintPanelOptions

The current configuration options for the Print panel.

func defaultButtonTitle()

Returns the title of the Print panel’s default button.

func setDefaultButtonTitle(String?)

Sets the title of the Print panel’s default button.

var helpAnchor: String?

The HTML help anchor associated with the Print panel.

Managing Accessory Views

func addAccessoryController(NSViewController)

Adds a custom controller to the Print panel to manage an accessory view.

func removeAccessoryController(NSViewController)

Removes the specified controller and accessory view from the Print panel.

var accessoryControllers: [NSViewController]

The array of controller objects that manage the Print panel’s accessory views.

Running the Panel

func runModal()

Displays the receiver's Print panel and begins the modal loop.

func runModal(with: NSPrintInfo)

Displays the receiver’s Print panel and runs the modal loop using the specified printing information.

Communicating with the NSPrintInfo Object

var printInfo: NSPrintInfo

The printing information associated with the running Print panel.

Constants

Job Style Hints

Constants to be used as job style hints for activating the simplified Print panel interface and setting the options to display.

NSPrintPanelOptions

These constants are used to configure the contents of the main Print panel.

Relationships

Inherits From

Conforms To