25 |
|
global curhelp helpfontwidth |
26 |
|
if {! [winfo exists .helpwin]} { # Set up window |
27 |
|
toplevel .helpwin |
28 |
< |
wm minsize .helpwin 450 350 |
28 |
> |
wm minsize .helpwin 500 400 |
29 |
|
wm iconbitmap .helpwin question |
30 |
< |
frame .helpwin.but -geometry 150x350 |
30 |
> |
frame .helpwin.but -geometry 150x400 |
31 |
|
pack .helpwin.but -side right -fill none -expand no |
32 |
|
label .helpwin.but.lab -textvariable curhelp(title) |
33 |
|
place .helpwin.but.lab -relx .1667 -rely 0 |
36 |
|
-text Category -menu .helpwin.but.catb.m |
37 |
|
menu .helpwin.but.catb.m |
38 |
|
place .helpwin.but.catb -relx .1667 -rely .1100 \ |
39 |
< |
-relwidth .5000 -relheight .0500 |
39 |
> |
-relwidth .5000 -relheight .0600 |
40 |
|
helplink .helpwin.but.catb help help category |
41 |
|
menubutton .helpwin.but.topb -relief raised -height 1 \ |
42 |
|
-text Topic -menu .helpwin.but.topb.m |
43 |
|
menu .helpwin.but.topb.m |
44 |
|
place .helpwin.but.topb -relx .1667 -rely .2200 \ |
45 |
< |
-relwidth .5000 -relheight .0500 |
45 |
> |
-relwidth .5000 -relheight .0600 |
46 |
|
helplink .helpwin.but.topb help help topic |
47 |
|
button .helpwin.but.srchb -text Grep -relief raised \ |
48 |
|
-height 1 -command {helpsearch $curhelp(search)} |
49 |
|
place .helpwin.but.srchb -relx .1667 -rely .3500 \ |
50 |
< |
-relwidth .5000 -relheight .0500 |
50 |
> |
-relwidth .5000 -relheight .0600 |
51 |
|
helplink .helpwin.but.srchb help navigate search |
52 |
|
entry .helpwin.but.srche -relief sunken -insertofftime 0 \ |
53 |
|
-textvariable curhelp(search) |
54 |
|
place .helpwin.but.srche -relx .1667 -rely .4200 \ |
55 |
< |
-relwidth .6667 -relheight .0500 |
55 |
> |
-relwidth .6667 -relheight .0600 |
56 |
|
bind .helpwin.but.srche <Return> {set curhelp(msg) {} |
57 |
|
helpupdate} |
58 |
|
helplink .helpwin.but.srche help navigate search |
61 |
|
button .helpwin.but.next -text Next -relief raised -height 1 \ |
62 |
|
-command {eval helphist new $curhelp(next)} |
63 |
|
place .helpwin.but.next -relx .1667 -rely .7500 \ |
64 |
< |
-relwidth .5 -relheight .0500 |
64 |
> |
-relwidth .5 -relheight .0600 |
65 |
|
helplink .helpwin.but.next help navigate next |
66 |
|
button .helpwin.but.back -text Back -relief raised -height 1 \ |
67 |
|
-command "helphist back" |
68 |
|
place .helpwin.but.back -relx .1667 -rely .6500 \ |
69 |
< |
-relwidth .5 -relheight .0500 |
69 |
> |
-relwidth .5 -relheight .0600 |
70 |
|
helplink .helpwin.but.back help navigate back |
71 |
|
button .helpwin.but.forw -text Forward -relief raised -height 1\ |
72 |
|
-command "helphist forward" |
73 |
|
place .helpwin.but.forw -relx .1667 -rely .5500 \ |
74 |
< |
-relwidth .5 -relheight .0500 |
74 |
> |
-relwidth .5 -relheight .0600 |
75 |
|
helplink .helpwin.but.forw help navigate forward |
76 |
|
button .helpwin.but.done -text Done -relief raised -height 1 \ |
77 |
|
-command "destroy .helpwin ; helpopen {}" |
78 |
|
place .helpwin.but.done -relx .1667 -rely .9000 \ |
79 |
< |
-relwidth .5 -relheight .0500 |
79 |
> |
-relwidth .5 -relheight .0600 |
80 |
|
helplink .helpwin.but.done help help done |
81 |
|
text .helpwin.txt -wrap word -width 48 -height 20 -bd 2 \ |
82 |
|
-yscrollcommand ".helpwin.sb set" -relief raised \ |
313 |
|
set nmatches 0 |
314 |
|
set cat [lindex [lindex $curhelp(index) 0] 0] |
315 |
|
set top [lindex [lindex $curhelp(index) 0] 1] |
316 |
+ |
set startpos [tell $curhelp(fid)] |
317 |
|
seek $curhelp(fid) [lindex [lindex $curhelp(index) 0] 2] |
318 |
|
set foundmatch 0 |
319 |
|
while {[gets $curhelp(fid) li] >= 0} { |
336 |
|
} else { |
337 |
|
set curhelp(msg) "Not found." |
338 |
|
} |
339 |
+ |
seek $curhelp(fid) $startpos |
340 |
|
return $nmatches |
341 |
|
} |