]> www.wagner.pp.ru Git - oss/fgis.git/blob - man/legend.n
First checked in version
[oss/fgis.git] / man / legend.n
1 .TH legend n 1.0 EPTcl "Environmental Planning Tcl extensions"
2 .SH NAME
3 legend \- Create and manipulate EPTcl  legends
4
5 .SH SYNOPSIS
6 \fBlegend read\fI filename\fR options
7
8 \fBlegend parse\fI string\fR
9
10 \fBlegend set\fI list\fR
11
12 .SH DESCRIPTION
13
14 \fBlegend\fR creates legend object, which is used to store and manipulate
15 descriptive information about maps. There are three ways to create legend:
16 .TP 4
17 from file, which shoild be an EPPL7 legend file
18 .TP 4
19 from string, which should hold content of such file
20 .TP 4
21 from Tcl list, simular to one, used for \fBarray set\fR command
22 .PP
23 \fBlegend\fR command returns handle for legend which is unique identifier,
24 used for subsequent references for this legend. It creates new Tcl command
25 with name of this identifier, that used to manipulate legend. 
26 .PP
27 Actually, legend object is combination of global array and Tcl procedure,
28 and legend handle is simply name of both of them.
29
30 .SH OPTIONS
31 .TP 4
32 \fBlegend read\fI filename\fR
33 Opens and reads text file in EPPL7 format. Each line of this file contain
34 number and descriptive text, separated by two spaces (originally, there should
35 be some information concering printing map on line printer (not graphical one)
36 between this spaces, but this format is no longer used and supported.
37 Numbers between 0 and 65535 are considered map classes and numbers -2 and -1
38 have special meaning - they are considered legend title and subtitle respecitvely. There can be several lines with same classes in legend. They are concatenated.
39 Note that EPTcl never uses this line separations as line breaks when outputting
40 legend (may be this should go to BUGS section)
41 .TP 4
42 \fBlegend parse\fI string\fR
43 Produces legend from string which should be identical to content of EPPL7
44 legend file.
45 .TP 4
46 \fBlegend set\fI list\fR
47 Produces legend from Tcl list. Such list can be obtained by \fBarray get 
48 \fIlegendname\fR command. Differ from \fBarray set\fR in that finds correct
49 name for legend and defines object command for it. Can be used to create
50 empty legend for subsequentual filling by \fIlegendname \fBset\fR subcommand. 
51 In this case empty list should be specified.
52
53 .SH OBJECT COMMAND
54 .TP 4
55 \fIlegendName\fB classes\fR
56 Return sorted list of classes defined in legend
57 .TP 4
58 \fIlegendName\fB delete\fR
59 Destructor of object. Unsets all data and destroys object command.
60 .TP 4
61 \fIlegendName\fB drawable\fI ?boolean?
62 if boolean specified, set legend drawmode and return nothing.
63 Otherwise returns 0 or 1, depending of current settings.
64 Drawmode controls if legend could be displayed in legend box.
65 .TP 4
66 \fIlegendName\fB get \fI class\fR 
67 Returns value of given class or string "Not defined",such class is not defined.
68 String could be changed by changing value of element \fBudefined_legend\fR of
69 global array \fBfgis\fR
70 .TP 4
71 \fIlegendName\fB print\fI
72 Returns content of legend in form of EPPL7 legend format as string.
73 .TP 4
74 \fIlegendName\fB set \fIclass value\fR
75 Changes description of given class
76 .TP 4
77 \fIlegendName\fB subtitle\fR ?\fIstring\fR?
78 If no \fIstring\fR specified, returns current legend subtitle. Otherwise
79 replaces subtitle by given string
80 .TP 4
81 \fIlegendName\fB title\fR ?\fIstring\fR?
82 If no \fIstring\fR specified, returns current legend title. Otherwise
83 replaces title by given string
84 .SH BUGS
85 None noticed