File: gesc.m

package info (click to toggle)
ncl 6.2.0-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 194,248 kB
  • ctags: 70,659
  • sloc: ansic: 596,448; fortran: 439,513; sed: 11,221; csh: 8,350; yacc: 4,253; xml: 1,928; sh: 1,526; lex: 1,266; python: 1,067; f90: 641; perl: 479; java: 447; objc: 291; makefile: 104
file content (105 lines) | stat: -rw-r--r-- 3,531 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
.\"
.\"	$Id: gesc.m,v 1.16 2008-12-23 00:03:02 haley Exp $
.\"
.TH GESC 3NCARG "March 1993" UNIX "NCAR GRAPHICS"
.SH NAME
gesc \- Provide "Escape" for non-standard GKS features
.SH DESCRIPTION
GESC (Escape) - provides a standard way of implementing nonstandard 
GKS features.  NCAR GKS has only two user-accessible escape functions
defined: one for changing the name of a metafile and another for
pausing in an X window.
.SH SYNOPSIS
CALL GESC (FCTID, LIDR, IDR, MXODR, LODR, ODR)
.SH C-BINDING SYNOPSIS
#include <ncarg/gks.h>
.sp
void gescape(Gint func_id, const Gescape_in_data *in_data, Gstore *store_data,Gescape_out_data **out_data);
.SH DESCRIPTION
.IP FCTID 12
(Integer, Input) - 
A function identifier specifying the requested activity.  The legal
values for FCTID are "-1391" for changing a metafile name and "-1396"
for effecting a pause in an X window.
.IP LIDR 12
(Integer, Input) - 
Dimension of the IDR input data record array (for IDR, see below).
.IP "IDR" 12
(Character * 80 Array, Input) - Input data record.  For calls to GESC
with FCTID equal to -1391 the input data record should contain the
desired metafile name left justified and blank filled; for calls to
GESC with FCTID equal to -1396 the input data record should contain
the workstation identifier encoded as a five character number.
.IP MXODR 12
(Integer, Input) - Maximum length of the ODR output data record array (for
ODR, see below).
.IP LODR 12
(Integer, Output) - Dimension of the ODR output data record array.
.IP "ODR (MXODR)" 12
(Character * 80 Array, Output) -  Output data record.
.SH USAGE
LIDR, MXODR, and LODR must always be at least "1" in value.
.SH EXAMPLES
GESC can be used to dynamically change the name of
an output metafile and to do so one should use the calls
GOPKS and GOPWK instead of OPNGKS.  If you are using OPNGKS,
see the man page for SETUSV for changing the name of the metafile.
.sp
To change the name of the output metafile inside your program,
you should make a call similar to the following:
.nf

       CHARACTER*80 MFNAME

       CALL GOPKS (6,IDUM)
       MFNAME = 'new.cgm.name'
       CALL GESC(-1391,1,MFNAME,1,1,CDUM)

.fi
The call to GESC to change the metafile name must always occur just
before the call to GOPWK that opens a CGM workstation.  Setting the
environment variable NCARG_GKS_OUTPUT overrides any attempt to 
change the name of an output metafile via a GESC call.
.sp
See the "User's Guide for NCAR GKS-0A Graphics" for a more complete
example of changing metafile names from within a code.
.sp
Here is an example of a code that will create an X window, draw a
line, and then pause waiting for a mouse click or a key click.
.nf
   
       CHARACTER*80 IREC,ODUM
       CALL GOPKS(6,0)
       CALL GOPWK(3,0,8)
       CALL GACWK(3)
       CALL LINE(0.,0.,1.,1.)
       CALL SFLUSH
       IREC = '    3'
       CALL GESC(-1396,1,IREC,1,1,ODUM)
       CALL GDAWK(3)
       CALL GCLWK(3)
       CALL GCLKS
       STOP
       END

.fi
.sp
The functions FRAME and NGPICT are in general much easier to use and more
flexible than the direct ESCAPE call for pausing in an X window.  It is
suggested that those functions be used.
.SH ACCESS
To use GKS routines, load the NCAR GKS-0A library 
ncarg_gks.
.SH SEE ALSO
Online: 
SETUSV, FRAME, NGPICT, gescape
.sp
Hardcopy: 
User's Guide for NCAR GKS-0A Graphics;
NCAR Graphics Fundamentals, UNIX Version
.SH COPYRIGHT
Copyright (C) 1987-2009
.br
University Corporation for Atmospheric Research
.br
The use of this Software is governed by a License Agreement.