| Table of Contents 
 
legend - Create and manipulate EPTcl  legends 
  
legend read 
filename  options 
 legend parse string   
 legend set list   
  
 
 legend  creates legend object, which is used to store and manipulate 
descriptive information about maps. There are three ways to create legend: 
 
from file, which shoild be an EPPL7 legend file  from string, which should 
hold content of such file  from Tcl list, simular to one, used for array 
set  command   
legend  command returns handle for legend which is unique 
identifier, used for subsequent references for this legend. It creates 
new Tcl command with name of this identifier, that used to manipulate 
legend.   
Actually, legend object is combination of global array and Tcl 
procedure, and legend handle is simply name of both of them.  
  
 
legend read filename   Opens and reads text file in EPPL7 format. Each 
line of this file contain number and descriptive text, separated by two 
spaces (originally, there should be some information concering printing 
map on line printer (not graphical one) between this spaces, but this 
format is no longer used and supported. Numbers between 0 and 65535 are 
considered map classes and numbers -2 and -1 have special meaning - they 
are considered legend title and subtitle respecitvely. There can be several 
lines with same classes in legend. They are concatenated. Note that EPTcl 
never uses this line separations as line breaks when outputting legend 
(may be this should go to BUGS section) legend parse string   Produces 
legend from string which should be identical to content of EPPL7 legend 
file. legend set list   Produces legend from Tcl list. Such list can be 
obtained by array get  legendname  command. Differ from array set  in that 
finds correct name for legend and defines object command for it. Can be 
used to create empty legend for subsequentual filling by legendname set 
 subcommand.  In this case empty list should be specified.  
  
 
None noticedlegendName classes   Return sorted list of classes defined in legend legendName 
delete   Destructor of object. Unsets all data and destroys object command. 
legendName drawable ?boolean?  if boolean specified, set legend drawmode 
and return nothing. Otherwise returns 0 or 1, depending of current settings. 
Drawmode controls if legend could be displayed in legend box. legendName 
get  class    Returns value of given class or string "Not defined",such 
class is not defined. String could be changed by changing value of element 
udefined_legend  of global array fgis  legendName print  Returns content 
of legend in form of EPPL7 legend format as string. legendName set class 
value   Changes description of given class legendName subtitle  ?string 
?  If no string  specified, returns current legend subtitle. Otherwise 
replaces subtitle by given string legendName title  ?string ?  If no string 
 specified, returns current legend title. Otherwise replaces title by given 
string  
 
 
Table of Contents 
 |