I actually believe that Carbon and Cocoa both use Apple’s “Core Printing”.
[quote]Core Printing is a C API that Mac apps and command line tools can use to perform printing tasks that dont display a user interface. Core Printing defines a set of opaque types and a rich set of operations on instances of these types. The Core Printing opaque types include:
PMPrintSession for general information about a print job
PMPrintSettings for print job parameters
PMPageFormat for the page format of a printed document
PMPaper for information about a type of paper
PMPrinter for information about a printer
In Carbon applications, Core Printing is used together with Carbon Printing to implement printing features. For more information about Carbon Printing, see Carbon Printing Reference.
In Cocoa applications, Core Printing can be used to extend the functionality in the Cocoa printing classes. The NSPrintInfo class provides direct access to some Core Printing objects.
Note: Core Printing is available to 64-bit applications, except for functions, data types, and constants that have been deprecated.
[/quote]
The dialogue boxes etc are provided by Carbon and by Cocoa which is why they look different but the core (forgive the pun) is actually provided to each system.
So, I suppose the question is to shorten the debate.
Why is Xojo using the Carbon API’s to get at “Printing” and NOT using the Cocoa API’s to get at “Printing”?
This is clearly the case as the printer Dialogue Box IS Carbon and NOT Cocoa.
Ah, that dialog is due to the second version is based on a view which can draw itself into the dialog.
But with Xojo printing, you don’t provide a view, but get back a graphics object.
Or in other words: The graphics is not available at the time of the dialog.
PS: You can get the desired behavior via MBS Plugin, I think.
[quote=94265:@Christian Schmitz]Ah, that dialog is due to the second version is based on a view which can draw itself into the dialog.
But with Xojo printing, you don’t provide a view, but get back a graphics object.
Or in other words: The graphics is not available at the time of the dialog.
PS: You can get the desired behavior via MBS Plugin, I think.[/quote]
It seems with Cocoa it’s all done through NSPrintManager whose methods seem to rely on passing in an NSView.