Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSPrintOperationMBS.canSpawnSeparateThread as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Whether the receiver is allowed to spawn a separate printing thread.
Notes:
canSpawnSeparateThread: True if the receiver is allowed to spawn a separate thread; otherwise, false.

If canSpawnSeparateThread is true, an NSThread object is detached when the print panel is dismissed (or immediately, if the panel is not to be displayed). The new thread performs the print operation, so that control can return to your application. A thread is detached only if the print operation is run using the runOperationModalForWindow:delegate:didRunSelector:contextInfo: method. If canSpawnSeparateThread is false, the operation runs on the current thread, blocking the application until the operation completes.

If you send setCanSpawnSeparateThread: to an NSPrintOperation object with an argument of true, then the delegate specified in a subsequent invocation of runOperationModalForWindow may be messaged in that spawned, non-main thread.
(Read and Write computed property)

Feedback, Comments & Corrections

NSPrintOperationMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Initialize the object the current print operation for this thread.
Notes: On success the handle property is not zero.

See also:

Feedback, Comments & Corrections

NSPrintOperationMBS.Constructor(other as NSPrintOperationMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Special constructor to create new NSPrintOperationMBS for existing NSPrintOperationMBS object.
Notes: If you have a NSPrintOperationMBS and you want to use printOperationDidRun event, you can initialize a subclass of NSPrintOperationMBS with your existing object to get the event there.

See also:

Feedback, Comments & Corrections

NSPrintOperationMBS.Constructor(view as HTMLViewer, printInfo as NSPrintInfoMBS = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 14.4 Yes No No No No
Function: Creates and returns an NSPrintOperation object ready to control the printing of the specified view using custom print settings.
Example:
// print a HTMLViewer
dim n as new NSPrintOperationMBS(HTMLViewer1)

n.showsPrintPanel = true
n.showsProgressPanel = true
n.runOperationModalForWindow(self)
Notes:
View: The view whose contents you want to print.
PrintInfo: The print settings to use when printing the view.

Returns the new NSPrintOperation object. You must run the operation to print the view.

This method raises an NSPrintOperationExistsException if there is already a print operation in progress; otherwise the returned object is made the current print operation for this thread.

See also:

Feedback, Comments & Corrections

NSPrintOperationMBS.Constructor(view as NSViewMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Creates and returns an NSPrintOperation object ready to control the printing of the specified view.
Notes:
View: The view whose contents you want to print.

Returns the new NSPrintOperation object. You must run the operation to print the view.

The new NSPrintOperation object uses the settings stored in the shared NSPrintInfo object. This method raises an NSPrintOperationExistsException if there is already a print operation in progress; otherwise the returned object is made the current print operation for this thread.

See also:

Feedback, Comments & Corrections

NSPrintOperationMBS.Constructor(view as NSViewMBS, printInfo as NSPrintInfoMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Creates and returns an NSPrintOperation object ready to control the printing of the specified view using custom print settings.
Notes:
View: The view whose contents you want to print.
PrintInfo: The print settings to use when printing the view.

Returns the new NSPrintOperation object. You must run the operation to print the view.

This method raises an NSPrintOperationExistsException if there is already a print operation in progress; otherwise the returned object is made the current print operation for this thread.

See also:

Feedback, Comments & Corrections

NSPrintOperationMBS.context as NSGraphicsMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns the graphics context object used for generating output.

Feedback, Comments & Corrections

NSPrintOperationMBS.currentPage as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns the current page number being printed.

Feedback, Comments & Corrections

NSPrintOperationMBS.data as Memoryblock
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns the data in PDF/EPS after the operation finished.

Feedback, Comments & Corrections

NSPrintOperationMBS.Destructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: The destructor.

Feedback, Comments & Corrections

NSPrintOperationMBS.isCopyingOperation as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns a Boolean value indicating whether the receiver is an EPS or PDF copy operation.
Notes: True if the receiver is an EPS or PDF copy operation; otherwise, false.

Feedback, Comments & Corrections

NSPrintOperationMBS.jobTitle as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: The title of the print job.
Notes:
A string containing the print job title. If set, this value overrides the title returned by the printing view.
Available in OS X v10.5 and later.
(Read and Write computed property)

Feedback, Comments & Corrections

NSPrintOperationMBS.pageOrder as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns the print order for the pages.
Notes:
The print order. For a list of possible values, see Constants.
(Read and Write computed property)

Feedback, Comments & Corrections

NSPrintOperationMBS.pageRange as NSRangeMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns the print order for the pages.
Notes: The print order. For a list of possible values, see Constants.

Feedback, Comments & Corrections

NSPrintOperationMBS.preferredRenderingQuality as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns the printing quality.
Notes:
The preferred printing quality. See constants for the possible values.

If the print sheet is unresponsive or sluggish due to the time is takes to fully render a page, you can check this method in drawRect: and other printing methods such as beginDocument and knowsPageRage: to determine if the print operation prefers speed over fidelity. Most applications render each page fast enough and do not need to call this method. Only use this method after establishing that best quality rendering does indeed make the user interface unresponsive.

Feedback, Comments & Corrections

NSPrintOperationMBS.printInfo as NSPrintInfoMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns the receiver's NSPrintInfo object.
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

NSPrintOperationMBS.printPanel as NSPrintPanelMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns the NSPrintPanel object used when running the operation.
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

NSPrintOperationMBS.runOperation as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Runs the print operation on the current thread.
Notes:
Returns true if the operation was successful; otherwise, false.

The operation runs to completion in the current thread, blocking the application. A separate thread is not spawned, even if canSpawnSeparateThread is true. Use runOperationModalForWindow to use document-modal sheets and to allow a separate thread to perform the operation.

Feedback, Comments & Corrections

NSPrintOperationMBS.runOperationModalForWindow(win as NSWindowMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No No No
Function: Runs the print operation, calling your custom delegate method upon completion.
Notes:
win: The document window to receive a print progress sheet.

Calls the printOperationDidRun event.

See also:

Feedback, Comments & Corrections

NSPrintOperationMBS.runOperationModalForWindow(win as window)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No No No
Function: Runs the print operation, calling your custom delegate method upon completion.
Notes:
win: The document window to receive a print progress sheet.

Calls the printOperationDidRun event.

See also:

Feedback, Comments & Corrections

NSPrintOperationMBS.showsPrintPanel as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Boolean value indicating whether a print panel is displayed during the operation,
Notes:
True if the operation displays a print panel; otherwise, false.
Operations that generate EPS or PDF data do no display a print panel (instance of NSPrintPanel), regardless of the value returned by this method.
(Read and Write computed property)

Feedback, Comments & Corrections

NSPrintOperationMBS.showsProgressPanel as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Whether the receiver displays a progress panel for this operation.
Notes:
True if you want to display a progress panel; otherwise, false.
This method does not affect the display of a print panel; that operation is controlled by the ShowsPrintPanel method.
Operations that generate EPS or PDF data do no display a progress panel, regardless of the value in the flag parameter.
(Read and Write computed property)

Feedback, Comments & Corrections

NSPrintOperationMBS.view as NSViewMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Printing MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns the view object that generates the actual data for the print operation.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacCocoa Plugin.




Links
MBS Xojo Plugins