Tk Text Edit

Check-in [1820a43a2b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Changed so helpdir is used instead of installdir
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:1820a43a2b96636c7c2ca286ab5b162eba1192e5
User & Date: dennis 2001-02-09 16:15:10
Context
2001-03-03
12:30
Preparations for release check-in: 36f2a62a82 user: dennis tags: release_0_9_10, trunk
2001-02-09
16:15
Changed so helpdir is used instead of installdir check-in: 1820a43a2b user: dennis tags: trunk
16:06
Moved all help images to help dir check-in: 8760fde410 user: dennis tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to CHANGES.


1
2
3
4
5
6
7

* Removed (Bad KDE support)
* Add "Insert Special char" dialog
* Add posibility to delete files in filelist window.
* Add new common dialog window.
* Various bug fixes on the file list.

Version 0.9.9 released 00-12-25
>







1
2
3
4
5
6
7
8
* Moved helpfiles to separate directory
* Removed (Bad KDE support)
* Add "Insert Special char" dialog
* Add posibility to delete files in filelist window.
* Add new common dialog window.
* Various bug fixes on the file list.

Version 0.9.9 released 00-12-25

Changes to lib/edit.tcl.

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
...
144
145
146
147
148
149
150

151
152
153
154
155
156
157
158
159

160
161
162
163
164
165
166
destroy $ou
}


#------------------------------------------------------------------------------+

proc setup {} {
global env installdir tk_version tcl_version c home numw tcl_platform argv0

if {$tcl_platform(platform)!="windows"} {

if {![info exist env(DISPLAY)]} {
puts stdout "Are you sure yo're running X ?"
exit
}
................................................................................
#------------------------------------------------------------------------------+


if {$tcl_platform(platform)!="windows"} {
#Unix
set installdir [file dirname $argv0]
set home "$env(HOME)/.tcltextedit"


if {![file exists $home]} {
file mkdir $home
}

} else {
#Windows
set installdir [file dirname $argv0]
set home $installdir

}

set numw 99

set op [pwd]
cd $installdir
source cfg.tcl







|







 







>









>







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
...
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
destroy $ou
}


#------------------------------------------------------------------------------+

proc setup {} {
global env installdir tk_version tcl_version c home numw tcl_platform argv0 helpdir

if {$tcl_platform(platform)!="windows"} {

if {![info exist env(DISPLAY)]} {
puts stdout "Are you sure yo're running X ?"
exit
}
................................................................................
#------------------------------------------------------------------------------+


if {$tcl_platform(platform)!="windows"} {
#Unix
set installdir [file dirname $argv0]
set home "$env(HOME)/.tcltextedit"
set helpdir "$installdir/help"

if {![file exists $home]} {
file mkdir $home
}

} else {
#Windows
set installdir [file dirname $argv0]
set home $installdir
set helpdir "$installdir/help"
}

set numw 99

set op [pwd]
cd $installdir
source cfg.tcl

Changes to lib/help.tcl.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
...
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#?

namespace eval pml {

namespace export  init gettopic hp history filen inserttext

proc init {} {
global hp toprow history installdir filen
set toprow "%bwhite%%ptop1.gif:index%%ptop2.gif:back%%ptop3.gif:forward%%ptop4.gif%\n"
for {set i 0} {$i <100 } {incr i } {
set history($i) ""
}
set hp 0
set filen "$installdir/helpfile"
}

proc getindex {} {
global toprow filen 
set result ""
set f [open $filen "r"]
while {![eof $f]} {
................................................................................
set start "end - [string length $n] char"
$w tag add $n "$start-1 char" "end-1 char"
$w tag configure $n -background gray -foreground black -relief raised -borderwidth 1
$w tag bind $n <Button-1> "pml::press $w $n"
}

proc AddPicture {w str} {
global installdir
set n [lindex [split $str ":" ] 0]
set s [lindex [split $str ":" ] 1]
if {$s==""} { set s $n }

image create photo "$n" -file [file join "$installdir/$n"]
$w image create end -image "$n"
$w tag add $s "end-2 char" "end-1 char"
$w tag configure $s -font "Times 16" -background gray -foreground black -relief raised -borderwidth 1
$w tag bind $s <Button-1> "pml::press $w $s"
}

proc inserttext { w s } {
................................................................................
 incr i
 }
$w configure -state disabled
}

}




#text .t -wrap none
#pack .t -fill both -expand yes
#set installdir "/usr/local/tcltextedit/help/"
#set installdir "C:/windows/Skrivbord/Help/"
pml::init
#pml::inserttext .t [pml::gettopic index]







|





|







 







|




|







 







<
<
<
<
<
<
<

<
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
...
215
216
217
218
219
220
221







222

#?

namespace eval pml {

namespace export  init gettopic hp history filen inserttext

proc init {} {
global hp toprow history helpdir filen
set toprow "%bwhite%%ptop1.gif:index%%ptop2.gif:back%%ptop3.gif:forward%%ptop4.gif%\n"
for {set i 0} {$i <100 } {incr i } {
set history($i) ""
}
set hp 0
set filen "$helpdir/helpfile"
}

proc getindex {} {
global toprow filen 
set result ""
set f [open $filen "r"]
while {![eof $f]} {
................................................................................
set start "end - [string length $n] char"
$w tag add $n "$start-1 char" "end-1 char"
$w tag configure $n -background gray -foreground black -relief raised -borderwidth 1
$w tag bind $n <Button-1> "pml::press $w $n"
}

proc AddPicture {w str} {
global helpdir
set n [lindex [split $str ":" ] 0]
set s [lindex [split $str ":" ] 1]
if {$s==""} { set s $n }

image create photo "$n" -file [file join "$helpdir/$n"]
$w image create end -image "$n"
$w tag add $s "end-2 char" "end-1 char"
$w tag configure $s -font "Times 16" -background gray -foreground black -relief raised -borderwidth 1
$w tag bind $s <Button-1> "pml::press $w $s"
}

proc inserttext { w s } {
................................................................................
 incr i
 }
$w configure -state disabled
}

}








pml::init