
#   "view_gpl.tcl" - part of "RAGMAAN, een anagrammengenerator"
#
#            Copyright (C) 1999 Raymond Zandbergen
#
#
#    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 of the License, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#    The maintainer of this program is Raymond Zandbergen (ray@wirehub.nl)
#
#
proc	view_gpl {} {

	global env

	toplevel .gpl
	frame .gpl.viewer
	text .gpl.viewer.t -yscrollcommand {.gpl.viewer.sb set}
	scrollbar .gpl.viewer.sb -command {.gpl.viewer.t yview}
	button .gpl.b -text {jaja} -command {destroy .gpl}
	pack .gpl.viewer.t -side left -expand 1 -fill x
	pack .gpl.viewer.sb -side right -fill y
	pack .gpl.viewer -padx 10 -pady 10
	pack .gpl.b -anchor e -side bottom -padx 10 -pady 10

	set id [open [file join $env(RM_LIB_PATH) gpl_short.txt]]
	.gpl.viewer.t insert end [read $id]
	close $id

	.gpl.viewer.t configure -state disabled
	wm iconbitmap .gpl info
	wm title .gpl {GNU General Public License}
	wm resizable .gpl 0 0
}

proc	view_conditions {} {

	if { [winfo exists .gpl] == 0 } { view_gpl } else { raise .gpl }
	.gpl.viewer.t yview moveto 0
}

proc	view_warranty {} {

	if { [winfo exists .gpl] == 0 } { view_gpl } else { raise .gpl }
	.gpl.viewer.t yview moveto 0.892377
}
