NAME:
OS_INIT
PURPOSE:
Defines the structure of main operating system variables. All the
operating system dependent varibles used in data catcher are
assembled in this routine.
CATEGORY:
Global System Variables !os.
CALLING SEQUENCE:
OS_INIT
PARAMETER FIELDS:
ARCH: IDL detected operating system architecture
OS: IDL detected operating system
OS_FAMILY: IDL detected operating system family
RELEASE: IDL release number
FONT: Bold font used in highlight label in dialog
DEVICE: Default output device
FILE_SEP: Operating sytem file separator, '/' for unix '\' for W95
CHMOD: Command change file permission mode, 'chmod'
MV: Command rename file, 'mv' for unix, 'rename' for W95
CP: Command copy file, 'cp' for unix, 'copy' for W95
RM: Command remove file, 'rm' for unix, 'del' for W95
LPR: Command print PS file, 'lpr' for unix, 'print' for W95
PRT: Command print text file, 'enscript' for unix, 'print' for W95
PRINTER: Default printer name, ''
WC: Command return line count, 'wc' for unix
COMMON BLOCKS:
COMMON SYSTEM_BLOCK
SIDE EFFECTS:
This routine defines the OS_SYSTEM structure and the global
system variable !os. All the system dependent varialbes used in
data catcher and data viewer are kept in this routine.
RESTRICTIONS:
Current version works for Unix and W95 operating system.
PROCEDURE:
Porting to other operating system, the corresponding
fields in 'os.init' may need to be modified accordingly.
EXAMPLE:
OS_INIT
MODIFICATION HISTORY:
Written by: Ben-chin K. Cha, 6-01-97.
xx-xx-xx iii - comment
(See PS_open.pro)
NAME:
PS_CLOSE
PURPOSE:
This routine closes the PostScript output device and resets the
the original system graphic device as the output plot device.
CALLING SEQUENCE:
PS_CLOSE
INPUTS:
None.
OUTPUTS:
None.
KEYWORD PARAMETERS:
None.
COMMON BLOCKS:
COMMON SYSTEM_BLOCK
COMMON COLORS
RESTRICTIONS:
The program 'PS_open.pro' must be loaded into IDL prior calling
this routine.
EXAMPLE:
PS_OPEN, 'myfile.ps'
tvscl,scan
PS_CLOSE
MODIFICATION HISTORY:
Written by: Ben-chin K. Cha, 03-23-95.
07-28-97 bkc Add the support for reverse PostScript color scheme.
Add handling capability for different operating system
(See PS_open.pro)
NAME:
PS_ENSCRIPT
PURPOSE:
This routine uses the system printing command to print
an ASCII text file. On unix operating system the command
'enscript -r' is used.
CALLING SEQUENCE:
PS_ENSCRIPT, 'filename'
INPUTS:
filename : Specifies the ASCII filename to be printed.
OUTPUTS:
A copy of the specified file is sent to the user selected
printer.
KEYWORD PARAMETERS:
COMMON BLOCKS:
COMMON SYSTEM_BLOCK
RESTRICTIONS:
The program 'PS_open.pro' must be loaded into IDL prior calling
this routine.
EXAMPLE:
PS_ENSCRIPT, 'myfile'
MODIFICATION HISTORY:
Written by: Ben-chin K. Cha, 03-23-95.
07-28-97 bkc Add handling capability for different operating system
(See PS_open.pro)
NAME:
PS_OPEN
PURPOSE:
This routine sets the current graphics device to PostScript.
and saves plot in a user specified PostScript file.
CALLING SEQUENCE:
PS_OPEN, 'myfile.ps' [,/TV]
INPUTS:
myfile.ps: Specifies the PostScript filename to be saved.
OUTPUTS:
The PostScript graphic output is saved which can be sent to
any PostScript printer or viewer.
KEYWORD PARAMETERS:
TV: Specifies whether TV image plot to be used in PS.
XOFFSET: Specifies xoffset in centimeter, default 1.905
YOFFSET: Specifies yoffset in centimeter, default 7.
XSIZE: Specifies yoffset in centimeter, default 15
YSIZE: Specifies yoffset in centimeter, default 15
SCALE_FACTOR: Specifies scale factor, default 1
FONT: Specifies font string
COMMON BLOCKS:
COMMON PRINTER_BLOCK
COMMON COLORS
RESTRICTIONS:
The program 'PS_open.pro' must be loaded into IDL first before
calling this routine.
EXAMPLE:
PS_OPEN, 'myfile.ps'
tvscl,image
PS_CLOSE
MODIFICATION HISTORY:
Written by: Ben-chin K. Cha, 03-23-95.
07-28-97 bkc Add the support for color PostScript
Add the support for reverse video
Add handling capability for different operating system
05-15-98 bkc Change the reverse video to reverse legend color for
2D TV plot, to get reverse video use the xloadct's
option, reverse feature
03-03-03 bkc add keyword xoffset,yoffset,xsize,ysize
05-19-04 bkc add keyword font string
(See PS_open.pro)
NAME:
PS_PRINT
PURPOSE:
This routine uses the system printing command to print
a PostScript or ASCII text file. On the unix operating
system the command 'lpr' is used.
CALLING SEQUENCE:
PS_PRINT, 'myfile.ps'
INPUTS:
myfile: Specifies either the PostScript or ASCII text filename
to be printed.
OUTPUTS:
A copy of the specified file is sent to the user selected
printer.
KEYWORD PARAMETERS:
COMMON BLOCKS:
COMMON SYSTEM_BLOCK
RESTRICTIONS:
The program 'PS_open.pro' must be loaded into IDL prior calling
this routine.
EXAMPLE:
PS_PRINT, 'myfile.ps'
MODIFICATION HISTORY:
Written by: Ben-chin K. Cha, 03-23-95.
07-28-97 bkc Add handling capability for different operating system
05-14-98 bkc Add the checking for unreadable color on the PS plot
On unix if the color is too light use the gv to preview
pops up setup printer and info dialog
(See PS_open.pro)
NAME:
PS_PRINTER
PURPOSE:
This widget dialog allows the user to set up PostScript printer
and printer name to be used by the IDL session. Default setting
is color PS using default printer.
CATEGORY:
Widgets.
CALLING SEQUENCE:
PS_PRINTER [,GROUP=Group]
INPUTS:
None.
KEYWORD PARAMETERS:
GROUP: The widget ID of the group leader of the widget. If this
keyword is specified, the death of the group leader results in
the death of PS_PRINTER.
OUTPUTS:
COMMON BLOCKS:
COMMON PRINTER_BLOCK
SIDE EFFECTS:
Initially the system printer is set to the user's default
printer. If a null printer name is specified, whatever the
system printer was previously set will be used.
RESTRICTIONS:
The program 'PS_open.pro' must be loaded into IDL prior calling
this routine.
PROCEDURE:
EXAMPLE:
PS_PRINTER
MODIFICATION HISTORY:
Written by: Ben-chin K. Cha, 6-01-97.
10-15-97 bkc - Add droplist Y/N for reverse color option
Now it defaults to non reverse color option.
05-14-98 bkc - Remove the B/W option, use the xloadct to select B/W
Change reverse video to reverse legeng color if legend
is in white color
(See PS_open.pro)
NAME:
PS_TVRD
PURPOSE:
This routine dumps the WID contents to PS file it works for
both 8bits or 24 bits devices
CALLING SEQUENCE:
PS_TVRD,wid=wid,file=file
KEYWORDS:
file - Specifies the PS output filename for TVRD, if not specified,
the default 'idl.ps' is assumed.
wid - Specifies the drawing window id to be dumped, if not specified,
the current drawing window assumed.
xoffset - specifies x offset center meter, default 2.54
yoffset - specifies y offset center meter, default 2.54
scale - specifies PS scale factor, default 1.1
OUTPUTS:
A copy of the specified wid is saved on the user specified PS file
and a copy of PS file is sent to the user selected printer.
EXAMPLE:
Dump the current window content to the post script file idl.ps
PS_TVRD
MODIFICATION HISTORY:
Written by: Ben-chin K. Cha, 03-23-04.
(See PS_open.pro)