]> www.wagner.pp.ru Git - oss/fgis.git/blob - tcl/mapview
773297f4f1e23564320182278961d6b52c20f8d4
[oss/fgis.git] / tcl / mapview
1 #!/usr/bin/wish8.0
2 package require Fgis
3 set planchet .map
4 option add *font -cronyx-times-bold-r-normal--10-*
5 frame .menu -relief raised -bd 2
6 menubutton .menu.file -text "File" -menu [set m .menu.file.m]
7 menu $m
8 $m add command -label "Open..." -command add_layer
9 $m add command -label "Save..." -state disabled -command {save_layer [select_layer]}
10 $m add command -label "Close..." -state disabled -command {close_layer [select_layer]}
11 $m add separator
12 $m add command -label "Print..." -command [list fgisPrintDialog $planchet] 
13 $m add separator
14 $m add command -label "Quit" -command confirmExit
15 menubutton .menu.layer -text "Layer" -menu [set m .menu.layer.m]
16 menu $m
17 $m add command -label "Show..." -command {show_layer [select_layer] } -state disabled
18 $m add command -label "Look..." -command select_layers -state disabled
19 $m add command -label "Properties..." -command {edit_layer [select_layer]} -state disabled
20 pack .menu.file .menu.layer -side left
21 pack .menu -side top -expand y -fill x
22 label .status -anchor w
23 planchet $planchet -width 640 -height 480 -status .status
24 toolbar .tool $planchet 
25 pack .tool -expand y -fill x
26 pack $planchet 
27 pack .status -expand y -fill x
28
29
30 button .tool.layer -text "?" -command add_layer
31 pack .tool.layer -side left -before .tool.scale
32 wm protocol . WM_DELETE_WINDOW confirmExit
33 foreach file $argv  {
34   add_layer $file
35 }