|
|
Print menu options can be incorporated into managers running in graphical mode (they are not supported in character mode because this function is implemented via the desktop). SaPrint will submit a file for printing without a dialog if the filename is specified. If not, a file selection box is displayed. See SaPrint(TCL_ADM) for more information.
You can add a print button or menu item and a callback which call SaPrint with the name of a temporary file or (in the case of CHARM) call the lp(C) command via CallNonStdCmd(TCL_ADM). To control the print output, use the PRINTCOLS and PRINTROWS environment variables:
set env(PRINTCOLS) $linelen set env(PRINTROWS) $pagelenwhere linelen and pagelen are variables containing the desired values. You could also provide the user with a confirmation message that their document has been printed either in the status bar or as a message dialog.
You can use SaPrintSetup to bring up printer setup screen (also not available in character mode - the menu item should still be created for consistency, but stippled using VtSetSensitive(VTCL).
See the SCO Visual Tcl Reference Guide for more information about the implications of running in character mode.