/usr/share/tkrat2.2/help.tcl is in tkrat 1:2.2cvs20100105-true-dfsg-6ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | # help.tcl --
#
# This file contains code which handles help windows
#
#
# TkRat software and its included text is Copyright 1996-2004 by
# Martin Forssén
#
# The full text of the legal notice is contained in the file called
# COPYRIGHT, included with this distribution.
# Order of helptext entries
set helporder { intro
roles
folders
folderdef
dbase
deleting
grouping
userproc
bugreport}
# Help --
#
# Creates a new help window and shows the requested help-entry (or an
# introduction if none is specified).
#
# Arguments:
# section - The section to show (may be empty)
proc Help {{subject intro}} {
global idCnt t b help option helporder
# Initialize help texts (if needed)
if {![info exists help(intro)]} {
InitMessages $option(language) help
}
# Create identifier
set id helpWin[incr idCnt]
upvar \#0 $id hd
set w .$id
set hd(w) $w
# Create toplevel
toplevel $w -class TkRat
wm title $w $t(help_window)
# Populate window
label $w.subjects -text $t(subjects)
scrollbar $w.subjscroll \
-relief sunken \
-command "$w.subjlist yview" \
-highlightthickness 0
listbox $w.subjlist \
-yscroll "$w.subjscroll set" \
-relief sunken \
-bd 1 \
-exportselection false \
-highlightthickness 0 \
-selectmode single \
-width 20 \
-height 9
set hd(list) $w.subjlist
set b($hd(list)) help_subjlist
button $w.dismiss -text $t(dismiss) -command "destroy $w"
set b($w.dismiss) dismiss
scrollbar $w.textscroll \
-relief sunken \
-command "$w.texttext yview" \
-highlightthickness 0
text $w.texttext \
-yscroll "$w.textscroll set" \
-setgrid true \
-wrap word \
-relief sunken \
-bd 1 \
-highlightthickness 0
set hd(text) $w.texttext
set b($hd(text)) help_text
grid $w.subjects
grid $w.subjlist $w.subjscroll -sticky nsew -pady 5
grid $w.dismiss - -column 2 -row 1 -padx 10
grid $w.texttext - - $w.textscroll -sticky nsew
grid columnconfigure $w 0 -weight 1
grid rowconfigure $w 1 -weight 1
grid rowconfigure $w 2 -weight 10
# Bindings
bind $w <Key-space> "$hd(text) yview scroll 1 pages"
bind $w <Key-BackSpace> "$hd(text) yview scroll -1 pages"
bind $hd(list) <ButtonRelease-1> "SelectHelp $id"
bind $hd(text) <Destroy> "DismissHelp $id"
bind $w <Escape> "DismissHelp $id"
# Populate list
foreach topic $helporder {
$hd(list) insert end $help(title,$topic)
}
::tkrat::winctl::SetGeometry help $w $hd(text)
ShowHelp $id $subject
}
# SelectHelp --
#
# Figure which subject was selected and show that
#
# Arguments:
# id - The help-window identifier
proc SelectHelp {id} {
global helporder
upvar \#0 $id hd
set topic [lindex $helporder [$hd(list) curselection]]
ShowHelp $id $topic
}
# ShowHelp --
#
# Populates the help window
#
# Arguments:
# id - The help-window identifier
# topic - The topic to show
proc ShowHelp {id topic} {
global help helporder
upvar \#0 $id hd
# The subject list
set i [lsearch -exact $helporder $topic]
if {$i != [$hd(list) curselection]} {
$hd(list) selection clear 0 end
$hd(list) selection set $i
}
# The text window
$hd(text) configure -state normal
$hd(text) delete 0.0 end
$hd(text) insert end $help($topic)
$hd(text) configure -state disabled
}
# DismissHelp --
#
# DImisses the help window
#
# Arguments:
# id - The help-window identifier
proc DismissHelp {id} {
upvar \#0 $id hd
::tkrat::winctl::RecordGeometry help $hd(w) $hd(text)
unset hd
}
|