# tkxpilots Version 2.0pl0 - funky interface to xpilots
# Copyright (C) 1993-1994 Richard Oak.
#
#    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.


proc show_help {{w .help}} {
    catch {destroy $w}
    toplevel $w
    wm title $w "Xpilots help"
    wm iconname $w "Help"
    button $w.ok -text OK -command "destroy $w"
    text $w.t -relief raised -bd 2 -yscrollcommand "$w.s set" -setgrid true
    scrollbar $w.s -relief flat -command "$w.t yview"
    pack $w.ok -side bottom -fill x
    pack $w.s -side right -fill y
    pack $w.t -expand yes -fill both
    $w.t insert 0.0 [exec xpilots -help]
    $w.t mark set insert 0.0
    bind $w <Any-Enter> "focus $w.t"
}
