Solaris Common Desktop Environment: Programmer's Guide

Nonintegrated Printing

If your application does not integrate printing with the desktop, users must open your application to properly print data files.

Nevertheless, you should provide a print action that runs when users drop your application's data files on a printer drop zone. Otherwise, the desktop may assume that the file contains text data, and the print output will be garbled.

The desktop provides a print action for this purpose named NoPrint. The NoPrint action displays a dialog box telling users that the data files cannot be printed using the printer drop zones.

The NoPrint action displays the Unable to Print dialog box.

To use the Unable to Print dialog box, create a print action specific to your data type that maps to the NoPrint action. For example, suppose the data type for your application is:

DATA_ATTRIBUTES MySpreadSheet_Data1
{
		-- 
}

The following Print action maps to the NoPrint for this data type:

ACTION Print
{
		ARG_TYPE				MySpreadSheet_Data1
 	TYPE					MAP
 	MAP_ACTION			NoPrint
}