The Spool Library: 4.8 Print Control Instance Data: Adding UI Gadgetry

Up: GEOS SDK TechDocs | Up | Prev: 4.7 The Default Printer | Next: 5 Print Control Messages
ATTR_PRINT_CONTROL_APP_UI

If the Print Control supplies UI that meets your geode's needs, feel free to skip this section. On the other hand, if you've decided you want a non-standard print trigger or want some specialized gadgetry to appear in the application's Print dialog box, it is possible to create objects and tell the Print Control to work with them. Make sure that any objects you want to use in this fashion aren't part of a generic or visual tree already. Also, these objects must be set not usable (~ GS_USABLE).

Normally the user has two ways to print up a Print dialog box: the User Print Trigger or the User Fax Trigger, both appearing in the File menu. You may specify a special trigger to be used in place of the standard trigger provided by the Print Control. Normally the default trigger is not only sufficient but preferable, if only because it will automatically display with the correct appearance for the specific UI. To define your own trigger object, create the object(s), setting the correct instance data. Then, when instantiating your Print Control, include an ATTR_GEN_CONTROL_APP_UI:

ATTR_GEN_CONTROL_APP_UI = {yourTrigger};

When this option is used at all, normally the trigger object is a simple trigger. The action descriptor of this application-defined trigger should be

GTI_output = <your_PrintControl>;
GTI_method = MSG_PRINT_CONTROL_INITIATE_PRINT;

By working with the control's features, you may remove either or both of the default triggers.

The Print Control's vardata field ATTR_PRINT_CONTROL_APP_UI allows application-specific gadgetry to appear in the Print dialog box. Create the object(s) to be included and set their instance data, then use the ATTR_PRINT_CONTROL_APP_UI field to signal that the Print Control should include the gadgetry.

ATTR_PRINT_CONTROL_APP_UI = {yourPrintGroup};

When this option is used at all, usually a GenInteraction serves as the print group object, with children appropriate to the task at hand. This generic tree must not be destroyed unless the vardata field has been removed.


Up: GEOS SDK TechDocs | Up | Prev: 4.7 The Default Printer | Next: 5 Print Control Messages