]> www.wagner.pp.ru Git - oss/fgis.git/blob - tcl/mapview
a4aa6eb77ac9e2fbb0fe41be1ef552cffa830422
[oss/fgis.git] / tcl / mapview
1 #!/usr/bin/wish
2 ##
3 ## $ID: $
4 ##
5 ## Copyright (C) 1997, Victor Wagner <vitus@ice.ru>
6 ## Copyright (C) 2002, Andrey Kiselev <dron@remotesensing.org>
7 ##
8 ## This program is free software; you can redistribute it and/or modify
9 ## it under the terms of the GNU General Public License as published by
10 ## the Free Software Foundation; either version 2, or (at your option)
11 ## any later version.
12 ##
13 ## This program is distributed in the hope that it will be useful,
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 ## GNU General Public License for more details.
17 ##
18 ## You should have received a copy of the GNU General Public License
19 ## along with this program; if not, write to the Free Software
20 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21 ## USA.
22
23 package require Fgis
24 set planchet .map
25 option add *font -cronyx-times-bold-r-normal--10-*
26 frame .menu -relief raised -bd 2
27 menubutton .menu.file -text "File" -menu [set m .menu.file.m]
28 menu $m
29 $m add command -label "Open..." -command add_layer
30 $m add command -label "Save..." -state disabled -command {save_layer [select_layer]}
31 $m add command -label "Close..." -state disabled -command {close_layer [select_layer]}
32 $m add separator
33 $m add command -label "Print..." -command [list fgisPrintDialog $planchet] 
34 $m add separator
35 $m add command -label "Quit" -command confirmExit
36 menubutton .menu.layer -text "Layer" -menu [set m .menu.layer.m]
37 menu $m
38 $m add command -label "Show..." -command {show_layer [select_layer] } -state disabled
39 $m add command -label "Look..." -command select_layers -state disabled
40 $m add command -label "Properties..." -command {edit_layer [select_layer]} -state disabled
41 pack .menu.file .menu.layer -side left
42 pack .menu -side top -expand y -fill x
43 label .status -anchor w
44 planchet $planchet -width 640 -height 480 -status .status
45 toolbar .tool $planchet 
46 pack .tool -expand y -fill x
47 pack $planchet 
48 pack .status -expand y -fill x
49
50
51 button .tool.layer -text "?" -command add_layer
52 pack .tool.layer -side left -before .tool.scale
53 wm protocol . WM_DELETE_WINDOW confirmExit
54 foreach file $argv  {
55   add_layer $file
56 }