#!/usr/bin/wish ## ## $Id: mapview,v 1.3 2003-01-08 15:25:35 dron Exp $ ## ## Copyright (C) 1997, Victor Wagner ## Copyright (C) 2002, Andrey Kiselev ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ## USA. package require Fgis set planchet .map option add *font $gui_font frame .menu -relief raised -bd 2 menubutton .menu.file -text "File" -menu [set m .menu.file.m] menu $m $m add command -label "Open..." -command add_layer $m add command -label "Save..." -state disabled -command {save_layer [select_layer]} $m add command -label "Close..." -state disabled -command {close_layer [select_layer]} $m add separator $m add command -label "Print..." -command [list fgisPrintDialog $planchet] $m add separator $m add command -label "Quit" -command confirmExit menubutton .menu.layer -text "Layer" -menu [set m .menu.layer.m] menu $m $m add command -label "Show..." -command {show_layer [select_layer] } -state disabled $m add command -label "Look..." -command select_layers -state disabled $m add command -label "Properties..." -command {edit_layer [select_layer]} -state disabled pack .menu.file .menu.layer -side left pack .menu -side top -expand y -fill x label .status -anchor w planchet $planchet -width 640 -height 480 -status .status toolbar .tool $planchet pack .tool -expand y -fill x pack $planchet pack .status -expand y -fill x button .tool.layer -text "?" -command add_layer pack .tool.layer -side left -before .tool.scale wm protocol . WM_DELETE_WINDOW confirmExit foreach file $argv { add_layer $file }