summaryrefslogtreecommitdiff
path: root/support/tcltexed/lib/RCS
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/tcltexed/lib/RCS
Initial commit
Diffstat (limited to 'support/tcltexed/lib/RCS')
-rw-r--r--support/tcltexed/lib/RCS/arg.tcl,v245
-rw-r--r--support/tcltexed/lib/RCS/backslash.tcl,v173
-rw-r--r--support/tcltexed/lib/RCS/bindings.tcl,v609
-rw-r--r--support/tcltexed/lib/RCS/color.tcl,v151
-rw-r--r--support/tcltexed/lib/RCS/complition.tcl,v219
-rw-r--r--support/tcltexed/lib/RCS/events.tcl,v65
-rw-r--r--support/tcltexed/lib/RCS/file.tcl,v450
-rw-r--r--support/tcltexed/lib/RCS/help.tcl,v407
-rw-r--r--support/tcltexed/lib/RCS/helpmanual.tcl,v480
-rw-r--r--support/tcltexed/lib/RCS/linebreak.tcl,v206
-rw-r--r--support/tcltexed/lib/RCS/options.tcl,v164
-rw-r--r--support/tcltexed/lib/RCS/search.tcl,v372
-rw-r--r--support/tcltexed/lib/RCS/spelling.tcl,v229
-rw-r--r--support/tcltexed/lib/RCS/syntax.tcl,v147
-rw-r--r--support/tcltexed/lib/RCS/translate0.tcl,v332
-rw-r--r--support/tcltexed/lib/RCS/translate1.tcl,v361
-rw-r--r--support/tcltexed/lib/RCS/translate2.tcl,v170
-rw-r--r--support/tcltexed/lib/RCS/translate3.tcl,v143
-rw-r--r--support/tcltexed/lib/RCS/umlaut.tcl,v130
-rw-r--r--support/tcltexed/lib/RCS/undo.tcl,v311
20 files changed, 5364 insertions, 0 deletions
diff --git a/support/tcltexed/lib/RCS/arg.tcl,v b/support/tcltexed/lib/RCS/arg.tcl,v
new file mode 100644
index 0000000000..557f034be6
--- /dev/null
+++ b/support/tcltexed/lib/RCS/arg.tcl,v
@@ -0,0 +1,245 @@
+head 1.5;
+access;
+symbols;
+locks
+ mys:1.5; strict;
+comment @# @;
+
+
+1.5
+date 2001.01.23.21.07.16; author mys; state Exp;
+branches;
+next 1.4;
+
+1.4
+date 2000.11.26.18.20.03; author mys; state Exp;
+branches;
+next 1.3;
+
+1.3
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 2000.04.11.19.09.28; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.5
+log
+@+bre
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+###############################################################################
+# set several default values
+set LISTE [list basepath libpath bhtpath hlppath txtpath gifpath etcpath menupath\
+inifile\
+latex_exec makeindex_exec xdvi_exec dvips_exec ghostview_exec\
+language readme_flag COLOR_flag\
+syntax_flag KlammerFlag wsearch_gb\
+SyntaxColorGreen SyntaxColorRed SyntaxColorBlue\
+BlockColor ErgaenzungGray erg2_max\
+wlatex_max wTcltexed_max\
+myown_max max_undo]
+set LFAline 0
+for {set i 0} {$i < $argc} {incr i} {
+ if {[string index [lindex $argv $i] 0] == "-"} then {
+ switch -- [lindex $argv $i] -variable {
+ puts "Possible variables are :\n"
+ foreach ii $LISTE {
+ eval "puts $ii=\$$ii"
+ }
+ puts "\nFor further discription of the meaning of the variables"
+ puts "read the first part of the script tcltexed.tcl."
+ exit
+ } --version {
+ puts "tcltexed - version $Tcltexed_Version"
+ exit
+ } -ind {
+ set language 2
+ } -bre {
+ set language 3
+ } -ger {
+ set language 1
+ } -eng {
+ set language 0
+ } -v {
+ if {[expr $i+2] < $argc} {
+ if {[lsearch $LISTE [lindex $argv [expr $i + 1]]] != -1} {
+ set [lindex $argv [expr $i + 1]] [lindex $argv [expr $i + 2]]
+ }
+ incr i 2
+ } else {
+ puts "more arguments are needed by -v"
+ exit
+ }
+ } -new {
+ after 1500 NewFile
+ } default {
+ puts "Usage : tcltexed.tcl -- \[options\] \[+line] file1 \[+line] file2 ...\n"
+ puts "A LaTeX-Editor based on Tcl/Tk"
+ puts "Possible optiones are :"
+ puts " -- ..end of the arguments for wish"
+ puts " -? ..this help"
+ puts " --version ..version of tcltexed"
+ puts " -new ..open new file"
+ puts " -v \"variable\" \"value\" ..set \"variable\" to a \"value\""
+ puts " -variable ..list all possible variables"
+ puts " and it's default values"
+ puts " -eng ..set language to english (0)"
+ puts " -ger ..set language to german (1)"
+ puts " -ind ..set language to indonesia (2)"
+ puts " -bre ..set language to portuguese (3)"
+ exit
+ }
+ } else {
+ if [string match "+*" [lindex $argv $i]] {
+ set LFAline [lindex $argv $i]
+ } else {
+ after 1000 LFA [lindex $argv $i] $LFAline
+ set LFAline 0
+ }
+ }
+}
+proc LFA {filename line} {
+ if {[info proc LoadFileArg] != ""} {
+ LoadFileArg $filename $line
+ } else {
+ after 500 LFA $filename $line
+ }
+}
+@
+
+
+1.4
+log
+@*** empty log message ***
+@
+text
+@d27 4
+d60 2
+@
+
+
+1.3
+log
+@*** empty log message ***
+@
+text
+@d13 1
+d44 1
+a44 1
+ puts "Usage : tcltexed.tcl -- \[options\] file1 file2 ...\n"
+d59 6
+a64 1
+ after 1000 LFA [lindex $argv $i]
+d67 1
+a67 1
+proc LFA filename {
+d69 1
+a69 1
+ LoadFileArg $filename
+d71 1
+a71 1
+ after 500 LFA $filename
+d73 1
+a73 1
+}@
+
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@d1 66
+a66 66
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+###############################################################################
+# set several default values
+set LISTE [list basepath libpath bhtpath hlppath txtpath gifpath etcpath menupath\
+inifile\
+latex_exec makeindex_exec xdvi_exec dvips_exec ghostview_exec\
+language readme_flag COLOR_flag\
+syntax_flag KlammerFlag wsearch_gb\
+SyntaxColorGreen SyntaxColorRed SyntaxColorBlue\
+BlockColor ErgaenzungGray erg2_max\
+wlatex_max wTcltexed_max\
+myown_max max_undo]
+for {set i 0} {$i < $argc} {incr i} {
+ if {[string index [lindex $argv $i] 0] == "-"} then {
+ switch -- [lindex $argv $i] -variable {
+ puts "Possible variables are :\n"
+ foreach ii $LISTE {
+ eval "puts $ii=\$$ii"
+ }
+ puts "\nFor further discription of the meaning of the variables"
+ puts "read the first part of the script tcltexed.tcl."
+ exit
+ } --version {
+ puts "tcltexed - version $Tcltexed_Version"
+ exit
+ } -ger {
+ set language 1
+ } -eng {
+ set language 0
+ } -v {
+ if {[expr $i+2] < $argc} {
+ if {[lsearch $LISTE [lindex $argv [expr $i + 1]]] != -1} {
+ set [lindex $argv [expr $i + 1]] [lindex $argv [expr $i + 2]]
+ }
+ incr i 2
+ } else {
+ puts "more arguments are needed by -v"
+ exit
+ }
+ } -new {
+ after 1500 NewFile
+ } default {
+ puts "Usage : tcltexed.tcl -- \[options\] file1 file2 ...\n"
+ puts "A LaTeX-Editor based on Tcl/Tk"
+ puts "Possible optiones are :"
+ puts " -- ..end of the arguments for wish"
+ puts " -? ..this help"
+ puts " --version ..version of tcltexed"
+ puts " -new ..open new file"
+ puts " -v \"variable\" \"value\" ..set \"variable\" to a \"value\""
+ puts " -variable ..list all possible variables"
+ puts " and it's default values"
+ puts " -eng ..set language to english (0)"
+ puts " -ger ..set language to german (1)"
+ exit
+ }
+ } else {
+ after 1000 LFA [lindex $argv $i]
+ }
+}
+proc LFA filename {
+ if {[info proc LoadFileArg] != ""} {
+ LoadFileArg $filename
+ } else {
+ after 500 LFA $filename
+ }
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d40 2
+d49 1
+@
+
diff --git a/support/tcltexed/lib/RCS/backslash.tcl,v b/support/tcltexed/lib/RCS/backslash.tcl,v
new file mode 100644
index 0000000000..4e27500dfe
--- /dev/null
+++ b/support/tcltexed/lib/RCS/backslash.tcl,v
@@ -0,0 +1,173 @@
+head 1.2;
+access;
+symbols;
+locks
+ mys:1.2; strict;
+comment @# @;
+
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+####################################################################
+# Setzt backslash's fuer eine Stringuebergabe ein
+proc backslash {s} {
+ set begin_s ""
+ set end_s $s
+ set pos 0
+ while {$pos != 10000} {
+ set key ""
+ set pos "10000"
+ set kpos [string first "\"" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\""
+ }}
+ set kpos [string first "\\" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\\"
+ }}
+ set kpos [string first "\n" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\n"
+ }}
+ set kpos [string first "\t" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\t"
+ }}
+ set kpos [string first "\[" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\["
+ }}
+
+ set kpos [string first "\]" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\]"
+ }}
+ set kpos [string first "\{" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\{"
+ }}
+
+ set kpos [string first "\}" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\}"
+ }}
+
+ if {$pos != 10000} then {
+ set begin_s $begin_s[string range $end_s 0 [expr $pos - 1]]$key
+ set end_s "[string range $end_s [expr $pos + 1] end]"
+ } else {return "$begin_s$end_s"}
+}}
+
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 67
+a67 67
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+####################################################################
+# Setzt backslash's fuer eine Stringuebergabe ein
+proc backslash {s} {
+ set begin_s ""
+ set end_s $s
+ set pos 0
+ while {$pos != 10000} {
+ set key ""
+ set pos "10000"
+ set kpos [string first "\"" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\""
+ }}
+ set kpos [string first "\\" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\\"
+ }}
+ set kpos [string first "\n" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\n"
+ }}
+ set kpos [string first "\t" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\t"
+ }}
+ set kpos [string first "\[" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\["
+ }}
+
+ set kpos [string first "\]" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\]"
+ }}
+ set kpos [string first "\{" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\{"
+ }}
+
+ set kpos [string first "\}" $end_s]
+ if {$pos > $kpos} then {
+ if {$kpos != -1} then {
+ set pos $kpos
+ set key "\\\}"
+ }}
+
+ if {$pos != 10000} then {
+ set begin_s $begin_s[string range $end_s 0 [expr $pos - 1]]$key
+ set end_s "[string range $end_s [expr $pos + 1] end]"
+ } else {return "$begin_s$end_s"}
+}}
+
+@
+
diff --git a/support/tcltexed/lib/RCS/bindings.tcl,v b/support/tcltexed/lib/RCS/bindings.tcl,v
new file mode 100644
index 0000000000..3562c4af35
--- /dev/null
+++ b/support/tcltexed/lib/RCS/bindings.tcl,v
@@ -0,0 +1,609 @@
+head 1.3;
+access;
+symbols;
+locks
+ mys:1.3; strict;
+comment @# @;
+
+
+1.3
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 99.11.22.14.31.17; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.3
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+ ##############################################################################
+ # Umdefinition des Defaultverhaltens fuer Text-variablen
+ bind Text <Control-k> {}
+ bind Text <Control-b> {}
+ # Block Anfang
+ bind Text <Control-k><b> {
+ set BlockBeginFlag 1
+ %W mark set BlockBegin insert
+ if {[string compare %W $BlockEditor] == 0} then {
+ if $BlockEndFlag then {
+ %W tag remove BlockTag 1.0 end
+ %W tag add BlockTag BlockBegin BlockEnd
+ }} else {
+ if {$BlockBeginFlag && $BlockEndFlag} then {
+ $BlockEditor tag remove BlockTag 1.0 end
+ }
+ set BlockEndFlag 0
+ set BlockEditor %W
+ }
+ }
+ # Block Ende
+ bind Text <Control-k><k> {
+ set BlockEndFlag 1
+ %W mark set BlockEnd insert
+ %W mark gravity BlockEnd left
+ if {[string compare %W $BlockEditor] == 0} then {
+ if $BlockBeginFlag then {
+ %W tag remove BlockTag 1.0 end
+ %W tag add BlockTag BlockBegin BlockEnd
+ }} else {
+ if {$BlockBeginFlag && $BlockEndFlag} then {
+ $Blockeditor tag remove BlockTag 1.0 end
+ }
+ set BlockBeginFlag 0
+ set BlockEditor %W
+ }
+ }
+ # Block kopieren
+ bind Text <Control-k><c> {
+ if {$BlockBeginFlag && $BlockEndFlag} then {
+ set ksp [%W index {insert linestart}]
+ undo_switch %W {Save UndoBegin}
+ %W insert insert [$BlockEditor get BlockBegin BlockEnd]
+ undo_switch %W {UndoEnd Save UndoMax}
+ Syntax %W $ksp "insert lineend"
+ }
+ }
+ # Block verschieben
+ bind Text <Control-k><v> {
+ if {$BlockBeginFlag && $BlockEndFlag} then {
+ set ksp [%W index "insert linestart"]
+ undo_switch %W {Save UndoBegin}
+ %W insert insert [$BlockEditor get BlockBegin BlockEnd]
+ undo_switch %W {UndoEnd Save}
+ undo_switch $BlockEditor {{BlockBegin BlockEnd} Delete UndoMax}
+ if {[string compare %W $BlockEditor] == 0} then {
+ undo_switch %W UndoMul
+ }
+ Syntax %W $ksp "insert lineend"
+ Syntax $BlockEditor "BlockBegin linestart" "BlockEnd lineend"
+ }
+ }
+ bind Text <Control-k><m> {
+ event generate %W <Control-k>
+ event generate %W <v>
+ }
+ # Block loeschen
+ bind Text <Control-k><y> {
+ if {$BlockBeginFlag && $BlockEndFlag} then {
+ undo_switch $BlockEditor {Save {BlockBegin BlockEnd} Delete UndoMax}
+ }
+ }
+ # Block auskommentieren
+proc AusKomm {E A B} {
+ set i [lindex "[split [$E index $A] .]" 0]
+ set i_max [lindex "[split [$E index $B] .]" 0]
+ incr i_max
+ set ksp $i.0
+ while {$i < $i_max} {
+ if [expr [string compare [$E get "$i.0 linestart" "$i.0 linestart+1c"] "%"] != 0] {
+ $E insert "$i.0 linestart" "%"
+ }
+ incr i
+ }
+ Syntax $E $ksp $i_max.0
+ event generate $E <<Modified>>
+}
+ # Block auskommentieren rueckgaengig
+proc AusKommRueck {E A B} {
+ set i [lindex "[split [$E index $A] .]" 0]
+ set i_max [lindex "[split [$E index $B] .]" 0]
+ incr i_max
+ set ksp $i.0
+ while {$i < $i_max} {
+ if [expr [string compare [$E get "$i.0 linestart" "$i.0 linestart+1c"] "%"] == 0] {
+ $E delete "$i.0 linestart" "$i.0 linestart+1c"
+ }
+ incr i
+ }
+ Syntax $E $ksp $i_max.0
+ event generate $E <<Modified>>
+}
+
+switch $tcl_platform(platform) windows {
+# Auf jedenfall fuer Windows !!!
+ bind Text <Control-k><%> {
+ if { $BlockBeginFlag && $BlockEndFlag} then {
+ AusKomm %W BlockBegin BlockEnd
+ }
+ }
+} unix {
+# fuer linux ???
+ bind Text <Control-k><Shift-5> {
+ if { $BlockBeginFlag && $BlockEndFlag} then {
+ AusKomm %W BlockBegin BlockEnd
+ }
+ }
+}
+ bind Text <Control-k><space> {
+ if { $BlockBeginFlag && $BlockEndFlag} then {
+ AusKommRueck %W BlockBegin BlockEnd
+ }
+ }
+ # Block in Clipboard kopieren
+ bind Text <Control-k><g> {
+ if { $BlockBeginFlag && $BlockEndFlag} then {
+ clipboard clear -displayof %W
+ catch {clipboard append -displayof %W [$BlockEditor get BlockBegin BlockEnd]}
+ }
+ }
+ # aus Clipboard kopieren
+ bind Text <Control-k><p> {
+ set ksp [%W index {insert linestart}]
+ undo_switch %W {Save UndoBegin}
+ tk_textPaste %W
+ undo_switch %W {UndoEnd Save UndoMax}
+ Syntax %W $ksp "insert lineend"
+ }
+ bind Text <Control-k><h> {break}
+
+ bind Text <Insert> {
+ undo_switch %W {Save UndoBegin}
+ catch {tkTextInsert %W [selection get -displayof %W]}
+ undo_switch %W {UndoEnd Save}
+ }
+
+ # Block eliminieren
+ bind Text <Destroy> {
+ set BlockBeginFlag 0
+ set BlockEndFlag 0
+ if {[lsearch [array names ModifiedArray] %W] != -1} {
+ unset ModifiedArray(%W)
+ }
+ if {[lsearch [array names UndoArray] %W] != -1} {
+ unset UndoArray(%W)
+ }
+ if {[lsearch [array names FilenameArray] %W] != -1} {
+ unset FilenameArray(%W)
+ }
+ }
+
+ # Zeile aus Text loeschen
+ bind Text <Control-y> {
+ undo_switch %W {{"insert linestart" "insert lineend+1c"} Delete}
+ }
+ bind Text <Control-d> {
+ if $FocusEditorFlag {
+ focus $FocusEditor.te.edit1
+ set ksp [$FocusEditor.te.edit1 get {insert wordstart-1c} {insert wordstart}]
+ if ![string compare "\\" $ksp] then {
+ set Text [$FocusEditor.te.edit1 get {insert wordstart} {insert wordend}]
+ if {[llength [array names I_befehl $Text]] != 1} {set Text "\\section"} else {set Text "\\$Text"}
+ } {set Text "\\section"}
+ set ksp [$FocusEditor.te.edit1 search -- $Text {insert wordend} end]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert "$ksp + 1 chars"
+ $FocusEditor.te.edit1 see insert
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}
+ bind Text <Control-u> {
+ if $FocusEditorFlag {
+ focus $FocusEditor.te.edit1
+ set ksp [$FocusEditor.te.edit1 get {insert wordstart-1c} {insert wordstart}]
+ if ![string compare "\\" $ksp] then {
+ set Text [$FocusEditor.te.edit1 get {insert wordstart} {insert wordend}]
+ if {[llength [array names I_befehl $Text]] != 1} {set Text "\\section"} else {set Text "\\$Text"}
+ } {set Text "\\section"}
+ set ksp [$FocusEditor.te.edit1 search -backwards -- $Text {insert wordstart-1c} 1.0]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert "$ksp + 1 chars"
+ $FocusEditor.te.edit1 see insert
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}
+ bind Text <Control-b> {
+ if $FocusEditorFlag {
+ Line_breaking_switch $FocusEditor.te.edit1 section
+ }
+ }
+ bind Text <Control-B> {
+ if $FocusEditorFlag {
+ Line_breaking_switch $FocusEditor.te.edit1 unsection
+ }
+ }
+ bind Text <Alt-b> {
+ if $FocusEditorFlag {
+ Line_breaking_switch $FocusEditor.te.edit1 line
+ }
+ }
+ bind Text <Alt-B> {
+ if $FocusEditorFlag {
+ Line_breaking_switch $FocusEditor.te.edit1 unline
+ }
+ }
+
+ # Was passiert wenn man ein Fenster vernichtet
+ bind Toplevel <Destroy> {
+ # Fenster war Master dann Master loeschen
+ if $MasterFlag then {if {[string compare $Master %W] == 0} then {set MasterFlag 0}}
+ if $FocusEditorFlag then {if {[string compare $FocusEditor %W] == 0} then {set FocusEditorFlag 0}}
+ }
+
+
+bind Text <KeyPress> {
+ if $erg_flag(%W) then {
+ if {[%W get insert insert+1c] == "%A"} then {
+ %W mark set insert insert+1c
+ continue
+ } else {
+ erg_proc %W
+ }
+ }
+ if {"%A" != "{}"} then {
+ undo_switch %W {SelSave UndoBegin}
+ tkTextInsert %W %A
+ undo_switch %W {UndoEnd SelMul}
+
+ if $BeginFlag(%W) then {
+ %W insert BeginMark %A
+ undo_switch %W BeginMark
+ }
+ event generate %W <<ERG>>
+ event generate %W <<Modified>>
+ if $KlammerFlag then {
+ switch -- "%A" "(" {
+ tkTextInsert %W ")"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-1c
+ } "\{" {
+ if {[string compare [%W get insert-2c] "\\"] == 0} {
+ tkTextInsert %W "\\\}"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-2c
+ } {
+ tkTextInsert %W "\}"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-1c
+ }
+ } "\[" {
+ if {[string compare [%W get insert-2c] "\\"] == 0} {
+ tkTextInsert %W "\\\]"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-2c
+ } {
+ tkTextInsert %W "\]"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-1c
+ }
+ } "$" {
+ tkTextInsert %W "$"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-1c
+}}}}
+@
+
+
+1.2
+log
+@+ \{ wird automatisch mit \{ ergaenzt, analog \[ mit \]
+bisher wurde nur die Klammer selbst ergaenzt
+@
+text
+@d1 273
+a273 273
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+ ##############################################################################
+ # Umdefinition des Defaultverhaltens fuer Text-variablen
+ bind Text <Control-k> {}
+ bind Text <Control-b> {}
+ # Block Anfang
+ bind Text <Control-k><b> {
+ set BlockBeginFlag 1
+ %W mark set BlockBegin insert
+ if {[string compare %W $BlockEditor] == 0} then {
+ if $BlockEndFlag then {
+ %W tag remove BlockTag 1.0 end
+ %W tag add BlockTag BlockBegin BlockEnd
+ }} else {
+ if {$BlockBeginFlag && $BlockEndFlag} then {
+ $BlockEditor tag remove BlockTag 1.0 end
+ }
+ set BlockEndFlag 0
+ set BlockEditor %W
+ }
+ }
+ # Block Ende
+ bind Text <Control-k><k> {
+ set BlockEndFlag 1
+ %W mark set BlockEnd insert
+ %W mark gravity BlockEnd left
+ if {[string compare %W $BlockEditor] == 0} then {
+ if $BlockBeginFlag then {
+ %W tag remove BlockTag 1.0 end
+ %W tag add BlockTag BlockBegin BlockEnd
+ }} else {
+ if {$BlockBeginFlag && $BlockEndFlag} then {
+ $Blockeditor tag remove BlockTag 1.0 end
+ }
+ set BlockBeginFlag 0
+ set BlockEditor %W
+ }
+ }
+ # Block kopieren
+ bind Text <Control-k><c> {
+ if {$BlockBeginFlag && $BlockEndFlag} then {
+ set ksp [%W index {insert linestart}]
+ undo_switch %W {Save UndoBegin}
+ %W insert insert [$BlockEditor get BlockBegin BlockEnd]
+ undo_switch %W {UndoEnd Save UndoMax}
+ Syntax %W $ksp "insert lineend"
+ }
+ }
+ # Block verschieben
+ bind Text <Control-k><v> {
+ if {$BlockBeginFlag && $BlockEndFlag} then {
+ set ksp [%W index "insert linestart"]
+ undo_switch %W {Save UndoBegin}
+ %W insert insert [$BlockEditor get BlockBegin BlockEnd]
+ undo_switch %W {UndoEnd Save}
+ undo_switch $BlockEditor {{BlockBegin BlockEnd} Delete UndoMax}
+ if {[string compare %W $BlockEditor] == 0} then {
+ undo_switch %W UndoMul
+ }
+ Syntax %W $ksp "insert lineend"
+ Syntax $BlockEditor "BlockBegin linestart" "BlockEnd lineend"
+ }
+ }
+ bind Text <Control-k><m> {
+ event generate %W <Control-k>
+ event generate %W <v>
+ }
+ # Block loeschen
+ bind Text <Control-k><y> {
+ if {$BlockBeginFlag && $BlockEndFlag} then {
+ undo_switch $BlockEditor {Save {BlockBegin BlockEnd} Delete UndoMax}
+ }
+ }
+ # Block auskommentieren
+proc AusKomm {E A B} {
+ set i [lindex "[split [$E index $A] .]" 0]
+ set i_max [lindex "[split [$E index $B] .]" 0]
+ incr i_max
+ set ksp $i.0
+ while {$i < $i_max} {
+ if [expr [string compare [$E get "$i.0 linestart" "$i.0 linestart+1c"] "%"] != 0] {
+ $E insert "$i.0 linestart" "%"
+ }
+ incr i
+ }
+ Syntax $E $ksp $i_max.0
+ event generate $E <<Modified>>
+}
+ # Block auskommentieren rueckgaengig
+proc AusKommRueck {E A B} {
+ set i [lindex "[split [$E index $A] .]" 0]
+ set i_max [lindex "[split [$E index $B] .]" 0]
+ incr i_max
+ set ksp $i.0
+ while {$i < $i_max} {
+ if [expr [string compare [$E get "$i.0 linestart" "$i.0 linestart+1c"] "%"] == 0] {
+ $E delete "$i.0 linestart" "$i.0 linestart+1c"
+ }
+ incr i
+ }
+ Syntax $E $ksp $i_max.0
+ event generate $E <<Modified>>
+}
+
+switch $tcl_platform(platform) windows {
+# Auf jedenfall fuer Windows !!!
+ bind Text <Control-k><%> {
+ if { $BlockBeginFlag && $BlockEndFlag} then {
+ AusKomm %W BlockBegin BlockEnd
+ }
+ }
+} unix {
+# fuer linux ???
+ bind Text <Control-k><Shift-5> {
+ if { $BlockBeginFlag && $BlockEndFlag} then {
+ AusKomm %W BlockBegin BlockEnd
+ }
+ }
+}
+ bind Text <Control-k><space> {
+ if { $BlockBeginFlag && $BlockEndFlag} then {
+ AusKommRueck %W BlockBegin BlockEnd
+ }
+ }
+ # Block in Clipboard kopieren
+ bind Text <Control-k><g> {
+ if { $BlockBeginFlag && $BlockEndFlag} then {
+ clipboard clear -displayof %W
+ catch {clipboard append -displayof %W [$BlockEditor get BlockBegin BlockEnd]}
+ }
+ }
+ # aus Clipboard kopieren
+ bind Text <Control-k><p> {
+ set ksp [%W index {insert linestart}]
+ undo_switch %W {Save UndoBegin}
+ tk_textPaste %W
+ undo_switch %W {UndoEnd Save UndoMax}
+ Syntax %W $ksp "insert lineend"
+ }
+ bind Text <Control-k><h> {break}
+
+ bind Text <Insert> {
+ undo_switch %W {Save UndoBegin}
+ catch {tkTextInsert %W [selection get -displayof %W]}
+ undo_switch %W {UndoEnd Save}
+ }
+
+ # Block eliminieren
+ bind Text <Destroy> {
+ set BlockBeginFlag 0
+ set BlockEndFlag 0
+ if {[lsearch [array names ModifiedArray] %W] != -1} {
+ unset ModifiedArray(%W)
+ }
+ if {[lsearch [array names UndoArray] %W] != -1} {
+ unset UndoArray(%W)
+ }
+ if {[lsearch [array names FilenameArray] %W] != -1} {
+ unset FilenameArray(%W)
+ }
+ }
+
+ # Zeile aus Text loeschen
+ bind Text <Control-y> {
+ undo_switch %W {{"insert linestart" "insert lineend+1c"} Delete}
+ }
+ bind Text <Control-d> {
+ if $FocusEditorFlag {
+ focus $FocusEditor.te.edit1
+ set ksp [$FocusEditor.te.edit1 get {insert wordstart-1c} {insert wordstart}]
+ if ![string compare "\\" $ksp] then {
+ set Text [$FocusEditor.te.edit1 get {insert wordstart} {insert wordend}]
+ if {[llength [array names I_befehl $Text]] != 1} {set Text "\\section"} else {set Text "\\$Text"}
+ } {set Text "\\section"}
+ set ksp [$FocusEditor.te.edit1 search -- $Text {insert wordend} end]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert "$ksp + 1 chars"
+ $FocusEditor.te.edit1 see insert
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}
+ bind Text <Control-u> {
+ if $FocusEditorFlag {
+ focus $FocusEditor.te.edit1
+ set ksp [$FocusEditor.te.edit1 get {insert wordstart-1c} {insert wordstart}]
+ if ![string compare "\\" $ksp] then {
+ set Text [$FocusEditor.te.edit1 get {insert wordstart} {insert wordend}]
+ if {[llength [array names I_befehl $Text]] != 1} {set Text "\\section"} else {set Text "\\$Text"}
+ } {set Text "\\section"}
+ set ksp [$FocusEditor.te.edit1 search -backwards -- $Text {insert wordstart-1c} 1.0]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert "$ksp + 1 chars"
+ $FocusEditor.te.edit1 see insert
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}
+ bind Text <Control-b> {
+ if $FocusEditorFlag {
+ Line_breaking_switch $FocusEditor.te.edit1 section
+ }
+ }
+ bind Text <Control-B> {
+ if $FocusEditorFlag {
+ Line_breaking_switch $FocusEditor.te.edit1 unsection
+ }
+ }
+ bind Text <Alt-b> {
+ if $FocusEditorFlag {
+ Line_breaking_switch $FocusEditor.te.edit1 line
+ }
+ }
+ bind Text <Alt-B> {
+ if $FocusEditorFlag {
+ Line_breaking_switch $FocusEditor.te.edit1 unline
+ }
+ }
+
+ # Was passiert wenn man ein Fenster vernichtet
+ bind Toplevel <Destroy> {
+ # Fenster war Master dann Master loeschen
+ if $MasterFlag then {if {[string compare $Master %W] == 0} then {set MasterFlag 0}}
+ if $FocusEditorFlag then {if {[string compare $FocusEditor %W] == 0} then {set FocusEditorFlag 0}}
+ }
+
+
+bind Text <KeyPress> {
+ if $erg_flag(%W) then {
+ if {[%W get insert insert+1c] == "%A"} then {
+ %W mark set insert insert+1c
+ continue
+ } else {
+ erg_proc %W
+ }
+ }
+ if {"%A" != "{}"} then {
+ undo_switch %W {SelSave UndoBegin}
+ tkTextInsert %W %A
+ undo_switch %W {UndoEnd SelMul}
+
+ if $BeginFlag(%W) then {
+ %W insert BeginMark %A
+ undo_switch %W BeginMark
+ }
+ event generate %W <<ERG>>
+ event generate %W <<Modified>>
+ if $KlammerFlag then {
+ switch -- "%A" "(" {
+ tkTextInsert %W ")"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-1c
+ } "\{" {
+ if {[string compare [%W get insert-2c] "\\"] == 0} {
+ tkTextInsert %W "\\\}"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-2c
+ } {
+ tkTextInsert %W "\}"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-1c
+ }
+ } "\[" {
+ if {[string compare [%W get insert-2c] "\\"] == 0} {
+ tkTextInsert %W "\\\]"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-2c
+ } {
+ tkTextInsert %W "\]"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-1c
+ }
+ } "$" {
+ tkTextInsert %W "$"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-1c
+}}}}
+@
+
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d250 9
+a258 3
+ tkTextInsert %W "\}"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-1c
+d260 9
+a268 3
+ tkTextInsert %W "\]"
+ undo_switch %W UndoEnd
+ tkTextSetCursor %W insert-1c
+@
diff --git a/support/tcltexed/lib/RCS/color.tcl,v b/support/tcltexed/lib/RCS/color.tcl,v
new file mode 100644
index 0000000000..a7d589b736
--- /dev/null
+++ b/support/tcltexed/lib/RCS/color.tcl,v
@@ -0,0 +1,151 @@
+head 1.2;
+access;
+symbols;
+locks
+ mys:1.2; strict;
+comment @# @;
+
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+################################################################
+# defaultcolors
+switch $tcl_platform(platform) unix {
+ tk_setPalette\
+activebackground "#ececec"\
+activeforeground Black\
+background "#d9d9d9"\
+foreground Black\
+selectcolor White\
+disabledforeground "#a3a3a3"\
+highlightbackground "#d9d9d9"\
+highlightcolor Black
+} windows {
+tk_setPalette\
+activebackground "#ececec"\
+activeforeground Black\
+background "#c0c0c0"\
+foreground Black\
+selectcolor White\
+disabledforeground "#a3a3a3"\
+highlightbackground "#d9d9d9"\
+highlightcolor Black
+}
+################################################################
+# if colors make trouble
+set COLOR_list [list\
+"-activebackground"\
+"-activeforeground"\
+"-background"\
+"-disabledforeground"\
+"-foreground"\
+"-highlightbackground"\
+"-highlightcolor"\
+"-insertbackground"\
+"-selectbackground"\
+"-selectcolor"\
+"-selectforeground"\
+"-troughcolor"\
+]
+
+proc COLOR_LOOP {E} {
+ global COLOR_list
+ foreach i [$E configure] {
+ if {[lsearch -exact $COLOR_list [lindex $i 0]] != -1} {
+ $E configure [lindex $i 0] [lindex $i 3]
+ }
+ }
+ foreach i [winfo children $E] {COLOR_LOOP $i}
+}
+proc COLOR {E} {
+ global COLOR_flag
+ if $COLOR_flag {
+ COLOR_LOOP $E
+ }
+}
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 56
+a56 56
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+################################################################
+# defaultcolors
+switch $tcl_platform(platform) unix {
+ tk_setPalette\
+activebackground "#ececec"\
+activeforeground Black\
+background "#d9d9d9"\
+foreground Black\
+selectcolor White\
+disabledforeground "#a3a3a3"\
+highlightbackground "#d9d9d9"\
+highlightcolor Black
+} windows {
+tk_setPalette\
+activebackground "#ececec"\
+activeforeground Black\
+background "#c0c0c0"\
+foreground Black\
+selectcolor White\
+disabledforeground "#a3a3a3"\
+highlightbackground "#d9d9d9"\
+highlightcolor Black
+}
+################################################################
+# if colors make trouble
+set COLOR_list [list\
+"-activebackground"\
+"-activeforeground"\
+"-background"\
+"-disabledforeground"\
+"-foreground"\
+"-highlightbackground"\
+"-highlightcolor"\
+"-insertbackground"\
+"-selectbackground"\
+"-selectcolor"\
+"-selectforeground"\
+"-troughcolor"\
+]
+
+proc COLOR_LOOP {E} {
+ global COLOR_list
+ foreach i [$E configure] {
+ if {[lsearch -exact $COLOR_list [lindex $i 0]] != -1} {
+ $E configure [lindex $i 0] [lindex $i 3]
+ }
+ }
+ foreach i [winfo children $E] {COLOR_LOOP $i}
+}
+proc COLOR {E} {
+ global COLOR_flag
+ if $COLOR_flag {
+ COLOR_LOOP $E
+ }
+}
+@
+
diff --git a/support/tcltexed/lib/RCS/complition.tcl,v b/support/tcltexed/lib/RCS/complition.tcl,v
new file mode 100644
index 0000000000..a307f0a8be
--- /dev/null
+++ b/support/tcltexed/lib/RCS/complition.tcl,v
@@ -0,0 +1,219 @@
+head 1.2;
+access;
+symbols;
+locks
+ mys:1.2; strict;
+comment @# @;
+
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+################################
+# auto complition
+# ok !
+proc ergaenzung {E} {
+ global I_befehl I_back I_state
+ global BeginFlag
+ global erg_flag erg_back
+ set ksp [$E get {insert-1c wordstart-1c} {insert-1c wordstart}]
+ if ![string compare "\\" $ksp] then {
+ set TEXT [$E get {insert-1c wordstart} insert]
+ set LISTE [array names I_state "$TEXT*"]
+ if {1 == [llength $LISTE]} then {
+ set sp1 [string length $LISTE]
+ set sp2 [string length $TEXT]
+ if {$sp1 > $sp2} then {
+ erg_insert $E $LISTE [$E index insert]
+ } elseif {$sp1 == $sp2} {
+ Syntax $E {insert-1c wordstart-1c} insert
+}}}}
+#############################################
+# complition per mouse : the start
+# ok !
+menu .pop_menu -tearoff 0
+COLOR .pop_menu
+proc ergaenzung2 {E} {
+ global I_state
+ set ksp [$E get {insert-1c wordstart-1c} {insert-1c wordstart}]
+ if ![string compare "\\" $ksp] then {
+ set TEXT [$E get {insert-1c wordstart} insert]
+ set sp1 [string length $TEXT]
+ set LISTE [lsort [array names I_state "$TEXT*"]]
+ if {0 < [llength $LISTE]} then {
+ erg2_weiter $E $LISTE $sp1 [$E index insert]
+}}}
+##############################################
+# complition per mouse : construction
+proc erg2_weiter {E LISTE laenge index} {
+ global erg2_max T
+ .pop_menu delete 0 end
+ .pop_menu add command -label $T(cancel)
+ if {[llength $LISTE] > $erg2_max} {
+ .pop_menu add command -label $T(more) -command "erg2_weiter $E {[lrange $LISTE $erg2_max end]} $laenge $index"
+ }
+ .pop_menu add separator
+ foreach i [lrange $LISTE 0 [expr $erg2_max - 1]] {
+ if {$laenge == [string length $i]} {
+ .pop_menu add command -label $i
+ } {
+ .pop_menu add command -label $i -command "erg_insert $E $i $index"
+ }
+ }
+ tk_popup .pop_menu [expr [winfo rootx $E] + [lindex [$E bbox insert] 0]] [expr [winfo rooty $E] + [lindex [$E bbox insert] 1]]
+}
+###################################
+# functions for complitions in general
+# ok ?
+proc erg_insert {E T index} {
+ global I_befehl I_back
+ global BeginFlag
+ global erg_flag erg_back
+
+ $E mark set insert $index
+ set erg_flag($E) 1
+
+ undo_switch $E {Save {{insert-1c wordstart-1c} insert} Delete UndoBegin}
+ $E mark set erg_begin insert
+ $E mark gravity erg_begin left
+ $E insert insert $I_befehl($T)
+ $E mark set erg_end insert
+ undo_switch $E {UndoEnd Save UndoMax UndoMul}
+
+ switch $T begin {
+ $E mark set BeginMark insert-2c
+ set BeginFlag($E) 1
+ }
+ $E tag add erg_tag erg_begin erg_end
+ $E mark set insert $index
+ set erg_back($E) $I_back($T)
+}
+proc erg_proc {E} {
+ global erg_flag
+ global erg_back
+ if $erg_flag($E) then {
+ Syntax $E erg_begin erg_end
+ $E mark set insert "erg_end - $erg_back($E) chars"
+ $E tag remove erg_tag 1.0 end
+ set erg_flag($E) 0
+ }
+}
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 90
+a90 90
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+################################
+# auto complition
+# ok !
+proc ergaenzung {E} {
+ global I_befehl I_back I_state
+ global BeginFlag
+ global erg_flag erg_back
+ set ksp [$E get {insert-1c wordstart-1c} {insert-1c wordstart}]
+ if ![string compare "\\" $ksp] then {
+ set TEXT [$E get {insert-1c wordstart} insert]
+ set LISTE [array names I_state "$TEXT*"]
+ if {1 == [llength $LISTE]} then {
+ set sp1 [string length $LISTE]
+ set sp2 [string length $TEXT]
+ if {$sp1 > $sp2} then {
+ erg_insert $E $LISTE [$E index insert]
+ } elseif {$sp1 == $sp2} {
+ Syntax $E {insert-1c wordstart-1c} insert
+}}}}
+#############################################
+# complition per mouse : the start
+# ok !
+menu .pop_menu -tearoff 0
+COLOR .pop_menu
+proc ergaenzung2 {E} {
+ global I_state
+ set ksp [$E get {insert-1c wordstart-1c} {insert-1c wordstart}]
+ if ![string compare "\\" $ksp] then {
+ set TEXT [$E get {insert-1c wordstart} insert]
+ set sp1 [string length $TEXT]
+ set LISTE [lsort [array names I_state "$TEXT*"]]
+ if {0 < [llength $LISTE]} then {
+ erg2_weiter $E $LISTE $sp1 [$E index insert]
+}}}
+##############################################
+# complition per mouse : construction
+proc erg2_weiter {E LISTE laenge index} {
+ global erg2_max T
+ .pop_menu delete 0 end
+ .pop_menu add command -label $T(cancel)
+ if {[llength $LISTE] > $erg2_max} {
+ .pop_menu add command -label $T(more) -command "erg2_weiter $E {[lrange $LISTE $erg2_max end]} $laenge $index"
+ }
+ .pop_menu add separator
+ foreach i [lrange $LISTE 0 [expr $erg2_max - 1]] {
+ if {$laenge == [string length $i]} {
+ .pop_menu add command -label $i
+ } {
+ .pop_menu add command -label $i -command "erg_insert $E $i $index"
+ }
+ }
+ tk_popup .pop_menu [expr [winfo rootx $E] + [lindex [$E bbox insert] 0]] [expr [winfo rooty $E] + [lindex [$E bbox insert] 1]]
+}
+###################################
+# functions for complitions in general
+# ok ?
+proc erg_insert {E T index} {
+ global I_befehl I_back
+ global BeginFlag
+ global erg_flag erg_back
+
+ $E mark set insert $index
+ set erg_flag($E) 1
+
+ undo_switch $E {Save {{insert-1c wordstart-1c} insert} Delete UndoBegin}
+ $E mark set erg_begin insert
+ $E mark gravity erg_begin left
+ $E insert insert $I_befehl($T)
+ $E mark set erg_end insert
+ undo_switch $E {UndoEnd Save UndoMax UndoMul}
+
+ switch $T begin {
+ $E mark set BeginMark insert-2c
+ set BeginFlag($E) 1
+ }
+ $E tag add erg_tag erg_begin erg_end
+ $E mark set insert $index
+ set erg_back($E) $I_back($T)
+}
+proc erg_proc {E} {
+ global erg_flag
+ global erg_back
+ if $erg_flag($E) then {
+ Syntax $E erg_begin erg_end
+ $E mark set insert "erg_end - $erg_back($E) chars"
+ $E tag remove erg_tag 1.0 end
+ set erg_flag($E) 0
+ }
+}
+@
+
diff --git a/support/tcltexed/lib/RCS/events.tcl,v b/support/tcltexed/lib/RCS/events.tcl,v
new file mode 100644
index 0000000000..2dcb8cf9c4
--- /dev/null
+++ b/support/tcltexed/lib/RCS/events.tcl,v
@@ -0,0 +1,65 @@
+head 1.2;
+access;
+symbols;
+locks
+ mys:1.2; strict;
+comment @# @;
+
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+###############################################################################
+# virtuelle events
+event add <<Modified>> <Return> <Control-i> <Delete> <BackSpace> <Control-slash> <Control-backslash> <Insert> <Control-d> <Control-k><c> <Control-k><m> <Control-k><y> <Control-o> <Meta-d> <Meta-BackSpace> <Meta-Delete> <Control-h> <Button-2>
+
+event add <<Help>> <F1> <Control-k><h>
+event add <<HelpHelp>> <Control-F1>
+
+event add <<BeginFlag>> <Control-KeyPress> <Meta-KeyPress> <Alt-KeyPress> <Button> <Return> <Delete> <BackSpace> <Insert> <Tab> <Shift-Tab> <Control-Tab> <Control-Shift-Tab> <Control-i> <Select> <Control-Shift-space> <Shift-Select> <Control-slash> <Control-backslash> <Control-space>
+
+event add <<proc_undo>> <Up> <Left> <Right> <Down> <Shift-Up> <Shift-Left> <Shift-Right> <Shift-Down> <Control-Up> <Control-Left> <Control-Right> <Control-Down> <Shift-Control-Up> <Shift-Control-Left> <Shift-Control-Right> <Shift-Control-Down> <Prior> <Shift-Prior> <Next> <Shift-Next> <Control-Prior> <Control-Next> <Home> <Shift-Home> <End> <Shift-End> <Control-Home> <Control-Shift-Home> <Control-End> <Control-Shift-End>
+
+event add <<Position>> <Button> <KeyPress>
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 13
+a13 13
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+###############################################################################
+# virtuelle events
+event add <<Modified>> <Return> <Control-i> <Delete> <BackSpace> <Control-slash> <Control-backslash> <Insert> <Control-d> <Control-k><c> <Control-k><m> <Control-k><y> <Control-o> <Meta-d> <Meta-BackSpace> <Meta-Delete> <Control-h> <Button-2>
+
+event add <<Help>> <F1> <Control-k><h>
+event add <<HelpHelp>> <Control-F1>
+
+event add <<BeginFlag>> <Control-KeyPress> <Meta-KeyPress> <Alt-KeyPress> <Button> <Return> <Delete> <BackSpace> <Insert> <Tab> <Shift-Tab> <Control-Tab> <Control-Shift-Tab> <Control-i> <Select> <Control-Shift-space> <Shift-Select> <Control-slash> <Control-backslash> <Control-space>
+
+event add <<proc_undo>> <Up> <Left> <Right> <Down> <Shift-Up> <Shift-Left> <Shift-Right> <Shift-Down> <Control-Up> <Control-Left> <Control-Right> <Control-Down> <Shift-Control-Up> <Shift-Control-Left> <Shift-Control-Right> <Shift-Control-Down> <Prior> <Shift-Prior> <Next> <Shift-Next> <Control-Prior> <Control-Next> <Home> <Shift-Home> <End> <Shift-End> <Control-Home> <Control-Shift-Home> <Control-End> <Control-Shift-End>
+
+event add <<Position>> <Button> <KeyPress>
+@
+
diff --git a/support/tcltexed/lib/RCS/file.tcl,v b/support/tcltexed/lib/RCS/file.tcl,v
new file mode 100644
index 0000000000..787ff6ba7a
--- /dev/null
+++ b/support/tcltexed/lib/RCS/file.tcl,v
@@ -0,0 +1,450 @@
+head 1.4;
+access;
+symbols;
+locks
+ mys:1.4; strict;
+comment @# @;
+
+
+1.4
+date 2000.11.26.18.20.03; author mys; state Exp;
+branches;
+next 1.3;
+
+1.3
+date 2000.08.15.22.34.13; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.4
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+proc NewFile {} {
+ global FocusEditor
+ global FilenameArray UpToDateArray
+ global EDITORNUMMER
+ global etcpath
+ set E [EDITOR]
+ $E.te.edit1 delete 1.0 end
+ set FilenameArray($E) ""
+ set UpToDateArray($E) 0
+ wm title $E "no name $EDITORNUMMER"
+ if [file exists "$etcpath/default.tex"] then {
+ set f [open "$etcpath/default.tex" r]
+ set x [read $f]
+ $E.te.edit1 insert 1.0 $x
+ set t [close $f]
+ } else {
+ $E.te.edit1 insert end "\\documentclass\[12pt,a4paper\]{report}\n"
+# $E.te.edit1 insert end "\\usepackage\[german\]{babel}\n"
+# $E.te.edit1 insert end "\\usepackage{umlaut}\n"
+ $E.te.edit1 insert end "\\begin{document}\n\n"
+ $E.te.edit1 insert end "\\end{document}\n"
+ }
+ Syntax $E.te.edit1 1.0 end
+ set ksp [$E.te.edit1 search "\\begin{document}" 1.0]
+ $E.te.edit1 mark set insert "$ksp + 1 lines"
+ update
+ event generate $E.te.edit1 <<Position_tail>> -when tail
+# after 250 "event generate $E.te.edit1 <<Position_tail>> -when tail"
+}
+proc NewFileArg {} {
+ global FocusEditor
+ global FilenameArray UpToDateArray
+ global EDITORNUMMER
+ global etcpath
+ set E [EDITOR]
+ $E.te.edit1 delete 1.0 end
+ set FilenameArray($E) ""
+ set UpToDateArray($E) 0
+ wm title $E "no name $EDITORNUMMER"
+ if [file exists "$etcpath/default.tex"] then {
+ set f [open "$etcpath/default.tex" r]
+ set x [read $f]
+ $E.te.edit1 insert 1.0 $x
+ set t [close $f]
+ } else {
+ $E.te.edit1 insert end "\\documentclass\[12pt,a4paper\]{report}\n"
+# $E.te.edit1 insert end "\\usepackage\[german\]{babel}\n"
+# $E.te.edit1 insert end "\\usepackage{umlaut}\n"
+ $E.te.edit1 insert end "\\begin{document}\n\n"
+ $E.te.edit1 insert end "\\end{document}\n"
+ }
+ Syntax $E.te.edit1 1.0 end
+ set ksp [$E.te.edit1 search "\\begin{document}" 1.0]
+ $E.te.edit1 mark set insert "$ksp + 1 lines"
+ update
+ event generate $E.te.edit1 <<Position_tail>> -when tail
+# after 250 "event generate $E.te.edit1 <<Position_tail>> -when tail"
+}
+
+
+proc LoadFile {} {
+ global FilenameArray ModifiedArray directory
+ set types {
+ {{latex Files} {.tex} }
+ {{plain Text} {.txt}}
+ {{All Files} *}
+ }
+ set filename [tk_getOpenFile -filetypes $types -initialdir $directory]
+ LoadFileArg $filename 0
+}
+
+proc LoadFileArg {filename line} {
+ global FilenameArray UpToDateArray ModifiedArray directory
+ if {[file exists $filename]} then {
+ set directory [file dirname $filename]
+ set E [EDITOR]
+ set f [open $filename r]
+ set x [read $f]
+ $E.te.edit1 insert 1.0 $x
+ set t [close $f]
+ #Set global filename
+ set FilenameArray($E) $filename
+ set UpToDateArray($E) [file mtime "$filename"]
+ wm title $E "$filename"
+ Syntax $E.te.edit1 1.0 end
+ $E.te.edit1 mark set insert "1.0 + $line lines"
+ event generate $E.te.edit1 <<Modified>>
+ update
+ event generate $E.te.edit1 <<Position_tail>> -when tail
+ update
+ focus $E.te.edit1
+# after 500 "event generate $E.te.edit1 <<Position_tail>> -when tail"
+# after 500 "focus $E.te.edit1"
+ }
+}
+proc ReLoadFileArg {E filename} {
+ global FilenameArray UpToDateArray ModifiedArray directory
+ if {[file exists $filename]} then {
+ set directory [file dirname $filename]
+ set f [open $filename r]
+ set x [read $f]
+ set pos [$E.te.edit1 index insert]
+ $E.te.edit1 delete 1.0 end
+ $E.te.edit1 insert 1.0 $x
+ $E.te.edit1 mark set insert $pos
+ set t [close $f]
+ #Set global filename
+ set FilenameArray($E) $filename
+ set UpToDateArray($E) [file mtime "$filename"]
+ Syntax $E.te.edit1 1.0 end
+ focus $E.te.edit1
+# after 500 "event generate $E.te.edit1 <<Position_tail>> -when tail"
+# after 500 "focus $E.te.edit1"
+ }
+}
+
+proc AppendFile {E} {
+ global directory
+ set types {
+ {{latex Files} {.tex} }
+ {{plain Text} {.txt}}
+ {{All Files} *}
+ }
+ set filename [tk_getOpenFile -filetypes $types -initialdir $directory]
+ if {$filename != ""} then {
+ set directory [file dirname $filename]
+ set f [open $filename r]
+ set x [read $f]
+ #Append file at end of text
+ $E.te.edit1 insert insert $x
+ #Close source file
+ set t [close $f]
+ Syntax $E.te.edit1 1.0 end
+ event generate $E.te.edit1 <<Modified>>
+}}
+
+proc UpToDateFile {E} {
+ global FilenameArray UpToDateArray T
+ if [file exists $FilenameArray($E)] {
+ if { [file mtime $FilenameArray($E)] > $UpToDateArray($E) } {
+ switch [tk_messageBox -parent $E -icon warning -message $T(FileUpToDate) -default yes -type yesno] yes {
+ ReLoadFileArg $E $FilenameArray($E)
+ } no {
+ set UpToDateArray($E) [file mtime $FilenameArray($E)]
+ }
+ }
+ }
+}
+
+proc SaveFile {E} {
+ global FilenameArray UpToDateArray ModifiedArray
+ if {$FilenameArray($E)!= ""} then {
+ UpToDateFile $E
+ if { ![file exists $FilenameArray($E)] || [file mtime $FilenameArray($E)] <= $UpToDateArray($E) } {
+ set f [open $FilenameArray($E) w]
+ #Get text to save
+ set x [$E.te.edit1 get 1.0 end]
+ #Save it
+ puts $f $x
+ #and close file
+ set t [close $f]
+ set ModifiedArray($E.te.edit1) 0
+ set ModifiedArrayl($E.te.edit1) [string length $x]
+ set UpToDateArray($E) [file mtime $FilenameArray($E)]
+ }
+ } else {SaveAsFile $E}
+}
+
+proc SaveAsFile {E} {
+ global FilenameArray UpToDateArray ModifiedArray directory
+ set types {
+ {{latex Files} {.tex} }
+ {{plain Text} {.txt}}
+ {{All Files} *}
+ }
+ set filename [tk_getSaveFile -filetypes $types -initialfile $FilenameArray($E) -defaultextension ".tex" -initialdir $directory]
+ if {$filename != ""} then {
+ set directory [file dirname $filename]
+ set f [open $filename w]
+ #Get text to save
+ set x [$E.te.edit1 get 1.0 end]
+ #Save it
+ puts $f $x
+ #and close file
+ set t [close $f]
+ set FilenameArray($E) $filename
+ wm title $E "$FilenameArray($E)"
+ set ModifiedArray($E.te.edit1) 0
+ set UpToDateArray($E) [file mtime $FilenameArray($E)]
+}}
+
+
+@
+
+
+1.3
+log
+@*** empty log message ***
+@
+text
+@d4 1
+a4 1
+ global FilenameArray
+d10 1
+d33 1
+a33 1
+ global FilenameArray
+d39 1
+d70 1
+a70 1
+ LoadFileArg $filename
+d73 2
+a74 2
+proc LoadFileArg {filename} {
+ global FilenameArray ModifiedArray directory
+d84 1
+d87 1
+d98 1
+a98 1
+ global FilenameArray ModifiedArray directory
+d110 1
+d138 13
+d152 1
+a152 1
+ global FilenameArray ModifiedArray
+d154 13
+a166 9
+ set f [open $FilenameArray($E) w]
+ #Get text to save
+ set x [$E.te.edit1 get 1.0 end]
+ #Save it
+ puts $f $x
+ #and close file
+ set t [close $f]
+ set ModifiedArray($E.te.edit1) 0
+ set ModifiedArrayl($E.te.edit1) [string length $x]
+d171 1
+a171 1
+ global FilenameArray ModifiedArray directory
+d190 1
+@
+
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@d93 19
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 151
+a151 151
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+proc NewFile {} {
+ global FocusEditor
+ global FilenameArray
+ global EDITORNUMMER
+ global etcpath
+ set E [EDITOR]
+ $E.te.edit1 delete 1.0 end
+ set FilenameArray($E) ""
+ wm title $E "no name $EDITORNUMMER"
+ if [file exists "$etcpath/default.tex"] then {
+ set f [open "$etcpath/default.tex" r]
+ set x [read $f]
+ $E.te.edit1 insert 1.0 $x
+ set t [close $f]
+ } else {
+ $E.te.edit1 insert end "\\documentclass\[12pt,a4paper\]{report}\n"
+# $E.te.edit1 insert end "\\usepackage\[german\]{babel}\n"
+# $E.te.edit1 insert end "\\usepackage{umlaut}\n"
+ $E.te.edit1 insert end "\\begin{document}\n\n"
+ $E.te.edit1 insert end "\\end{document}\n"
+ }
+ Syntax $E.te.edit1 1.0 end
+ set ksp [$E.te.edit1 search "\\begin{document}" 1.0]
+ $E.te.edit1 mark set insert "$ksp + 1 lines"
+ update
+ event generate $E.te.edit1 <<Position_tail>> -when tail
+# after 250 "event generate $E.te.edit1 <<Position_tail>> -when tail"
+}
+proc NewFileArg {} {
+ global FocusEditor
+ global FilenameArray
+ global EDITORNUMMER
+ global etcpath
+ set E [EDITOR]
+ $E.te.edit1 delete 1.0 end
+ set FilenameArray($E) ""
+ wm title $E "no name $EDITORNUMMER"
+ if [file exists "$etcpath/default.tex"] then {
+ set f [open "$etcpath/default.tex" r]
+ set x [read $f]
+ $E.te.edit1 insert 1.0 $x
+ set t [close $f]
+ } else {
+ $E.te.edit1 insert end "\\documentclass\[12pt,a4paper\]{report}\n"
+# $E.te.edit1 insert end "\\usepackage\[german\]{babel}\n"
+# $E.te.edit1 insert end "\\usepackage{umlaut}\n"
+ $E.te.edit1 insert end "\\begin{document}\n\n"
+ $E.te.edit1 insert end "\\end{document}\n"
+ }
+ Syntax $E.te.edit1 1.0 end
+ set ksp [$E.te.edit1 search "\\begin{document}" 1.0]
+ $E.te.edit1 mark set insert "$ksp + 1 lines"
+ update
+ event generate $E.te.edit1 <<Position_tail>> -when tail
+# after 250 "event generate $E.te.edit1 <<Position_tail>> -when tail"
+}
+
+
+proc LoadFile {} {
+ global FilenameArray ModifiedArray directory
+ set types {
+ {{latex Files} {.tex} }
+ {{plain Text} {.txt}}
+ {{All Files} *}
+ }
+ set filename [tk_getOpenFile -filetypes $types -initialdir $directory]
+ LoadFileArg $filename
+}
+
+proc LoadFileArg {filename} {
+ global FilenameArray ModifiedArray directory
+ if {[file exists $filename]} then {
+ set directory [file dirname $filename]
+ set E [EDITOR]
+ set f [open $filename r]
+ set x [read $f]
+ $E.te.edit1 insert 1.0 $x
+ set t [close $f]
+ #Set global filename
+ set FilenameArray($E) $filename
+ wm title $E "$filename"
+ Syntax $E.te.edit1 1.0 end
+ event generate $E.te.edit1 <<Modified>>
+ update
+ event generate $E.te.edit1 <<Position_tail>> -when tail
+ update
+ focus $E.te.edit1
+# after 500 "event generate $E.te.edit1 <<Position_tail>> -when tail"
+# after 500 "focus $E.te.edit1"
+ }
+}
+
+proc AppendFile {E} {
+ global directory
+ set types {
+ {{latex Files} {.tex} }
+ {{plain Text} {.txt}}
+ {{All Files} *}
+ }
+ set filename [tk_getOpenFile -filetypes $types -initialdir $directory]
+ if {$filename != ""} then {
+ set directory [file dirname $filename]
+ set f [open $filename r]
+ set x [read $f]
+ #Append file at end of text
+ $E.te.edit1 insert insert $x
+ #Close source file
+ set t [close $f]
+ Syntax $E.te.edit1 1.0 end
+ event generate $E.te.edit1 <<Modified>>
+}}
+
+proc SaveFile {E} {
+ global FilenameArray ModifiedArray
+ if {$FilenameArray($E)!= ""} then {
+ set f [open $FilenameArray($E) w]
+ #Get text to save
+ set x [$E.te.edit1 get 1.0 end]
+ #Save it
+ puts $f $x
+ #and close file
+ set t [close $f]
+ set ModifiedArray($E.te.edit1) 0
+ set ModifiedArrayl($E.te.edit1) [string length $x]
+ } else {SaveAsFile $E}
+}
+
+proc SaveAsFile {E} {
+ global FilenameArray ModifiedArray directory
+ set types {
+ {{latex Files} {.tex} }
+ {{plain Text} {.txt}}
+ {{All Files} *}
+ }
+ set filename [tk_getSaveFile -filetypes $types -initialfile $FilenameArray($E) -defaultextension ".tex" -initialdir $directory]
+ if {$filename != ""} then {
+ set directory [file dirname $filename]
+ set f [open $filename w]
+ #Get text to save
+ set x [$E.te.edit1 get 1.0 end]
+ #Save it
+ puts $f $x
+ #and close file
+ set t [close $f]
+ set FilenameArray($E) $filename
+ wm title $E "$FilenameArray($E)"
+ set ModifiedArray($E.te.edit1) 0
+}}
+
+
+@
+
diff --git a/support/tcltexed/lib/RCS/help.tcl,v b/support/tcltexed/lib/RCS/help.tcl,v
new file mode 100644
index 0000000000..a1afb5147f
--- /dev/null
+++ b/support/tcltexed/lib/RCS/help.tcl,v
@@ -0,0 +1,407 @@
+head 1.2;
+access;
+symbols;
+locks
+ mys:1.2; strict;
+comment @# @;
+
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+#####################################################
+# show help
+# ok !
+proc Help {NAME} {
+ global T HLP
+ global hlppath hlptxt hlpfile
+ if [info exists HLP($NAME)] {
+
+ # Liste vorhandener Hilfen
+ set ii 0
+ foreach i $HLP($NAME) {
+ if [string match "$T(language)*" $i] {
+ incr ii
+ lappend liste $i "$T(language) $ii"
+ }
+ }
+ foreach i $HLP($NAME) {
+ if ![string match "$T(language)*" $i] {
+ incr ii
+ lappend liste $i "[lindex [split $i "/"] 0] $ii"
+ }
+ }
+ HLP_open $NAME [lindex $liste 0] [lindex $liste 1]
+ if [winfo exists .whelp] {
+ .whelp.f2.mb.m delete 0 end
+ foreach {i t} $liste {
+ .whelp.f2.mb.m add command -label $t -command "HLP_open $NAME $i {$t}"
+ }
+ .whelp.f2.e delete 0 end
+ .whelp.f2.e insert 0 $NAME
+ }
+ }
+ HLP_gif $NAME
+}
+###############################################
+# help from inside a text
+# ok !
+proc HelpTo {NAME} {
+ global T HLP
+ set flag 1
+ set key [$NAME get insert insert+1c]
+ if ![string compare $key "\\"] then {
+ set strt insert+1c
+ } else {
+ set strt insert
+ }
+ set ID [array startsearch HLP]
+ while {[array anymore HLP $ID]} {
+ set elm [array nextelement HLP $ID]
+ set velm [$NAME get $strt insert+[expr [string length $elm] + 1]c]
+ if ![string compare $elm $velm] then {
+ Help $elm
+ set flag 0
+ }
+ }
+ array donesearch HLP $ID
+ if $flag then {
+ Help $T(Helpto-Help)
+ }
+}
+##########################
+##########################
+proc HLP_load {} {
+ global hlppath HLP
+ if [file exists $hlppath/index] {
+ set f [open $hlppath/index r]
+ set L [read $f]
+ close $f
+ array set HLP $L
+ } {set HLP(ERROR) ERROR}
+}
+proc HLP_open {NAME FILE Text} {
+ global T hlppath hlptxt hlpfile
+ if ![winfo exists .whelp] {set hlpfile ""}
+ if {[string compare $FILE $hlpfile] != 0} {
+ if [file exists "$hlppath/$FILE"] then {
+ set f [open "$hlppath/$FILE" r]
+ HLP_plainwindow
+ .whelp.f2.mb configure -text $Text
+ .whelp.f.l configure -state normal
+ .whelp.f.l delete 1.0 end
+ .whelp.f.l insert 1.0 [read $f]
+ .whelp.f.l configure -state disabled
+ close $f
+ set hlpfile $FILE
+ set pos [.whelp.f.l search "::" 1.0 end]
+ while {$pos!=""} {
+ .whelp.f.l tag add invisible $pos "$pos lineend"
+ set pos [.whelp.f.l search "::" "$pos+1c" end]
+ }
+ set ksp "::"
+ set ksp [.whelp.f.l search -- $ksp$NAME$ksp pos]
+ if {$ksp != ""} then {
+ .whelp.f.l mark set pos $ksp
+ .whelp.f.l see pos
+ }
+ focus .whelp
+ } {
+ if [winfo exists .whelp] then {
+ .whelp.f.l configure -state normal
+ .whelp.f.l delete 1.0 end
+ eval ".whelp.f.l insert 1.0 \"$T(whelp-no-source)\""
+ .whelp.f.l configure -state disabled
+ }
+ }
+ }
+}
+proc HLP_plainwindow {} {
+ global T
+ if ![winfo exists .whelp] then {
+ toplevel .whelp
+ wm title .whelp $T(whelp-titel)
+
+ frame .whelp.f
+
+ scrollbar .whelp.f.vscroll -relief sunken -command {.whelp.f.l yview}
+ text .whelp.f.l -yscroll {.whelp.f.vscroll set}
+ pack .whelp.f.vscroll -side right -fill y
+ pack .whelp.f.l -expand yes -fill both
+ frame .whelp.f2
+ menubutton .whelp.f2.mb -menu .whelp.f2.mb.m
+ menu .whelp.f2.mb.m
+ button .whelp.f2.butup -text up -command {
+ .whelp.f.l tag remove show 1.0 end
+ set ksp [.whelp.f.l search -backwards -- [.whelp.f2.e get] pos]
+ if {$ksp != ""} then {
+ .whelp.f.l mark set pos $ksp
+ .whelp.f.l see pos
+ .whelp.f.l tag add show pos "pos wordend"
+ }
+ }
+ button .whelp.f2.butdown -text down -command {
+ .whelp.f.l tag remove show 1.0 end
+ set ksp [.whelp.f.l search -- [.whelp.f2.e get] pos+1c]
+ if {$ksp != ""} then {
+ .whelp.f.l mark set pos $ksp
+ .whelp.f.l see pos
+ .whelp.f.l tag add show pos "pos wordend"
+ }
+ }
+ entry .whelp.f2.e
+ button .whelp.f2.butQ -text $T(quit) -command {
+ destroy .whelp
+ }
+
+ pack .whelp.f -expand yes -fill y
+ pack .whelp.f2.mb .whelp.f2.butup .whelp.f2.butdown .whelp.f2.e .whelp.f2.butQ -side left
+ pack .whelp.f2
+ COLOR .whelp
+ .whelp.f.l tag add invisible 1.0 1.0
+ .whelp.f.l tag add show 1.0 1.0
+ .whelp.f.l tag configure invisible -foreground [.whelp.f.l cget -bg]
+ .whelp.f.l tag configure show -foreground Red
+ .whelp.f.l tag raise invisible
+ .whelp.f.l mark set pos 1.0
+ }
+}
+proc HLP_gif Name {
+ global gifpath I_txt
+ if [info exists I_txt($Name)] {
+ if [file exists "$gifpath/$I_txt($Name).gif"] then {
+ if ![winfo exists .whelpgif] then {
+ toplevel .whelpgif
+
+ button .whelpgif.butQ -image [Bild $Name] -command {
+ destroy .whelpgif
+ }
+ pack .whelpgif.butQ
+ COLOR .whelpgif
+ } else {
+ .whelpgif.butQ configure -image [Bild $Name]
+ focus .whelpgif
+ }
+ } {
+ if [winfo exists .whelpgif] then {
+ .whelpgif.butQ configure -image MasterBildSlaveOff
+ }
+ }
+ } {
+ if [winfo exists .whelpgif] then {
+ .whelpgif.butQ configure -image MasterBildSlaveOff
+ }
+ }
+}@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 184
+a184 184
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+#####################################################
+# show help
+# ok !
+proc Help {NAME} {
+ global T HLP
+ global hlppath hlptxt hlpfile
+ if [info exists HLP($NAME)] {
+
+ # Liste vorhandener Hilfen
+ set ii 0
+ foreach i $HLP($NAME) {
+ if [string match "$T(language)*" $i] {
+ incr ii
+ lappend liste $i "$T(language) $ii"
+ }
+ }
+ foreach i $HLP($NAME) {
+ if ![string match "$T(language)*" $i] {
+ incr ii
+ lappend liste $i "[lindex [split $i "/"] 0] $ii"
+ }
+ }
+ HLP_open $NAME [lindex $liste 0] [lindex $liste 1]
+ if [winfo exists .whelp] {
+ .whelp.f2.mb.m delete 0 end
+ foreach {i t} $liste {
+ .whelp.f2.mb.m add command -label $t -command "HLP_open $NAME $i {$t}"
+ }
+ .whelp.f2.e delete 0 end
+ .whelp.f2.e insert 0 $NAME
+ }
+ }
+ HLP_gif $NAME
+}
+###############################################
+# help from inside a text
+# ok !
+proc HelpTo {NAME} {
+ global T HLP
+ set flag 1
+ set key [$NAME get insert insert+1c]
+ if ![string compare $key "\\"] then {
+ set strt insert+1c
+ } else {
+ set strt insert
+ }
+ set ID [array startsearch HLP]
+ while {[array anymore HLP $ID]} {
+ set elm [array nextelement HLP $ID]
+ set velm [$NAME get $strt insert+[expr [string length $elm] + 1]c]
+ if ![string compare $elm $velm] then {
+ Help $elm
+ set flag 0
+ }
+ }
+ array donesearch HLP $ID
+ if $flag then {
+ Help $T(Helpto-Help)
+ }
+}
+##########################
+##########################
+proc HLP_load {} {
+ global hlppath HLP
+ if [file exists $hlppath/index] {
+ set f [open $hlppath/index r]
+ set L [read $f]
+ close $f
+ array set HLP $L
+ } {set HLP(ERROR) ERROR}
+}
+proc HLP_open {NAME FILE Text} {
+ global T hlppath hlptxt hlpfile
+ if ![winfo exists .whelp] {set hlpfile ""}
+ if {[string compare $FILE $hlpfile] != 0} {
+ if [file exists "$hlppath/$FILE"] then {
+ set f [open "$hlppath/$FILE" r]
+ HLP_plainwindow
+ .whelp.f2.mb configure -text $Text
+ .whelp.f.l configure -state normal
+ .whelp.f.l delete 1.0 end
+ .whelp.f.l insert 1.0 [read $f]
+ .whelp.f.l configure -state disabled
+ close $f
+ set hlpfile $FILE
+ set pos [.whelp.f.l search "::" 1.0 end]
+ while {$pos!=""} {
+ .whelp.f.l tag add invisible $pos "$pos lineend"
+ set pos [.whelp.f.l search "::" "$pos+1c" end]
+ }
+ set ksp "::"
+ set ksp [.whelp.f.l search -- $ksp$NAME$ksp pos]
+ if {$ksp != ""} then {
+ .whelp.f.l mark set pos $ksp
+ .whelp.f.l see pos
+ }
+ focus .whelp
+ } {
+ if [winfo exists .whelp] then {
+ .whelp.f.l configure -state normal
+ .whelp.f.l delete 1.0 end
+ eval ".whelp.f.l insert 1.0 \"$T(whelp-no-source)\""
+ .whelp.f.l configure -state disabled
+ }
+ }
+ }
+}
+proc HLP_plainwindow {} {
+ global T
+ if ![winfo exists .whelp] then {
+ toplevel .whelp
+ wm title .whelp $T(whelp-titel)
+
+ frame .whelp.f
+
+ scrollbar .whelp.f.vscroll -relief sunken -command {.whelp.f.l yview}
+ text .whelp.f.l -yscroll {.whelp.f.vscroll set}
+ pack .whelp.f.vscroll -side right -fill y
+ pack .whelp.f.l -expand yes -fill both
+ frame .whelp.f2
+ menubutton .whelp.f2.mb -menu .whelp.f2.mb.m
+ menu .whelp.f2.mb.m
+ button .whelp.f2.butup -text up -command {
+ .whelp.f.l tag remove show 1.0 end
+ set ksp [.whelp.f.l search -backwards -- [.whelp.f2.e get] pos]
+ if {$ksp != ""} then {
+ .whelp.f.l mark set pos $ksp
+ .whelp.f.l see pos
+ .whelp.f.l tag add show pos "pos wordend"
+ }
+ }
+ button .whelp.f2.butdown -text down -command {
+ .whelp.f.l tag remove show 1.0 end
+ set ksp [.whelp.f.l search -- [.whelp.f2.e get] pos+1c]
+ if {$ksp != ""} then {
+ .whelp.f.l mark set pos $ksp
+ .whelp.f.l see pos
+ .whelp.f.l tag add show pos "pos wordend"
+ }
+ }
+ entry .whelp.f2.e
+ button .whelp.f2.butQ -text $T(quit) -command {
+ destroy .whelp
+ }
+
+ pack .whelp.f -expand yes -fill y
+ pack .whelp.f2.mb .whelp.f2.butup .whelp.f2.butdown .whelp.f2.e .whelp.f2.butQ -side left
+ pack .whelp.f2
+ COLOR .whelp
+ .whelp.f.l tag add invisible 1.0 1.0
+ .whelp.f.l tag add show 1.0 1.0
+ .whelp.f.l tag configure invisible -foreground [.whelp.f.l cget -bg]
+ .whelp.f.l tag configure show -foreground Red
+ .whelp.f.l tag raise invisible
+ .whelp.f.l mark set pos 1.0
+ }
+}
+proc HLP_gif Name {
+ global gifpath I_txt
+ if [info exists I_txt($Name)] {
+ if [file exists "$gifpath/$I_txt($Name).gif"] then {
+ if ![winfo exists .whelpgif] then {
+ toplevel .whelpgif
+
+ button .whelpgif.butQ -image [Bild $Name] -command {
+ destroy .whelpgif
+ }
+ pack .whelpgif.butQ
+ COLOR .whelpgif
+ } else {
+ .whelpgif.butQ configure -image [Bild $Name]
+ focus .whelpgif
+ }
+ } {
+ if [winfo exists .whelpgif] then {
+ .whelpgif.butQ configure -image MasterBildSlaveOff
+ }
+ }
+ } {
+ if [winfo exists .whelpgif] then {
+ .whelpgif.butQ configure -image MasterBildSlaveOff
+ }
+ }
+@
+
diff --git a/support/tcltexed/lib/RCS/helpmanual.tcl,v b/support/tcltexed/lib/RCS/helpmanual.tcl,v
new file mode 100644
index 0000000000..636c90d3d0
--- /dev/null
+++ b/support/tcltexed/lib/RCS/helpmanual.tcl,v
@@ -0,0 +1,480 @@
+head 1.4;
+access;
+symbols;
+locks
+ mys:1.4; strict;
+comment @# @;
+
+
+1.4
+date 2001.01.23.21.07.16; author mys; state Exp;
+branches;
+next 1.3;
+
+1.3
+date 2000.08.15.23.03.59; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.4
+log
+@+bre
+@
+text
+@# Copyright (C) 2000 - Martin Strauss - under terms of GPL
+##################################################################################
+# version info
+proc InitVersion {} {
+ global T Tcltexed_Version
+ if ![winfo exists .wversion] then {
+ toplevel .wversion
+ wm title .wversion $T(wversion-titel)
+ label .wversion.version -text $T(wversion-text)
+ pack .wversion.version
+ }
+}
+##################################################################################
+# latex - command - listing
+proc InitListen {} {
+ global I_befehl I_back T wlatex_max
+ if ![winfo exists .wlatex] then {
+ toplevel .wlatex
+ wm title .wlatex $T(wlatex-titel)
+ frame .wlatex.e
+ scrollbar .wlatex.e.scroll -command {.wlatex.e.list yview}
+ pack .wlatex.e.scroll -side right -fill y
+ listbox .wlatex.e.list -yscroll ".wlatex.e.scroll set" -relief sunken -width 20 -height $wlatex_max -setgrid yes
+ pack .wlatex.e.list -fill both -expand yes
+ set LISTE [lsort [array names I_befehl]]
+ foreach i $LISTE {.wlatex.e.list insert end $i}
+ button .wlatex.butQ -text $T(quit) -command {destroy .wlatex}
+ pack .wlatex.e .wlatex.butQ -fill x
+ wm minsize . 1 1
+ bind .wlatex <<Help>> {
+ if {[.wlatex.e.list curselection] != ""} then {
+ Help [selection get]
+ } else {
+ Help $T(wlatex-Help)
+ }
+ }
+ bind .wlatex <Return> {
+ set ksp [.wlatex.e.list curselection]
+ if {$ksp != ""} then {
+ Help [selection get]
+ focus .wlatex
+ if {$ksp < [.wlatex.e.list size]} then {incr ksp}
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <Double-Button-1> {
+ if {[.wlatex.e.list curselection] != ""} then {
+ Help [selection get]
+ focus .wlatex
+ }
+ }
+ bind .wlatex <Double-Button-3> {
+ if {[.wlatex.e.list curselection] != ""} then {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ switch_Undo $FocusEditor.te.edit1 UndoBegin
+ $FocusEditor.te.edit1 insert insert $I_befehl([selection get])
+ switch_Undo $FocusEditor.te.edit1 UndoEnd
+ switch_undo $FocusEditor.te.edit1 insert
+ $FocusEditor.te.edit1 mark set insert "insert - $I_back([selection get]) chars"
+ event generate $FocusEditor.te.edit1 <<Modified>>
+ }
+ }
+ }
+ bind .wlatex <Prior> {
+ set ksp [.wlatex.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp > $wlatex_max} then {set ksp [expr $ksp - $wlatex_max]}
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <Next> {
+ set ksp [.wlatex.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp < [expr $wlatex_max + [.wlatex.e.list size]]} then {set ksp [expr $ksp + $wlatex_max]}
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <Up> {
+ set ksp [.wlatex.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp > 0} then {set ksp [expr $ksp - 1]}
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <Down> {
+ set ksp [.wlatex.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp < [.wlatex.e.list size]} then {incr ksp}
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <KeyPress> {
+ set ksp [lsearch -exact $ABC %A]
+ if {$ksp != -1} {
+ set ksp [lindex $wlatex_LISTE $ksp]
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <Control-c> {
+ destroy .wlatex
+ }
+ COLOR .wlatex
+ } else {focus .wlatex}
+}
+##################################################################################
+# Tcltexed - manual - listing
+proc InitTcltexed {} {
+ global Tcltexed_help T wTcltexed_max
+ if ![winfo exists .wTcltexed] then {
+ toplevel .wTcltexed
+ wm title .wTcltexed $T(wTcltexed-titel)
+ frame .wTcltexed.e
+ scrollbar .wTcltexed.e.scroll -command {.wTcltexed.e.list yview}
+ pack .wTcltexed.e.scroll -side right -fill y
+ listbox .wTcltexed.e.list -yscroll ".wTcltexed.e.scroll set" -relief sunken -width 20 -height $wTcltexed_max -setgrid yes
+ pack .wTcltexed.e.list -fill both -expand yes
+ foreach {i f} $T(wTcltexed-manual) {
+ .wTcltexed.e.list insert end $i
+ set Tcltexed_help($i) $f
+ }
+ button .wTcltexed.butQ -text $T(quit) -command {destroy .wTcltexed}
+ pack .wTcltexed.e .wTcltexed.butQ -fill x
+ wm minsize . 1 1
+
+ bind .wTcltexed <<Help>> {
+ if {[.wTcltexed.e.list curselection] != ""} then {
+ Help $Tcltexed_help([selection get])
+ } else {
+ Help $T(wTcltexed-Help)
+ }
+ }
+ bind .wTcltexed <Return> {
+ set ksp [.wTcltexed.e.list curselection]
+ if {$ksp != ""} then {
+ Help $Tcltexed_help([selection get])
+ focus .wTcltexed
+ if {$ksp < [.wTcltexed.e.list size]} then {incr ksp}
+ .wTcltexed.e.list selection clear 0 end
+ .wTcltexed.e.list selection set $ksp $ksp
+ .wTcltexed.e.list see $ksp
+ }
+ }
+ bind .wTcltexed <Double-Button-1> {
+ if {[.wTcltexed.e.list curselection] != ""} then {
+ Help $Tcltexed_help([selection get])
+ focus .wTcltexed
+ }
+ }
+ bind .wTcltexed <Double-Button-3> {
+ if {[.wTcltexed.e.list curselection] != ""} then {
+ Help $Tcltexed_help([selection get])
+ focus .wTcltexed
+ }
+ }
+ bind .wTcltexed <Prior> {
+ set ksp [.wTcltexed.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp > $wTcltexed_max} then {set ksp [expr $ksp - $wTcltexed_max]}
+ .wTcltexed.e.list selection clear 0 end
+ .wTcltexed.e.list selection set $ksp $ksp
+ .wTcltexed.e.list see $ksp
+ }
+ }
+ bind .wTcltexed <Next> {
+ set ksp [.wTcltexed.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp < [expr $wTcltexed_max + [.wTcltexed.e.list size]]} then {set ksp [expr $ksp + $wTcltexed_max]}
+ .wTcltexed.e.list selection clear 0 end
+ .wTcltexed.e.list selection set $ksp $ksp
+ .wTcltexed.e.list see $ksp
+ }
+ }
+ bind .wTcltexed <Up> {
+ set ksp [.wTcltexed.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp > 0} then {set ksp [expr $ksp - 1]}
+ .wTcltexed.e.list selection clear 0 end
+ .wTcltexed.e.list selection set $ksp $ksp
+ .wTcltexed.e.list see $ksp
+ }
+ }
+ bind .wTcltexed <Down> {
+ set ksp [.wTcltexed.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp < [.wTcltexed.e.list size]} then {incr ksp}
+ .wTcltexed.e.list selection clear 0 end
+ .wTcltexed.e.list selection set $ksp $ksp
+ .wTcltexed.e.list see $ksp
+ }
+ }
+ bind .wTcltexed <Control-c> {
+ destroy .wTcltexed
+ }
+ COLOR .wTcltexed
+ } else {focus .wTcltexed}
+}
+
+@
+
+
+1.3
+log
+@*** empty log message ***
+@
+text
+@d116 1
+a116 1
+ } else {focus .wTcltexed}
+@
+
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@d1 12
+a12 1
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 199
+a199 199
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+##################################################################################
+# latex - command - listing
+proc InitListen {} {
+ global I_befehl I_back T wlatex_max
+ if ![winfo exists .wlatex] then {
+ toplevel .wlatex
+ wm title .wlatex $T(wlatex-titel)
+ frame .wlatex.e
+ scrollbar .wlatex.e.scroll -command {.wlatex.e.list yview}
+ pack .wlatex.e.scroll -side right -fill y
+ listbox .wlatex.e.list -yscroll ".wlatex.e.scroll set" -relief sunken -width 20 -height $wlatex_max -setgrid yes
+ pack .wlatex.e.list -fill both -expand yes
+ set LISTE [lsort [array names I_befehl]]
+ foreach i $LISTE {.wlatex.e.list insert end $i}
+ button .wlatex.butQ -text $T(quit) -command {destroy .wlatex}
+ pack .wlatex.e .wlatex.butQ -fill x
+ wm minsize . 1 1
+ bind .wlatex <<Help>> {
+ if {[.wlatex.e.list curselection] != ""} then {
+ Help [selection get]
+ } else {
+ Help $T(wlatex-Help)
+ }
+ }
+ bind .wlatex <Return> {
+ set ksp [.wlatex.e.list curselection]
+ if {$ksp != ""} then {
+ Help [selection get]
+ focus .wlatex
+ if {$ksp < [.wlatex.e.list size]} then {incr ksp}
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <Double-Button-1> {
+ if {[.wlatex.e.list curselection] != ""} then {
+ Help [selection get]
+ focus .wlatex
+ }
+ }
+ bind .wlatex <Double-Button-3> {
+ if {[.wlatex.e.list curselection] != ""} then {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ switch_Undo $FocusEditor.te.edit1 UndoBegin
+ $FocusEditor.te.edit1 insert insert $I_befehl([selection get])
+ switch_Undo $FocusEditor.te.edit1 UndoEnd
+ switch_undo $FocusEditor.te.edit1 insert
+ $FocusEditor.te.edit1 mark set insert "insert - $I_back([selection get]) chars"
+ event generate $FocusEditor.te.edit1 <<Modified>>
+ }
+ }
+ }
+ bind .wlatex <Prior> {
+ set ksp [.wlatex.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp > $wlatex_max} then {set ksp [expr $ksp - $wlatex_max]}
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <Next> {
+ set ksp [.wlatex.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp < [expr $wlatex_max + [.wlatex.e.list size]]} then {set ksp [expr $ksp + $wlatex_max]}
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <Up> {
+ set ksp [.wlatex.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp > 0} then {set ksp [expr $ksp - 1]}
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <Down> {
+ set ksp [.wlatex.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp < [.wlatex.e.list size]} then {incr ksp}
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <KeyPress> {
+ set ksp [lsearch -exact $ABC %A]
+ if {$ksp != -1} {
+ set ksp [lindex $wlatex_LISTE $ksp]
+ .wlatex.e.list selection clear 0 end
+ .wlatex.e.list selection set $ksp $ksp
+ .wlatex.e.list see $ksp
+ }
+ }
+ bind .wlatex <Control-c> {
+ destroy .wlatex
+ }
+ COLOR .wlatex
+ } else {focus .wTcltexed}
+}
+##################################################################################
+# Tcltexed - manual - listing
+proc InitTcltexed {} {
+ global Tcltexed_help T wTcltexed_max
+ if ![winfo exists .wTcltexed] then {
+ toplevel .wTcltexed
+ wm title .wTcltexed $T(wTcltexed-titel)
+ frame .wTcltexed.e
+ scrollbar .wTcltexed.e.scroll -command {.wTcltexed.e.list yview}
+ pack .wTcltexed.e.scroll -side right -fill y
+ listbox .wTcltexed.e.list -yscroll ".wTcltexed.e.scroll set" -relief sunken -width 20 -height $wTcltexed_max -setgrid yes
+ pack .wTcltexed.e.list -fill both -expand yes
+ foreach {i f} $T(wTcltexed-manual) {
+ .wTcltexed.e.list insert end $i
+ set Tcltexed_help($i) $f
+ }
+ button .wTcltexed.butQ -text $T(quit) -command {destroy .wTcltexed}
+ pack .wTcltexed.e .wTcltexed.butQ -fill x
+ wm minsize . 1 1
+
+ bind .wTcltexed <<Help>> {
+ if {[.wTcltexed.e.list curselection] != ""} then {
+ Help $Tcltexed_help([selection get])
+ } else {
+ Help $T(wTcltexed-Help)
+ }
+ }
+ bind .wTcltexed <Return> {
+ set ksp [.wTcltexed.e.list curselection]
+ if {$ksp != ""} then {
+ Help $Tcltexed_help([selection get])
+ focus .wTcltexed
+ if {$ksp < [.wTcltexed.e.list size]} then {incr ksp}
+ .wTcltexed.e.list selection clear 0 end
+ .wTcltexed.e.list selection set $ksp $ksp
+ .wTcltexed.e.list see $ksp
+ }
+ }
+ bind .wTcltexed <Double-Button-1> {
+ if {[.wTcltexed.e.list curselection] != ""} then {
+ Help $Tcltexed_help([selection get])
+ focus .wTcltexed
+ }
+ }
+ bind .wTcltexed <Double-Button-3> {
+ if {[.wTcltexed.e.list curselection] != ""} then {
+ Help $Tcltexed_help([selection get])
+ focus .wTcltexed
+ }
+ }
+ bind .wTcltexed <Prior> {
+ set ksp [.wTcltexed.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp > $wTcltexed_max} then {set ksp [expr $ksp - $wTcltexed_max]}
+ .wTcltexed.e.list selection clear 0 end
+ .wTcltexed.e.list selection set $ksp $ksp
+ .wTcltexed.e.list see $ksp
+ }
+ }
+ bind .wTcltexed <Next> {
+ set ksp [.wTcltexed.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp < [expr $wTcltexed_max + [.wTcltexed.e.list size]]} then {set ksp [expr $ksp + $wTcltexed_max]}
+ .wTcltexed.e.list selection clear 0 end
+ .wTcltexed.e.list selection set $ksp $ksp
+ .wTcltexed.e.list see $ksp
+ }
+ }
+ bind .wTcltexed <Up> {
+ set ksp [.wTcltexed.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp > 0} then {set ksp [expr $ksp - 1]}
+ .wTcltexed.e.list selection clear 0 end
+ .wTcltexed.e.list selection set $ksp $ksp
+ .wTcltexed.e.list see $ksp
+ }
+ }
+ bind .wTcltexed <Down> {
+ set ksp [.wTcltexed.e.list curselection]
+ if {$ksp != ""} then {
+ if {$ksp < [.wTcltexed.e.list size]} then {incr ksp}
+ .wTcltexed.e.list selection clear 0 end
+ .wTcltexed.e.list selection set $ksp $ksp
+ .wTcltexed.e.list see $ksp
+ }
+ }
+ bind .wTcltexed <Control-c> {
+ destroy .wTcltexed
+ }
+ COLOR .wTcltexed
+ } else {focus .wTcltexed}
+}
+
+@
+
diff --git a/support/tcltexed/lib/RCS/linebreak.tcl,v b/support/tcltexed/lib/RCS/linebreak.tcl,v
new file mode 100644
index 0000000000..b1240e87d8
--- /dev/null
+++ b/support/tcltexed/lib/RCS/linebreak.tcl,v
@@ -0,0 +1,206 @@
+head 1.3;
+access;
+symbols;
+locks
+ mys:1.3; strict;
+comment @# @;
+
+
+1.3
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 99.11.22.22.30.59; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.3
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+###############################################################################
+# line breaking
+proc Line_breaking {E START END} {
+ global line_breaking_chars
+ set imax [lindex [split [$E index "$START.0 lineend"] "."] 1]
+ set spaces ""
+ for {set i 0} {$i<=$imax} {incr i} {
+ if {[string compare [$E get $START.$i] " "] == 0} {set spaces "$spaces "} {break}
+ }
+ for {set i $START} {$i<=$END} {incr i} {
+ if {[lindex [split [$E index "$i.0 lineend"] "."] 1] > 80} {
+ set pos [$E search -backwards -- " " $i.$line_breaking_chars "$i.0"]
+ if {[lindex [split $pos "."] 0] == $i} {
+ if {[string compare [$E get "$pos + 1c"] "\n"] !=0} {
+ $E insert "$pos + 1c" "\n$spaces"
+ incr END
+ }
+ }
+ }
+ }
+}
+proc Line_unbreaking {E START END} {
+ for {set i $START} {$i<=$END} {incr i} {
+ if {[string compare [$E get "$i.0 lineend - 1c"] " "] ==0} {
+ if {[string length [$E get "$i.0+1l" "$i.1+1l"]] !=0} {
+ while {[string compare [$E get "$i.0 lineend+1c"] " "] == 0} {
+ $E delete "$i.0 lineend+1c"
+ }
+ $E delete "$i.0 lineend"
+ incr i -1
+ incr END -1
+ }
+ }
+ }
+}
+proc Line_breaking_switch {E KEY} {
+ switch $KEY all {
+ Line_breaking_switch $E unall
+ Line_breaking $E 1 [lindex [split [$E index end] "."] 0]
+ } unall {
+ Line_unbreaking $E 1 [lindex [split [$E index end] "."] 0]
+ } section {
+ Line_breaking_switch $E unsection
+ set pos1 [lindex [split [$E search -backwards -regexp -- "^$" insert 1.0] "."] 0]
+ set pos2 [lindex [split [$E search -regexp -- "^$" insert end] "."] 0]
+ if {$pos1 == ""} {set pos1 1}
+ if {$pos2 == ""} {set pos2 [lindex [split [$E index end] "."] 0]}
+ Line_breaking $E $pos1 $pos2
+ } unsection {
+ set pos1 [lindex [split [$E search -backwards -regexp -- "^$" insert 1.0] "."] 0]
+ set pos2 [lindex [split [$E search -regexp -- "^$" insert end] "."] 0]
+ if {$pos1 == ""} {set pos1 1}
+ if {$pos2 == ""} {set pos2 [lindex [split [$E index end] "."] 0]}
+ Line_unbreaking $E $pos1 $pos2
+ } line {
+ Line_breaking_switch $E unline
+ set ksp [lindex [split [$E index {insert linestart}] "."] 0]
+ if {$ksp != ""} {
+ Line_breaking $E $ksp $ksp
+ }
+ } unline {
+ set pos1 [expr [lindex [split [$E search -backwards -regexp -- "\[^ \]$" insert 1.0] "."] 0] +1]
+ set pos2 [lindex [split [$E search -regexp -- "\[^ \]$" insert end] "."] 0]
+ if {$pos1 == ""} {set pos1 1}
+ if {$pos2 == ""} {set pos2 [lindex [split [$E index end] "."] 0]}
+ Line_unbreaking $E $pos1 $pos2
+ }
+}
+@
+
+
+1.2
+log
+@+ Einrueckung beim Zeilenumbruch an die Einrueckung der ersten Zeile
+angepasst.
+@
+text
+@d1 69
+a69 69
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+###############################################################################
+# line breaking
+proc Line_breaking {E START END} {
+ global line_breaking_chars
+ set imax [lindex [split [$E index "$START.0 lineend"] "."] 1]
+ set spaces ""
+ for {set i 0} {$i<=$imax} {incr i} {
+ if {[string compare [$E get $START.$i] " "] == 0} {set spaces "$spaces "} {break}
+ }
+ for {set i $START} {$i<=$END} {incr i} {
+ if {[lindex [split [$E index "$i.0 lineend"] "."] 1] > 80} {
+ set pos [$E search -backwards -- " " $i.$line_breaking_chars "$i.0"]
+ if {[lindex [split $pos "."] 0] == $i} {
+ if {[string compare [$E get "$pos + 1c"] "\n"] !=0} {
+ $E insert "$pos + 1c" "\n$spaces"
+ incr END
+ }
+ }
+ }
+ }
+}
+proc Line_unbreaking {E START END} {
+ for {set i $START} {$i<=$END} {incr i} {
+ if {[string compare [$E get "$i.0 lineend - 1c"] " "] ==0} {
+ if {[string length [$E get "$i.0+1l" "$i.1+1l"]] !=0} {
+ while {[string compare [$E get "$i.0 lineend+1c"] " "] == 0} {
+ $E delete "$i.0 lineend+1c"
+ }
+ $E delete "$i.0 lineend"
+ incr i -1
+ incr END -1
+ }
+ }
+ }
+}
+proc Line_breaking_switch {E KEY} {
+ switch $KEY all {
+ Line_breaking_switch $E unall
+ Line_breaking $E 1 [lindex [split [$E index end] "."] 0]
+ } unall {
+ Line_unbreaking $E 1 [lindex [split [$E index end] "."] 0]
+ } section {
+ Line_breaking_switch $E unsection
+ set pos1 [lindex [split [$E search -backwards -regexp -- "^$" insert 1.0] "."] 0]
+ set pos2 [lindex [split [$E search -regexp -- "^$" insert end] "."] 0]
+ if {$pos1 == ""} {set pos1 1}
+ if {$pos2 == ""} {set pos2 [lindex [split [$E index end] "."] 0]}
+ Line_breaking $E $pos1 $pos2
+ } unsection {
+ set pos1 [lindex [split [$E search -backwards -regexp -- "^$" insert 1.0] "."] 0]
+ set pos2 [lindex [split [$E search -regexp -- "^$" insert end] "."] 0]
+ if {$pos1 == ""} {set pos1 1}
+ if {$pos2 == ""} {set pos2 [lindex [split [$E index end] "."] 0]}
+ Line_unbreaking $E $pos1 $pos2
+ } line {
+ Line_breaking_switch $E unline
+ set ksp [lindex [split [$E index {insert linestart}] "."] 0]
+ if {$ksp != ""} {
+ Line_breaking $E $ksp $ksp
+ }
+ } unline {
+ set pos1 [expr [lindex [split [$E search -backwards -regexp -- "\[^ \]$" insert 1.0] "."] 0] +1]
+ set pos2 [lindex [split [$E search -regexp -- "\[^ \]$" insert end] "."] 0]
+ if {$pos1 == ""} {set pos1 1}
+ if {$pos2 == ""} {set pos2 [lindex [split [$E index end] "."] 0]}
+ Line_unbreaking $E $pos1 $pos2
+ }
+}
+@
+
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d6 5
+a10 1
+ set i 1
+d12 7
+a18 5
+ set pos [$E search -- " " $i.$line_breaking_chars "$i.$line_breaking_chars lineend"]
+ if {[lindex [split $pos "."] 0] == $i} {
+ if {[string compare [$E get "$pos + 1c"] "\n"] !=0} {
+ $E insert "$pos + 1c" "\n"
+ incr END
+a23 1
+ set i 1
+d27 4
+a30 1
+ $E delete "$i.0 lineend"
+@
diff --git a/support/tcltexed/lib/RCS/options.tcl,v b/support/tcltexed/lib/RCS/options.tcl,v
new file mode 100644
index 0000000000..60066c3879
--- /dev/null
+++ b/support/tcltexed/lib/RCS/options.tcl,v
@@ -0,0 +1,164 @@
+head 1.3;
+access;
+symbols;
+locks
+ mys:1.3; strict;
+comment @# @;
+
+
+1.3
+date 2001.01.23.21.07.16; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.3
+log
+@+bre
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+################################################################
+# Options
+################################################################
+proc SaveOptions {} {
+ global wsearch_gb KlammerFlag syntax_flag log_flag Package inifile myown Tcltexed_Version language tft_size
+ set f [open $inifile w]
+ #Get text to save
+ lappend liste $Tcltexed_Version $wsearch_gb $KlammerFlag $syntax_flag $log_flag "[array get Package]" "[array get myown]" $language $tft_size
+ #Save it
+ puts $f $liste
+ #and close file
+ close $f
+}
+################################################################
+proc LoadOptions {} {
+ global wsearch_gb KlammerFlag syntax_flag log_flag Package PLISTE bhtpath I_flag inifile myown Tcltexed_Version language tft_size
+
+ foreach {i n} $PLISTE {
+ set Package($i) 0
+ }
+ set Package(latex) 1
+
+ if [file exists $inifile] then {
+ set f [open $inifile r]
+ #Get text to save
+ set liste [gets $f]
+ if {[lindex $liste 0] == $Tcltexed_Version} {
+ set wsearch_gb [lindex $liste 1]
+ set KlammerFlag [lindex $liste 2]
+ set syntax_flag [lindex $liste 3]
+ set log_flag [lindex $liste 4]
+ array set Package [lindex $liste 5]
+ array set myown [lindex $liste 6]
+ set language [lindex $liste 7]
+ set tft_size [lindex $liste 8]
+ }
+ close $f
+ }
+ foreach {i n} $PLISTE {
+ if $Package($i) then {
+ set I_file $bhtpath/$i.bht
+ set I_flag 1
+ source $bhtpath/$i.bht
+ }
+ }
+}
+
+
+@
+
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@d6 1
+a6 1
+ global wsearch_gb KlammerFlag syntax_flag Package inifile myown Tcltexed_Version language tft_size
+d9 1
+a9 1
+ lappend liste $Tcltexed_Version $wsearch_gb $KlammerFlag $syntax_flag "[array get Package]" "[array get myown]" $language $tft_size
+d17 1
+a17 1
+ global wsearch_gb KlammerFlag syntax_flag Package PLISTE bhtpath I_flag inifile myown Tcltexed_Version language tft_size
+d32 5
+a36 4
+ array set Package [lindex $liste 4]
+ array set myown [lindex $liste 5]
+ set language [lindex $liste 6]
+ set tft_size [lindex $liste 7]
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 48
+a48 48
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+################################################################
+# Options
+################################################################
+proc SaveOptions {} {
+ global wsearch_gb KlammerFlag syntax_flag Package inifile myown Tcltexed_Version language tft_size
+ set f [open $inifile w]
+ #Get text to save
+ lappend liste $Tcltexed_Version $wsearch_gb $KlammerFlag $syntax_flag "[array get Package]" "[array get myown]" $language $tft_size
+ #Save it
+ puts $f $liste
+ #and close file
+ close $f
+}
+################################################################
+proc LoadOptions {} {
+ global wsearch_gb KlammerFlag syntax_flag Package PLISTE bhtpath I_flag inifile myown Tcltexed_Version language tft_size
+
+ foreach {i n} $PLISTE {
+ set Package($i) 0
+ }
+ set Package(latex) 1
+
+ if [file exists $inifile] then {
+ set f [open $inifile r]
+ #Get text to save
+ set liste [gets $f]
+ if {[lindex $liste 0] == $Tcltexed_Version} {
+ set wsearch_gb [lindex $liste 1]
+ set KlammerFlag [lindex $liste 2]
+ set syntax_flag [lindex $liste 3]
+ array set Package [lindex $liste 4]
+ array set myown [lindex $liste 5]
+ set language [lindex $liste 6]
+ set tft_size [lindex $liste 7]
+ }
+ close $f
+ }
+ foreach {i n} $PLISTE {
+ if $Package($i) then {
+ set I_file $bhtpath/$i.bht
+ set I_flag 1
+ source $bhtpath/$i.bht
+ }
+ }
+}
+
+
+@
+
diff --git a/support/tcltexed/lib/RCS/search.tcl,v b/support/tcltexed/lib/RCS/search.tcl,v
new file mode 100644
index 0000000000..ec3bb08370
--- /dev/null
+++ b/support/tcltexed/lib/RCS/search.tcl,v
@@ -0,0 +1,372 @@
+head 1.3;
+access;
+symbols;
+locks
+ mys:1.3; strict;
+comment @# @;
+
+
+1.3
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 2000.04.11.19.09.28; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.3
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 2000 - Martin Strauss - under terms of GPL
+##############################################################
+# search routine
+# ok !
+proc InitSearch {} {
+ global T
+ if ![winfo exists .wsearch] then {
+ toplevel .wsearch
+ wm title .wsearch $T(wsearch-titel)
+
+ entry .wsearch.text1 -width 20 -relief sunken -background White
+ entry .wsearch.text2 -width 20 -relief sunken -background White
+
+ global wsearch_gb
+ checkbutton .wsearch.butgb -variable wsearch_gb -text $T(wsearch-case-sensitive)
+
+ button .wsearch.but1 -text $T(wsearch-top) -command {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ set Text [.wsearch.text1 get]
+ if !$wsearch_gb then {set comm "-nocase --"} else {set comm "--"}
+ set ksp [$FocusEditor.te.edit1 search $comm $Text 1.0]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert $ksp
+ $FocusEditor.te.edit1 see insert
+ $FocusEditor.te.edit1 tag remove sel 1.0 end
+ $FocusEditor.te.edit1 tag add sel insert insert+[string length $Text]c
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}
+ frame .wsearch.f1
+
+ button .wsearch.f1.but2 -text $T(wsearch-down) -command {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ set Text [.wsearch.text1 get]
+ if !$wsearch_gb then {set comm "-nocase --"} else {set comm "--"}
+ set ksp [$FocusEditor.te.edit1 search $comm $Text insert+1c]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert $ksp
+ $FocusEditor.te.edit1 see insert
+ $FocusEditor.te.edit1 tag remove sel 1.0 end
+ $FocusEditor.te.edit1 tag add sel insert insert+[string length $Text]c
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}
+
+ button .wsearch.f1.but3 -text $T(wsearch-up) -command {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ set Text [.wsearch.text1 get]
+ if {$Text != ""} then {
+ if !$wsearch_gb then {set comm "-nocase --"} else {set comm "--"}
+ set ksp [$FocusEditor.te.edit1 search -backwards $comm $Text insert]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert $ksp
+ $FocusEditor.te.edit1 see insert
+ $FocusEditor.te.edit1 tag remove sel 1.0 end
+ $FocusEditor.te.edit1 tag add sel insert insert+[string length $Text]c
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}}
+
+ frame .wsearch.f2
+
+ button .wsearch.f2.but4 -text $T(wsearch-replace) -command {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ set FIND [.wsearch.text1 get]
+ set FIND_L [string length $FIND]
+ if {$FIND != ""} then {
+ set NOW [$FocusEditor.te.edit1 get insert "insert + $FIND_L chars"]
+ if ![string compare $NOW $FIND] then {
+ # Ersetzt
+ undo_switch $FocusEditor.te.edit1 "Save {insert \"insert + $FIND_L chars\"} Delete UndoBegin"
+ set REPLACE [.wsearch.text2 get]
+ $FocusEditor.te.edit1 insert insert $REPLACE
+ $FocusEditor.te.edit1 see insert
+ undo_switch $FocusEditor.te.edit1 {UndoEnd Save UndoMax}
+ event generate $FocusEditor.te.edit1 <<Modified>>
+ }
+ # Sucht
+ if !$wsearch_gb then {set comm "-nocase --"} else {set comm "--"}
+ set ksp [$FocusEditor.te.edit1 search $comm $FIND insert]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert $ksp
+ $FocusEditor.te.edit1 see insert
+ $FocusEditor.te.edit1 tag remove sel 1.0 end
+ $FocusEditor.te.edit1 tag add sel insert insert+[string length $FIND]c
+ $FocusEditor.te.edit1 mark set sel.first insert
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}}
+
+ button .wsearch.f2.but5 -text $T(wsearch-all) -command {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ set FIND [.wsearch.text1 get]
+ set FIND_L [string length "$FIND"]
+ if {$FIND != ""} then {
+ set REPLACE [.wsearch.text2 get]
+ set modifiedflag 0
+ if !$wsearch_gb then {set comm "-nocase --"} else {set comm "--"}
+ undo_switch $FocusEditor.te.edit1 Save
+ set startindex [$FocusEditor.te.edit1 index insert]
+ set nowindex 1.0
+ while {$nowindex != ""} {
+ $FocusEditor.te.edit1 mark set insert $nowindex
+ set NOW [$FocusEditor.te.edit1 get insert "insert + $FIND_L chars"]
+ if ![string compare $NOW $FIND] then {
+ # Ersetzt
+ undo_switch $FocusEditor.te.edit1 "{insert \"insert + $FIND_L chars\"} Delete UndoBegin"
+ $FocusEditor.te.edit1 insert insert $REPLACE
+ undo_switch $FocusEditor.te.edit1 {UndoEnd Save}
+ set startindex [$FocusEditor.te.edit1 index insert]
+ set modifiedflag 1
+ }
+ # Sucht
+ set nowindex [$FocusEditor.te.edit1 search $comm $FIND insert end]
+ }
+ $FocusEditor.te.edit1 mark set insert $startindex
+ if $modifiedflag {
+ event generate $FocusEditor.te.edit1 <<Modified>>
+ }
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }
+ }
+ }
+
+ button .wsearch.butQ -text $T(quit) -command {
+ destroy .wsearch
+ }
+ pack .wsearch.f1.but2 -side left
+ pack .wsearch.f1.but3 -side right
+ pack .wsearch.f2.but4 .wsearch.f2.but5 -side left
+ pack .wsearch.text1 .wsearch.but1 .wsearch.f1 .wsearch.butgb .wsearch.text2\
+.wsearch.f2 .wsearch.butQ
+ wm minsize . 1 1
+ bind .wsearch <<Help>> {Help tcltexed_hlp $T(wsearch-Help)}
+ bind .wsearch <Control-c> {
+ destroy .wsearch
+ }
+ wm resizable .wsearch 0 0
+ COLOR .wsearch
+ .wsearch.text1 configure -background White
+ .wsearch.text2 configure -background White
+ menu .wsearch.text1.pop_menu
+ .wsearch.text1.pop_menu add command -label $T(pop_menu-Cut) -command "event generate .wsearch.text1 <<Cut>>"
+ .wsearch.text1.pop_menu add command -label $T(pop_menu-Copy) -command "event generate wsearch.text1 <<Copy>>"
+ .wsearch.text1.pop_menu add command -label $T(pop_menu-Paste) -command "event generate .wsearch.text1 <<Paste>>"
+ .wsearch.text1.pop_menu add command -label $T(pop_menu-Clear) -command "event generate .wsearch.text1 <<Clear>>"
+ menu .wsearch.text2.pop_menu
+ .wsearch.text2.pop_menu add command -label $T(pop_menu-Cut) -command "event generate .wsearch.text2 <<Cut>>"
+ .wsearch.text2.pop_menu add command -label $T(pop_menu-Copy) -command "event generate .wsearch.text2 <<Copy>>"
+ .wsearch.text2.pop_menu add command -label $T(pop_menu-Paste) -command "event generate .wsearch.text2 <<Paste>>"
+ .wsearch.text2.pop_menu add command -label $T(pop_menu-Clear) -command "event generate .wsearch.text2 <<Clear>>"
+
+ bind .wsearch.text1 <Button-3> "tk_popup .wsearch.text1.pop_menu \[winfo pointerx .wsearch\] \[winfo pointery .wsearch\]"
+ bind .wsearch.text2 <Button-3> "tk_popup .wsearch.text2.pop_menu \[winfo pointerx .wsearch\] \[winfo pointery .wsearch\]"
+
+ } else {focus .wsearch}
+}
+@
+
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@d1 158
+a158 159
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+##############################################################
+# search routine
+# ok !
+proc InitSearch {} {
+ global T
+ if ![winfo exists .wsearch] then {
+ toplevel .wsearch
+ wm title .wsearch $T(wsearch-titel)
+
+ entry .wsearch.text1 -width 20 -relief sunken -background White
+ entry .wsearch.text2 -width 20 -relief sunken -background White
+
+ global wsearch_gb
+ checkbutton .wsearch.butgb -variable wsearch_gb -text $T(wsearch-case-sensitive)
+
+ button .wsearch.but1 -text $T(wsearch-top) -command {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ set Text [.wsearch.text1 get]
+ if !$wsearch_gb then {set comm "-nocase --"} else {set comm "--"}
+ set ksp [$FocusEditor.te.edit1 search $comm $Text 1.0]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert $ksp
+ $FocusEditor.te.edit1 see insert
+ $FocusEditor.te.edit1 tag remove sel 1.0 end
+ $FocusEditor.te.edit1 tag add sel insert insert+[string length $Text]c
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}
+ frame .wsearch.f1
+
+ button .wsearch.f1.but2 -text $T(wsearch-down) -command {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ set Text [.wsearch.text1 get]
+ if !$wsearch_gb then {set comm "-nocase --"} else {set comm "--"}
+ set ksp [$FocusEditor.te.edit1 search $comm $Text insert+1c]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert $ksp
+ $FocusEditor.te.edit1 see insert
+ $FocusEditor.te.edit1 tag remove sel 1.0 end
+ $FocusEditor.te.edit1 tag add sel insert insert+[string length $Text]c
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}
+
+ button .wsearch.f1.but3 -text $T(wsearch-up) -command {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ set Text [.wsearch.text1 get]
+ if {$Text != ""} then {
+ if !$wsearch_gb then {set comm "-nocase --"} else {set comm "--"}
+ set ksp [$FocusEditor.te.edit1 search -backwards $comm $Text insert]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert $ksp
+ $FocusEditor.te.edit1 see insert
+ $FocusEditor.te.edit1 tag remove sel 1.0 end
+ $FocusEditor.te.edit1 tag add sel insert insert+[string length $Text]c
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}}
+
+ frame .wsearch.f2
+
+ button .wsearch.f2.but4 -text $T(wsearch-replace) -command {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ set FIND [.wsearch.text1 get]
+ set FIND_L [string length $FIND]
+ if {$FIND != ""} then {
+ set NOW [$FocusEditor.te.edit1 get insert "insert + $FIND_L chars"]
+ if ![string compare $NOW $FIND] then {
+ # Ersetzt
+ undo_switch $FocusEditor.te.edit1 "Save {insert \"insert + $FIND_L chars\"} Delete UndoBegin"
+ set REPLACE [.wsearch.text2 get]
+ $FocusEditor.te.edit1 insert insert $REPLACE
+ $FocusEditor.te.edit1 see insert
+ undo_switch $FocusEditor.te.edit1 {UndoEnd Save UndoMax}
+ event generate $FocusEditor.te.edit1 <<Modified>>
+ }
+ # Sucht
+ if !$wsearch_gb then {set comm "-nocase --"} else {set comm "--"}
+ set ksp [$FocusEditor.te.edit1 search $comm $FIND insert]
+ if {$ksp != ""} then {
+ $FocusEditor.te.edit1 mark set insert $ksp
+ $FocusEditor.te.edit1 see insert
+ $FocusEditor.te.edit1 tag remove sel 1.0 end
+ $FocusEditor.te.edit1 tag add sel insert insert+[string length $FIND]c
+ $FocusEditor.te.edit1 mark set sel.first insert
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }}}}
+
+ button .wsearch.f2.but5 -text $T(wsearch-all) -command {
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ set FIND [.wsearch.text1 get]
+ set FIND_L [string length "$FIND"]
+ if {$FIND != ""} then {
+ set REPLACE [.wsearch.text2 get]
+ set modifiedflag 0
+ if !$wsearch_gb then {set comm "-nocase --"} else {set comm "--"}
+ undo_switch $FocusEditor.te.edit1 Save
+ set startindex [$FocusEditor.te.edit1 index insert]
+ set nowindex 1.0
+ while {$nowindex != ""} {
+ $FocusEditor.te.edit1 mark set insert $nowindex
+ set NOW [$FocusEditor.te.edit1 get insert "insert + $FIND_L chars"]
+ if ![string compare $NOW $FIND] then {
+ # Ersetzt
+ undo_switch $FocusEditor.te.edit1 "{insert \"insert + $FIND_L chars\"} Delete UndoBegin"
+ $FocusEditor.te.edit1 insert insert $REPLACE
+ undo_switch $FocusEditor.te.edit1 {UndoEnd Save}
+ set startindex [$FocusEditor.te.edit1 index insert]
+ set modifiedflag 1
+ }
+ # Sucht
+ set nowindex [$FocusEditor.te.edit1 search $comm $FIND insert end]
+ }
+ $FocusEditor.te.edit1 mark set insert $startindex
+ if $modifiedflag {
+ undo_switch $FocusEditor.te.edit1 Save
+ event generate $FocusEditor.te.edit1 <<Modified>>
+ }
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }
+ }
+ }
+
+ button .wsearch.butQ -text $T(quit) -command {
+ destroy .wsearch
+ }
+ pack .wsearch.f1.but2 -side left
+ pack .wsearch.f1.but3 -side right
+ pack .wsearch.f2.but4 .wsearch.f2.but5 -side left
+ pack .wsearch.text1 .wsearch.but1 .wsearch.f1 .wsearch.butgb .wsearch.text2\
+.wsearch.f2 .wsearch.butQ
+ wm minsize . 1 1
+ bind .wsearch <<Help>> {Help tcltexed_hlp $T(wsearch-Help)}
+ bind .wsearch <Control-c> {
+ destroy .wsearch
+ }
+ wm resizable .wsearch 0 0
+ COLOR .wsearch
+ .wsearch.text1 configure -background White
+ .wsearch.text2 configure -background White
+ menu .wsearch.text1.pop_menu
+ .wsearch.text1.pop_menu add command -label $T(pop_menu-Cut) -command "event generate .wsearch.text1 <<Cut>>"
+ .wsearch.text1.pop_menu add command -label $T(pop_menu-Copy) -command "event generate wsearch.text1 <<Copy>>"
+ .wsearch.text1.pop_menu add command -label $T(pop_menu-Paste) -command "event generate .wsearch.text1 <<Paste>>"
+ .wsearch.text1.pop_menu add command -label $T(pop_menu-Clear) -command "event generate .wsearch.text1 <<Clear>>"
+ menu .wsearch.text2.pop_menu
+ .wsearch.text2.pop_menu add command -label $T(pop_menu-Cut) -command "event generate .wsearch.text2 <<Cut>>"
+ .wsearch.text2.pop_menu add command -label $T(pop_menu-Copy) -command "event generate .wsearch.text2 <<Copy>>"
+ .wsearch.text2.pop_menu add command -label $T(pop_menu-Paste) -command "event generate .wsearch.text2 <<Paste>>"
+ .wsearch.text2.pop_menu add command -label $T(pop_menu-Clear) -command "event generate .wsearch.text2 <<Clear>>"
+
+ bind .wsearch.text1 <Button-3> "tk_popup .wsearch.text1.pop_menu \[winfo pointerx .wsearch\] \[winfo pointery .wsearch\]"
+ bind .wsearch.text2 <Button-3> "tk_popup .wsearch.text2.pop_menu \[winfo pointerx .wsearch\] \[winfo pointery .wsearch\]"
+
+ } else {focus .wsearch}
+}
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d110 2
+a111 1
+ undo_switch $FocusEditor.te.edit1 UndoEnd
+@
+
diff --git a/support/tcltexed/lib/RCS/spelling.tcl,v b/support/tcltexed/lib/RCS/spelling.tcl,v
new file mode 100644
index 0000000000..5bb42534e0
--- /dev/null
+++ b/support/tcltexed/lib/RCS/spelling.tcl,v
@@ -0,0 +1,229 @@
+head 1.2;
+access;
+symbols;
+locks
+ mys:1.2; strict;
+comment @# @;
+
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+##############################################################
+proc spell {E mode spell_start spell_end} {
+ global T spell_not spell_array spell_yes spell_flag
+ if $spell_flag {
+ set spell_flag 0
+ switch $mode add {
+ if {[lsearch -exact [$E tag names insert] spell] != -1} {
+ set ksp1 [$E search -backwards -regexp -- $spell_yes insert {insert linestart}]
+ if {$ksp1 == ""} {set ksp1 "insert linestart"} else {append ksp1 +1c}
+ set ksp2 [$E search -forwards -regexp -- $spell_yes insert {insert lineend}]
+ if {$ksp2 == ""} {set ksp2 "insert lineend"}
+ set I [$E get $ksp1 $ksp2]
+ switch [tk_messageBox -parent $E -type okcancel -icon question -message $T(spell-1)$I$T(spell-2)] ok {
+ if ![info exists spell_array($I)] {
+ set spell_array($I) O
+ set I_s "spell + [string length $I] chars"
+ set I_s1 "spell + [expr [string length $I] +1 ] chars"
+ set nowindex [$E search -- $I $spell_start $spell_end]
+ while {$nowindex != ""} {
+ $E mark set spell $nowindex
+ set ksp1 [$E get spell-1c spell]
+ set ksp2 [$E get $I_s $I_s1]
+ if {[regexp -- $spell_yes $ksp1] != 0} {
+ if {[regexp -- $spell_yes $ksp2] != 0} {
+ $E tag remove spell spell $I_s
+ }
+ }
+ set nowindex [$E search -- $I spell+1c $spell_end]
+ }
+ }
+ } cancel {
+ switch [tk_messageBox -parent $E -type okcancel -icon question -message $T(spell-3)] ok {
+ $E mark set insert "insert wordstart"
+ InitSearch
+ .wsearch.text1 delete 0 end
+ .wsearch.text1 insert 0 $I
+ .wsearch.text2 delete 0 end
+ .wsearch.text2 insert 0 $I
+ }
+ }
+ }
+ } show {
+ $E tag remove spell $spell_start $spell_end
+ set last ""
+ set LISTE [lsort [split [$E get $spell_start $spell_end] $spell_yes]]
+ foreach I $LISTE {
+ if {[string compare $last $I]!=0} {
+ if {[regexp -- $spell_not $I] == 0} {
+ if {![info exists spell_array($I)]} {
+ if {$I != ""} {
+ set I_s "spell + [string length $I] chars"
+ set I_s1 "spell + [expr [string length $I] +1 ] chars"
+ set nowindex [$E search -- $I $spell_start $spell_end]
+ while {$nowindex != ""} {
+ $E mark set spell $nowindex
+ set ksp1 [$E get spell-1c spell]
+ set ksp2 [$E get $I_s $I_s1]
+ if {[regexp -- $spell_yes $ksp1] != 0} {
+ if {[regexp -- $spell_yes $ksp2] != 0} {
+ $E tag add spell spell $I_s
+ }
+ }
+ set nowindex [$E search -- $I spell+1c $spell_end]
+ }
+ }}}}
+ set last $I
+ }
+ }
+ set spell_flag 1
+}}
+proc spell_load {} {
+ global spellfile spellfileown language I_befehl spell_array
+ if [file exists $spellfileown$language] then {
+ set f [open $spellfileown$language r]
+ set LISTE [gets $f]
+ close $f
+ foreach I $LISTE {set spell_array($I) O}
+ }
+ if [file exists $spellfile$language] then {
+ set f [open $spellfile$language r]
+ set LISTE [gets $f]
+ close $f
+ foreach I $LISTE {set spell_array($I) G}
+ }
+}
+proc spell_save {} {
+ global spellfileown language spell_array
+ set LISTE ""
+ set L [array get spell_array]
+ foreach {I V} $L {if {$V == "O"} {lappend LISTE $I}}
+ set f [open $spellfileown$language w]
+ puts $f [lsort $LISTE]
+ close $f
+}
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 95
+a95 95
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+##############################################################
+proc spell {E mode spell_start spell_end} {
+ global T spell_not spell_array spell_yes spell_flag
+ if $spell_flag {
+ set spell_flag 0
+ switch $mode add {
+ if {[lsearch -exact [$E tag names insert] spell] != -1} {
+ set ksp1 [$E search -backwards -regexp -- $spell_yes insert {insert linestart}]
+ if {$ksp1 == ""} {set ksp1 "insert linestart"} else {append ksp1 +1c}
+ set ksp2 [$E search -forwards -regexp -- $spell_yes insert {insert lineend}]
+ if {$ksp2 == ""} {set ksp2 "insert lineend"}
+ set I [$E get $ksp1 $ksp2]
+ switch [tk_messageBox -parent $E -type okcancel -icon question -message $T(spell-1)$I$T(spell-2)] ok {
+ if ![info exists spell_array($I)] {
+ set spell_array($I) O
+ set I_s "spell + [string length $I] chars"
+ set I_s1 "spell + [expr [string length $I] +1 ] chars"
+ set nowindex [$E search -- $I $spell_start $spell_end]
+ while {$nowindex != ""} {
+ $E mark set spell $nowindex
+ set ksp1 [$E get spell-1c spell]
+ set ksp2 [$E get $I_s $I_s1]
+ if {[regexp -- $spell_yes $ksp1] != 0} {
+ if {[regexp -- $spell_yes $ksp2] != 0} {
+ $E tag remove spell spell $I_s
+ }
+ }
+ set nowindex [$E search -- $I spell+1c $spell_end]
+ }
+ }
+ } cancel {
+ switch [tk_messageBox -parent $E -type okcancel -icon question -message $T(spell-3)] ok {
+ $E mark set insert "insert wordstart"
+ InitSearch
+ .wsearch.text1 delete 0 end
+ .wsearch.text1 insert 0 $I
+ .wsearch.text2 delete 0 end
+ .wsearch.text2 insert 0 $I
+ }
+ }
+ }
+ } show {
+ $E tag remove spell $spell_start $spell_end
+ set last ""
+ set LISTE [lsort [split [$E get $spell_start $spell_end] $spell_yes]]
+ foreach I $LISTE {
+ if {[string compare $last $I]!=0} {
+ if {[regexp -- $spell_not $I] == 0} {
+ if {![info exists spell_array($I)]} {
+ if {$I != ""} {
+ set I_s "spell + [string length $I] chars"
+ set I_s1 "spell + [expr [string length $I] +1 ] chars"
+ set nowindex [$E search -- $I $spell_start $spell_end]
+ while {$nowindex != ""} {
+ $E mark set spell $nowindex
+ set ksp1 [$E get spell-1c spell]
+ set ksp2 [$E get $I_s $I_s1]
+ if {[regexp -- $spell_yes $ksp1] != 0} {
+ if {[regexp -- $spell_yes $ksp2] != 0} {
+ $E tag add spell spell $I_s
+ }
+ }
+ set nowindex [$E search -- $I spell+1c $spell_end]
+ }
+ }}}}
+ set last $I
+ }
+ }
+ set spell_flag 1
+}}
+proc spell_load {} {
+ global spellfile spellfileown language I_befehl spell_array
+ if [file exists $spellfileown$language] then {
+ set f [open $spellfileown$language r]
+ set LISTE [gets $f]
+ close $f
+ foreach I $LISTE {set spell_array($I) O}
+ }
+ if [file exists $spellfile$language] then {
+ set f [open $spellfile$language r]
+ set LISTE [gets $f]
+ close $f
+ foreach I $LISTE {set spell_array($I) G}
+ }
+}
+proc spell_save {} {
+ global spellfileown language spell_array
+ set LISTE ""
+ set L [array get spell_array]
+ foreach {I V} $L {if {$V == "O"} {lappend LISTE $I}}
+ set f [open $spellfileown$language w]
+ puts $f [lsort $LISTE]
+ close $f
+}
+@
+
diff --git a/support/tcltexed/lib/RCS/syntax.tcl,v b/support/tcltexed/lib/RCS/syntax.tcl,v
new file mode 100644
index 0000000000..c1f3396c56
--- /dev/null
+++ b/support/tcltexed/lib/RCS/syntax.tcl,v
@@ -0,0 +1,147 @@
+head 1.2;
+access;
+symbols;
+locks
+ mys:1.2; strict;
+comment @# @;
+
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+#######################################################
+# Farbige Syntax
+# ok !
+proc Syntax {E START END} {
+ global I_befehl syntax_flag
+ if $syntax_flag {
+ set NEW_syntax [$E search "\\" $START $END]
+ if {$NEW_syntax != ""} {
+ $E tag remove syntax_green $NEW_syntax $END
+ $E tag remove syntax_red $NEW_syntax $END
+ $E tag remove syntax_blue $NEW_syntax $END
+ set LISTE [array names I_befehl]
+ lappend LISTE "$" "\\" "\[" "\]" "\{" "\}" ";" "." "-"
+ while {$NEW_syntax != ""} {
+ $E mark set syntax $NEW_syntax
+ if {[$E get syntax-1c syntax] != "\\"} {
+ set ksp [lsearch -exact $LISTE [$E get syntax+1c {syntax+1c wordend}]]
+ if {$ksp == -1} {
+ $E tag add syntax_red syntax {syntax+1c wordend}
+ } else {
+ $E tag add syntax_green syntax {syntax+1c wordend}
+ }
+ } elseif {[$E get syntax-2c syntax-1c] != "\\"} {
+ set ksp [lsearch -exact $LISTE [$E get syntax+1c {syntax+1c wordend}]]
+ if {$ksp == -1} {
+ $E tag add syntax_red syntax {syntax+1c wordend}
+ } else {
+ $E tag add syntax_green syntax {syntax+1c wordend}
+ }
+ }
+ set NEW_syntax [$E search "\\" syntax+1c $END]
+ }
+ set NEW_syntax [$E search "%" $START $END]
+ while {$NEW_syntax != ""} {
+ $E mark set syntax $NEW_syntax
+ if {[$E get syntax-1c syntax] != "\\"} {
+ $E tag add syntax_blue syntax {syntax lineend}
+ $E tag remove syntax_red syntax {syntax lineend}
+ } else {
+ $E tag add syntax_green syntax-1c syntax+1c
+ $E tag remove syntax_red syntax-1c syntax+1c
+ }
+ set NEW_syntax [$E search "%" syntax+1c $END]
+ }
+
+ set NEW_syntax [$E search "$" $START $END]
+ while {$NEW_syntax != ""} {
+ $E mark set syntax $NEW_syntax
+ $E tag add syntax_green syntax syntax+1c
+ $E tag remove syntax_red syntax syntax+1c
+ set NEW_syntax [$E search "$" syntax+1c $END]
+ }
+}}}
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 54
+a54 54
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+#######################################################
+# Farbige Syntax
+# ok !
+proc Syntax {E START END} {
+ global I_befehl syntax_flag
+ if $syntax_flag {
+ set NEW_syntax [$E search "\\" $START $END]
+ if {$NEW_syntax != ""} {
+ $E tag remove syntax_green $NEW_syntax $END
+ $E tag remove syntax_red $NEW_syntax $END
+ $E tag remove syntax_blue $NEW_syntax $END
+ set LISTE [array names I_befehl]
+ lappend LISTE "$" "\\" "\[" "\]" "\{" "\}" ";" "." "-"
+ while {$NEW_syntax != ""} {
+ $E mark set syntax $NEW_syntax
+ if {[$E get syntax-1c syntax] != "\\"} {
+ set ksp [lsearch -exact $LISTE [$E get syntax+1c {syntax+1c wordend}]]
+ if {$ksp == -1} {
+ $E tag add syntax_red syntax {syntax+1c wordend}
+ } else {
+ $E tag add syntax_green syntax {syntax+1c wordend}
+ }
+ } elseif {[$E get syntax-2c syntax-1c] != "\\"} {
+ set ksp [lsearch -exact $LISTE [$E get syntax+1c {syntax+1c wordend}]]
+ if {$ksp == -1} {
+ $E tag add syntax_red syntax {syntax+1c wordend}
+ } else {
+ $E tag add syntax_green syntax {syntax+1c wordend}
+ }
+ }
+ set NEW_syntax [$E search "\\" syntax+1c $END]
+ }
+ set NEW_syntax [$E search "%" $START $END]
+ while {$NEW_syntax != ""} {
+ $E mark set syntax $NEW_syntax
+ if {[$E get syntax-1c syntax] != "\\"} {
+ $E tag add syntax_blue syntax {syntax lineend}
+ $E tag remove syntax_red syntax {syntax lineend}
+ } else {
+ $E tag add syntax_green syntax-1c syntax+1c
+ $E tag remove syntax_red syntax-1c syntax+1c
+ }
+ set NEW_syntax [$E search "%" syntax+1c $END]
+ }
+
+ set NEW_syntax [$E search "$" $START $END]
+ while {$NEW_syntax != ""} {
+ $E mark set syntax $NEW_syntax
+ $E tag add syntax_green syntax syntax+1c
+ $E tag remove syntax_red syntax syntax+1c
+ set NEW_syntax [$E search "$" syntax+1c $END]
+ }
+}}}
+@
+
diff --git a/support/tcltexed/lib/RCS/translate0.tcl,v b/support/tcltexed/lib/RCS/translate0.tcl,v
new file mode 100644
index 0000000000..23af7fad67
--- /dev/null
+++ b/support/tcltexed/lib/RCS/translate0.tcl,v
@@ -0,0 +1,332 @@
+head 1.7;
+access;
+symbols;
+locks
+ mys:1.7; strict;
+comment @# @;
+
+
+1.7
+date 2001.01.23.21.07.16; author mys; state Exp;
+branches;
+next 1.6;
+
+1.6
+date 2000.11.26.18.20.03; author mys; state Exp;
+branches;
+next 1.5;
+
+1.5
+date 2000.10.12.15.03.31; author mys; state Exp;
+branches;
+next 1.4;
+
+1.4
+date 2000.08.15.23.03.59; author mys; state Exp;
+branches;
+next 1.3;
+
+1.3
+date 2000.08.15.22.34.13; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.7
+log
+@+bre
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+# english version
+set LISTE [list \
+language "eng"\
+wsearch-titel Search\
+wsearch-Help Search\
+wsearch-case-sensitive "case sensitive"\
+wsearch-top Search\
+wsearch-down down\
+wsearch-up up\
+wsearch-replace replace\
+wsearch-all all\
+whelp-titel Help\
+whelp-no-source "No Source \$hlppath/\$FILE.txt"\
+Helpto-Help ""\
+wversion-titel Version\
+wversion-text "TclTexEd Version $Tcltexed_Version"\
+wlatex-titel LaTeX\
+wlatex-Help Help\
+wTcltexed-titel Manual\
+wTcltexed-Help Help\
+wTcltexed-manual {Tcltexed tcltexed_hlp\
+ Editor editor_hlp\
+ Editor-keymap editort_hlp\
+ Readme readme_hlp\
+ Copyright copyright_hlp\
+ Gnu-Puplic-License gpl_hlp}\
+wmsg-titel Message\
+wmyown-titel "My Own"\
+wmyown-Help "My"\
+wcurser-titel "Goto"\
+wcurser-goto "Goto"\
+wcurser-gotocurser "Goto Curser Position"\
+BHTERROR1 "Error within sourcefile\nLaTeX-command all ready in use :\nSourcefile"\
+BHTERROR2 "\nName "\
+BHTERROR3 "\nCommand "\
+EDITORQUIT "Save changes ?"\
+EDITOR-latex latex\
+EDITOR-xdvi xdvi\
+EDITOR-dvips dvips\
+EDITOR-ghostview ghostview\
+EDITOR-ispell ispell\
+EDITOR-ZS L.C\
+EDITOR-Syntax Syntax\
+pop_menu-Undo Undo\
+pop_menu-Cut Cut\
+pop_menu-Copy Copy\
+pop_menu-Paste Paste\
+pop_menu-Clear Clear\
+pop_menu-Spell Spell\
+pop_menu-Block Block\
+pop_menu-plus "+ %"\
+pop_menu-minus "- %"\
+pop_menu-more "..."\
+MW-File File\
+MW-Edit Edit\
+MW-Options Options\
+MW-Help Help\
+MW-New New...\
+MW-Load Open...\
+MW-Append Append...\
+MW-Save Save\
+MW-SaveAs "Save As..."\
+MW-Reload "Reload"\
+MW-Quit Quit\
+MW-Clear Clear\
+MW-Clear-msg "Delete everything ?"\
+MW-Spelling "Spelling"\
+MW-Spell "add word"\
+MW-Umlaut_with "\\\"a..\\ss -> ä..ß"\
+MW-Umlaut_without "ä..ß -> \\\"a..\\ss"\
+MW-UmlautGerman_with "\"a..\"s -> ä..ß"\
+MW-UmlautGerman_without "ä..ß -> \"a..\"s"\
+MW-Search Search\
+MW-MyOwn "My Own"\
+MW-Version "Version Info"\
+MW-Tcltexed "Tcltexed Manual"\
+MW-LaTeX "LaTeX Commands"\
+MW-AutoKlammerZu AutoBrackets\
+MW-Syntax Syntax\
+MW-Packages "Packages/etc"\
+MW-language language\
+MW-size "font size"\
+MW-english english\
+MW-german german\
+MW-indonesia Indonesia\
+MW-bre brazilian\
+MW-language-msg "Now save the options\nand restart tcltexed\nto have an effect !"\
+MW-SaveOptions "Save Options"\
+MW-log "Trace log"\
+LB-breakline "break lines"\
+LB-all "all in file"\
+LB-section "all in section"\
+LB-line "all in line"\
+LB-unall "undo all in file"\
+LB-unsection "undo all in section"\
+LB-unline "undo all in line"\
+ALLQUIT1 "Save changes before leaving ?"\
+ALLQUIT2 "Save everything ?"\
+ALLQUIT3 "Save this file ?\n"\
+Save Save\
+SaveAs SaveAs\
+more more\
+cancel Cancel\
+quit Quit\
+Quit Quit\
+spell-1 "Add\n\""\
+spell-2 "\"\nto list of known words"\
+spell-3 "Correct yourself"\
+FileUpToDate "File on Disk has been modified,\nreload it before continue ?"\
+]
+array set T $LISTE
+
+# (w* Fenster mit Namen *)
+# w*-Help -> Suchbegriff bei Hilfe
+# w*-titel -> Fenstertitel
+@
+
+
+1.6
+log
+@*** empty log message ***
+@
+text
+@d87 1
+d90 1
+@
+
+
+1.5
+log
+@*** empty log message ***
+@
+text
+@d64 1
+d108 1
+@
+
+
+1.4
+log
+@*** empty log message ***
+@
+text
+@d85 1
+@
+
+
+1.3
+log
+@*** empty log message ***
+@
+text
+@d16 2
+d75 1
+@
+
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@d40 1
+d69 2
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 105
+a105 103
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+# english version
+set LISTE [list \
+language "eng"\
+wsearch-titel Search\
+wsearch-Help Search\
+wsearch-case-sensitive "case sensitive"\
+wsearch-top Search\
+wsearch-down down\
+wsearch-up up\
+wsearch-replace replace\
+wsearch-all all\
+whelp-titel Help\
+whelp-no-source "No Source \$hlppath/\$FILE.txt"\
+Helpto-Help ""\
+wlatex-titel LaTeX\
+wlatex-Help Help\
+wTcltexed-titel Manual\
+wTcltexed-Help Help\
+wTcltexed-manual {Tcltexed tcltexed_hlp\
+ Editor editor_hlp\
+ Editor-keymap editort_hlp\
+ Readme readme_hlp\
+ Copyright copyright_hlp\
+ Gnu-Puplic-License gpl_hlp}\
+wmsg-titel Message\
+wmyown-titel "My Own"\
+wmyown-Help "My"\
+wcurser-titel "Goto"\
+wcurser-goto "Goto"\
+wcurser-gotocurser "Goto Curser Position"\
+BHTERROR1 "Error within sourcefile\nLaTeX-command all ready in use :\nSourcefile"\
+BHTERROR2 "\nName "\
+BHTERROR3 "\nCommand "\
+EDITORQUIT "Save changes ?"\
+EDITOR-latex latex\
+EDITOR-xdvi xdvi\
+EDITOR-dvips dvips\
+EDITOR-ghostview ghostview\
+EDITOR-ZS L.C\
+EDITOR-Syntax Syntax\
+pop_menu-Undo Undo\
+pop_menu-Cut Cut\
+pop_menu-Copy Copy\
+pop_menu-Paste Paste\
+pop_menu-Clear Clear\
+pop_menu-Spell Spell\
+pop_menu-Block Block\
+pop_menu-plus "+ %"\
+pop_menu-minus "- %"\
+pop_menu-more "..."\
+MW-File File\
+MW-Edit Edit\
+MW-Options Options\
+MW-Help Help\
+MW-New New...\
+MW-Load Open...\
+MW-Append Append...\
+MW-Save Save\
+MW-SaveAs "Save As..."\
+MW-Quit Quit\
+MW-Clear Clear\
+MW-Clear-msg "Delete everything ?"\
+MW-Spelling "Spelling"\
+MW-Spell "add word"\
+MW-Search Search\
+MW-MyOwn "My Own"\
+MW-Tcltexed "Tcltexed Manual"\
+MW-LaTeX "LaTeX Commands"\
+MW-AutoKlammerZu AutoBrackets\
+MW-Syntax Syntax\
+MW-Packages "Packages/etc"\
+MW-language language\
+MW-size "font size"\
+MW-english english\
+MW-german german\
+MW-language-msg "Now save the options\nand restart tcltexed\nto have an effect !"\
+MW-SaveOptions "Save Options"\
+LB-breakline "break lines"\
+LB-all "all in file"\
+LB-section "all in section"\
+LB-line "all in line"\
+LB-unall "undo all in file"\
+LB-unsection "undo all in section"\
+LB-unline "undo all in line"\
+ALLQUIT1 "Save changes before leaving ?"\
+ALLQUIT2 "Save everything ?"\
+ALLQUIT3 "Save this file ?\n"\
+Save Save\
+SaveAs SaveAs\
+more more\
+cancel Cancel\
+quit Quit\
+Quit Quit\
+spell-1 "Add\n\""\
+spell-2 "\"\nto list of known words"\
+spell-3 "Correct yourself"\
+]
+array set T $LISTE
+
+# (w* Fenster mit Namen *)
+# w*-Help -> Suchbegriff bei Hilfe
+# w*-titel -> Fenstertitel
+@
+
diff --git a/support/tcltexed/lib/RCS/translate1.tcl,v b/support/tcltexed/lib/RCS/translate1.tcl,v
new file mode 100644
index 0000000000..ab5704ca03
--- /dev/null
+++ b/support/tcltexed/lib/RCS/translate1.tcl,v
@@ -0,0 +1,361 @@
+head 1.8;
+access;
+symbols;
+locks
+ mys:1.8; strict;
+comment @# @;
+
+
+1.8
+date 2001.01.23.21.07.16; author mys; state Exp;
+branches;
+next 1.7;
+
+1.7
+date 2000.11.26.18.20.03; author mys; state Exp;
+branches;
+next 1.6;
+
+1.6
+date 2000.10.12.15.03.31; author mys; state Exp;
+branches;
+next 1.5;
+
+1.5
+date 2000.08.15.23.03.59; author mys; state Exp;
+branches;
+next 1.4;
+
+1.4
+date 2000.08.15.22.34.13; author mys; state Exp;
+branches;
+next 1.3;
+
+1.3
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 2000.04.11.19.09.28; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.8
+log
+@+bre
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+# german version
+set LISTE [list \
+language "ger"\
+wsearch-titel Search\
+wsearch-Help Search\
+wsearch-case-sensitive "case sensitive"\
+wsearch-top Search\
+wsearch-down down\
+wsearch-up up\
+wsearch-replace replace\
+wsearch-all all\
+whelp-titel Help\
+whelp-no-source "No Source \$hlppath/\$FILE.txt"\
+Helpto-Help ""\
+wversion-titel Version\
+wversion-text "TclTexEd Version $Tcltexed_Version"\
+wlatex-titel LaTeX\
+wlatex-Help Help\
+wTcltexed-titel Manual\
+wTcltexed-Help Help\
+wTcltexed-manual {Tcltexed tcltexed_hlp\
+ Editor editor_hlp\
+ Editor-Tastenbelegung editort_hlp\
+ Readme readme_hlp\
+ Copyright copyright_hlp\
+ Gnu-Puplic-License gpl_hlp}\
+wmsg-titel Message\
+wmyown-titel "My Own"\
+wmyown-Help "My"\
+wcurser-titel "Goto"\
+wcurser-goto "Goto"\
+wcurser-gotocurser "Goto Curser Position"\
+BHTERROR1 "Fehler in Quelldatei\nLaTeX-Befehl schon belegt :\nQuelldatei"\
+BHTERROR2 "\nName "\
+BHTERROR3 "\nBefehl "\
+EDITORQUIT "Save changes ?"\
+EDITOR-latex latex\
+EDITOR-xdvi xdvi\
+EDITOR-dvips dvips\
+EDITOR-ghostview ghostview\
+EDITOR-ispell ispell\
+EDITOR-ZS Z.S\
+EDITOR-Syntax Syntax\
+pop_menu-Undo Undo\
+pop_menu-Cut Cut\
+pop_menu-Copy Copy\
+pop_menu-Paste Paste\
+pop_menu-Clear Clear\
+pop_menu-Spell Test\
+pop_menu-Block Block\
+pop_menu-plus "+ %"\
+pop_menu-minus "- %"\
+pop_menu-more "..."\
+MW-File File\
+MW-Edit Edit\
+MW-Options Options\
+MW-Mathematik Mathematik\
+MW-Allgemein Allgemein\
+MW-Help Help\
+MW-New New...\
+MW-Load Open...\
+MW-Append Append...\
+MW-Save Save\
+MW-SaveAs "Save As..."\
+MW-Reload "Reload"\
+MW-Quit Quit\
+MW-Clear Clear\
+MW-Clear-msg "Alles Löschen ?"\
+MW-Spelling Rechtschreibung\
+MW-Spell "registriere Wort"\
+MW-Umlaut_with "\\\"a..\\ss -> ä..ß"\
+MW-Umlaut_without "ä..ß -> \\\"a..\\ss"\
+MW-UmlautGerman_with "\"a..\"s -> ä..ß"\
+MW-UmlautGerman_without "ä..ß -> \"a..\"s"\
+MW-Search Search\
+MW-MyOwn "My Own"\
+MW-Version "Version Info"\
+MW-Tcltexed "Tcltexed Manual"\
+MW-LaTeX "LaTeX Commands"\
+MW-AutoKlammerZu AutoKlammerZu\
+MW-Syntax Syntax\
+MW-Packages "Packages/etc"\
+MW-language Sprache\
+MW-size Schriftgrösse\
+MW-english Englisch\
+MW-german Deutsch\
+MW-indonesia Indonesia\
+MW-bre brazilian\
+MW-language-msg "Nun speicher die eingestellten Optionen\nund starte tcltexed erneut !"\
+MW-SaveOptions "Save Options"\
+MW-log "Trace log"\
+LB-breakline "Zeilenumbruch"\
+LB-all "im gesamten Text"\
+LB-section "einem Absatz"\
+LB-line "einer Zeile"\
+LB-unall "Umkehr für den ganzen Text"\
+LB-unsection "für einen Absatz"\
+LB-unline "für eine Zeile"\
+ALLQUIT1 "Vor dem Beenden Veränderungen speichern ?"\
+ALLQUIT2 "Alles sichern ?"\
+ALLQUIT3 "Diese Datei speichern ?\n"\
+Save Save\
+SaveAs SaveAs\
+more more\
+cancel Cancel\
+quit Quit\
+Quit Quit\
+spell-1 "Soll\n\""\
+spell-2 "\"\nals richtig geschrieben\n registriert werden"\
+spell-3 "Korrektur"\
+FileUpToDate "Die Datei wurde extern modifiziert,\nsoll sie neu geladen werden ?"\
+]
+array set T $LISTE
+
+# (w* Fenster mit Namen *)
+# w*-Help -> Suchbegriff bei Hilfe
+# w*-titel -> Fenstertitel
+@
+
+
+1.7
+log
+@*** empty log message ***
+@
+text
+@d89 1
+d92 1
+d112 1
+a112 1
+FileUpToDate "Die Datei wurde extern modifiziert,\nsoll sie neu geladen werden ?"\
+@
+
+
+1.6
+log
+@*** empty log message ***
+@
+text
+@d66 1
+d110 1
+@
+
+
+1.5
+log
+@*** empty log message ***
+@
+text
+@d87 1
+@
+
+
+1.4
+log
+@*** empty log message ***
+@
+text
+@d16 2
+d77 1
+@
+
+
+1.3
+log
+@*** empty log message ***
+@
+text
+@d40 1
+d71 2
+@
+
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@d1 107
+a107 105
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+# german version
+set LISTE [list \
+language "ger"\
+wsearch-titel Search\
+wsearch-Help Search\
+wsearch-case-sensitive "case sensitive"\
+wsearch-top Search\
+wsearch-down down\
+wsearch-up up\
+wsearch-replace replace\
+wsearch-all all\
+whelp-titel Help\
+whelp-no-source "No Source \$hlppath/\$FILE.txt"\
+Helpto-Help ""\
+wlatex-titel LaTeX\
+wlatex-Help Help\
+wTcltexed-titel Manual\
+wTcltexed-Help Help\
+wTcltexed-manual {Tcltexed tcltexed_hlp\
+ Editor editor_hlp\
+ Editor-Tastenbelegung editort_hlp\
+ Readme readme_hlp\
+ Copyright copyright_hlp\
+ Gnu-Puplic-License gpl_hlp}\
+wmsg-titel Message\
+wmyown-titel "My Own"\
+wmyown-Help "My"\
+wcurser-titel "Goto"\
+wcurser-goto "Goto"\
+wcurser-gotocurser "Goto Curser Position"\
+BHTERROR1 "Fehler in Quelldatei\nLaTeX-Befehl schon belegt :\nQuelldatei"\
+BHTERROR2 "\nName "\
+BHTERROR3 "\nBefehl "\
+EDITORQUIT "Save changes ?"\
+EDITOR-latex latex\
+EDITOR-xdvi xdvi\
+EDITOR-dvips dvips\
+EDITOR-ghostview ghostview\
+EDITOR-ZS Z.S\
+EDITOR-Syntax Syntax\
+pop_menu-Undo Undo\
+pop_menu-Cut Cut\
+pop_menu-Copy Copy\
+pop_menu-Paste Paste\
+pop_menu-Clear Clear\
+pop_menu-Spell Test\
+pop_menu-Block Block\
+pop_menu-plus "+ %"\
+pop_menu-minus "- %"\
+pop_menu-more "..."\
+MW-File File\
+MW-Edit Edit\
+MW-Options Options\
+MW-Mathematik Mathematik\
+MW-Allgemein Allgemein\
+MW-Help Help\
+MW-New New...\
+MW-Load Open...\
+MW-Append Append...\
+MW-Save Save\
+MW-SaveAs "Save As..."\
+MW-Quit Quit\
+MW-Clear Clear\
+MW-Clear-msg "Alles Löschen ?"\
+MW-Spelling Rechtschreibung\
+MW-Spell "registriere Wort"\
+MW-Search Search\
+MW-MyOwn "My Own"\
+MW-Tcltexed "Tcltexed Manual"\
+MW-LaTeX "LaTeX Commands"\
+MW-AutoKlammerZu AutoKlammerZu\
+MW-Syntax Syntax\
+MW-Packages "Packages/etc"\
+MW-language Sprache\
+MW-size Schriftgrösse\
+MW-english Englisch\
+MW-german Deutsch\
+MW-language-msg "Nun speicher die eingestellten Optionen\nund starte tcltexed erneut !"\
+MW-SaveOptions "Save Options"\
+LB-breakline "Zeilenumbruch"\
+LB-all "im gesamten Text"\
+LB-section "einem Absatz"\
+LB-line "einer Zeile"\
+LB-unall "Umkehr für den ganzen Text"\
+LB-unsection "für einen Absatz"\
+LB-unline "für eine Zeile"\
+ALLQUIT1 "Vor dem Beenden Veränderungen speichern ?"\
+ALLQUIT2 "Alles sichern ?"\
+ALLQUIT3 "Diese Datei speichern ?\n"\
+Save Save\
+SaveAs SaveAs\
+more more\
+cancel Cancel\
+quit Quit\
+Quit Quit\
+spell-1 "Soll\n\""\
+spell-2 "\"\nals richtig geschrieben\n registriert werden"\
+spell-3 "Korrektur"\
+]
+array set T $LISTE
+
+# (w* Fenster mit Namen *)
+# w*-Help -> Suchbegriff bei Hilfe
+# w*-titel -> Fenstertitel
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d81 7
+a87 7
+LB-breakline "break lines"\
+LB-all "all in file"\
+LB-section "all in section"\
+LB-line "all in line"\
+LB-unall "undo all in file"\
+LB-unsection "undo all in section"\
+LB-unline "undo all in line"\
+@
+
diff --git a/support/tcltexed/lib/RCS/translate2.tcl,v b/support/tcltexed/lib/RCS/translate2.tcl,v
new file mode 100644
index 0000000000..88f55d6dd1
--- /dev/null
+++ b/support/tcltexed/lib/RCS/translate2.tcl,v
@@ -0,0 +1,170 @@
+head 1.3;
+access;
+symbols;
+locks
+ mys:1.3; strict;
+comment @# @;
+
+
+1.3
+date 2001.01.23.21.07.16; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 2000.11.26.18.20.03; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 2000.10.12.15.03.31; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+
+1.3
+log
+@+bre
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+# Bahasa Indonesia version
+set LISTE [list \
+language "ind"\
+wsearch-titel Cari\
+wsearch-Help Cari\
+wsearch-case-sensitive "Perhatikan Huruf Kapital"\
+wsearch-top Cari\
+wsearch-down Turun\
+wsearch-up Atas\
+wsearch-replace Ganti\
+wsearch-all Semua\
+whelp-titel Bantuan\
+whelp-no-source "Tidak ada file \$hlppath/\$FILE.txt"\
+Helpto-Help ""\
+wversion-titel Versi\
+wversion-text "TclTexEd Versi $Tcltexed_Version"\
+wlatex-titel LaTeX\
+wlatex-Help Bantuan\
+wTcltexed-titel Manual\
+wTcltexed-Help Bantuan\
+wTcltexed-manual {Tcltexed tcltexed_hlp\
+ Editor editor_hlp\
+ Editor-keymap editort_hlp\
+ Readme readme_hlp\
+ Copyright copyright_hlp\
+ Gnu-Puplic-License gpl_hlp}\
+wmsg-titel Pesan\
+wmyown-titel "My Own"\
+wmyown-Help "My"\
+wcurser-titel "Ke"\
+wcurser-goto "Ke"\
+wcurser-gotocurser "Posisi Kursor"\
+BHTERROR1 "Kesalahan sourcefile\nLaTeX-command semuanya sudah digunakan :\nSourcefile"\
+BHTERROR2 "\nNama "\
+BHTERROR3 "\nPerintah "\
+EDITORQUIT "Simpan perubahan ?"\
+EDITOR-latex LaTeX\
+EDITOR-xdvi xdvi\
+EDITOR-dvips dvips\
+EDITOR-ghostview ghostview\
+EDITOR-ispell ispell\
+EDITOR-ZS L.C\
+EDITOR-Syntax Sintaksis\
+pop_menu-Undo Batalkan\
+pop_menu-Cut Potong\
+pop_menu-Copy Salin\
+pop_menu-Paste Paste\
+pop_menu-Clear Hapus\
+pop_menu-Spell Eja\
+pop_menu-Block Blok\
+pop_menu-plus "+ %"\
+pop_menu-minus "- %"\
+pop_menu-more "..."\
+MW-File File\
+MW-Edit Edit\
+MW-Options Option\
+MW-Help Bantuan\
+MW-New Baru...\
+MW-Load Buka...\
+MW-Append Tambahkan...\
+MW-Save Simpan\
+MW-SaveAs "Simpan sebagai..."\
+MW-Reload "Muat lagi"\
+MW-Quit Keluar\
+MW-Clear Clear\
+MW-Clear-msg "Hapus semuanya ?"\
+MW-Spelling "Ejaan"\
+MW-Spell "tambahkan kata"\
+MW-Umlaut_with "\\\"a..\\ss -> ä..ß"\
+MW-Umlaut_without "ä..ß -> \\\"a..\\ss"\
+MW-UmlautGerman_with "\"a..\"s -> ä..ß"\
+MW-UmlautGerman_without "ä..ß -> \"a..\"s"\
+MW-Search Cari\
+MW-MyOwn "My Own"\
+MW-Version "Info Versi"\
+MW-Tcltexed "Petunjuk Tcltexed"\
+MW-LaTeX "Daftar Perintah"\
+MW-AutoKlammerZu "Tanda Kurung Otomatis"\
+MW-Syntax Sintaksis\
+MW-Packages "Paket/dsb"\
+MW-language Bahasa\
+MW-size "Ukuran Font"\
+MW-german Jerman\
+MW-english Inggris\
+MW-indonesia Indonesia\
+MW-bre brazilian\
+MW-language-msg "Simpan Option \ndan jalankan lagi tcltexed\nuntuk mengaktifkan perubahan !"\
+MW-SaveOptions "Simpan Option"\
+MW-log "Trace log"\
+LB-breakline "Pemenggalan Baris"\
+LB-all "di semua file"\
+LB-section "di semua section"\
+LB-line "di semua baris"\
+LB-unall "dibatalkan di semua file"\
+LB-unsection "dibatalkan di semua section"\
+LB-unline "dibatalkan di semua baris"\
+ALLQUIT1 "Simpan perubahan sebelum keluar ?"\
+ALLQUIT2 "Simpan semuanya ?"\
+ALLQUIT3 "Simpan file ini ?\n"\
+Save Save\
+SaveAs SaveAs\
+more more\
+cancel Cancel\
+quit Quit\
+Quit Quit\
+spell-1 "Tambahkan\n\""\
+spell-2 "\"\nke dalam daftar kata"\
+spell-3 "Koreksi"\
+FileUpToDate "File di disk telah dimodifikasi,\nmuat lagi sebelum dilanjutkan ?"\
+]
+array set T $LISTE
+
+# (w* Fenster mit Namen *)
+# w*-Help -> Suchbegriff bei Hilfe
+# w*-titel -> Fenstertitel
+@
+
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@d87 1
+d90 1
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d64 1
+d108 1
+@
diff --git a/support/tcltexed/lib/RCS/translate3.tcl,v b/support/tcltexed/lib/RCS/translate3.tcl,v
new file mode 100644
index 0000000000..c414af84e6
--- /dev/null
+++ b/support/tcltexed/lib/RCS/translate3.tcl,v
@@ -0,0 +1,143 @@
+head 1.1;
+access;
+symbols;
+locks
+ mys:1.1; strict;
+comment @# @;
+
+
+1.1
+date 2001.01.23.21.07.16; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@bre
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@# Was translated from the original file writen by:
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+# Marcelo Belentani de Bianchi - under terms of GPL
+# Brazilian version
+set LISTE [list \
+language "bre"\
+wsearch-titel Busca\
+wsearch-Help Busca\
+wsearch-case-sensitive "caso sensitivo"\
+wsearch-top Busca\
+wsearch-down Abaixo\
+wsearch-up Acima\
+wsearch-replace Substituir\
+wsearch-all Todas\
+whelp-titel Ajuda\
+whelp-no-source "No Source \$hlppath/\$FILE.txt"\
+Helpto-Help ""\
+wversion-titel Versão\
+wversion-text "TclTexEd Versão $Tcltexed_Version"\
+wlatex-titel LaTeX\
+wlatex-Help Ajuda\
+wTcltexed-titel Manual\
+wTcltexed-Help Ajuda\
+wTcltexed-manual {Tcltexed tcltexed_hlp\
+ Editor editor_hlp\
+ Editor-keymap editort_hlp\
+ Readme readme_hlp\
+ Copyright copyright_hlp\
+ Gnu-Puplic-License gpl_hlp}\
+wmsg-titel Mensagem\
+wmyown-titel "Meus Próprios"\
+wmyown-Help "Meu"\
+wcurser-titel "Vai para"\
+wcurser-goto "Vai"\
+wcurser-gotocurser "Vai para a linha"\
+BHTERROR1 "Error within sourcefile\nLaTeX-command all ready in use :\nSourcefile"\
+BHTERROR2 "\nNome "\
+BHTERROR3 "\nCommando "\
+EDITORQUIT "Salvar alterações ?"\
+EDITOR-latex latex\
+EDITOR-xdvi xdvi\
+EDITOR-dvips dvips\
+EDITOR-ghostview ghostview\
+EDITOR-ispell ispell\
+EDITOR-ZS L.C\
+EDITOR-Syntax Sintaxe\
+pop_menu-Undo Desfazer\
+pop_menu-Cut Recortar\
+pop_menu-Copy Copiar\
+pop_menu-Paste Colar\
+pop_menu-Clear Apagar\
+pop_menu-Spell "Correção Ortográfica"\
+pop_menu-Block Bloco\
+pop_menu-plus "+ %"\
+pop_menu-minus "- %"\
+pop_menu-more "..."\
+MW-File Arquivo\
+MW-Edit Editar\
+MW-Options Opções\
+MW-Help Ajuda\
+MW-New Novo...\
+MW-Load Abrir...\
+MW-Append Adicionar...\
+MW-Save Salvar\
+MW-SaveAs "Salvar como..."\
+MW-Reload "Reload"\
+MW-Quit Sair\
+MW-Clear Apagar\
+MW-Clear-msg "Apagar tudo ?"\
+MW-Spelling "Correção Ortográfica"\
+MW-Spell "Adicionar palavra"\
+MW-Umlaut_with "\\\"a..\\ss -> ä..ß"\
+MW-Umlaut_without "ä..ß -> \\\"a..\\ss"\
+MW-UmlautGerman_with "\"a..\"s -> ä..ß"\
+MW-UmlautGerman_without "ä..ß -> \"a..\"s"\
+MW-Search Procurar\
+MW-MyOwn "Meus"\
+MW-Version "Versão"\
+MW-Tcltexed "Manual do Tcltexed"\
+MW-LaTeX "Comandos do LaTeX"\
+MW-AutoKlammerZu "parênteses automáticos"\
+MW-Syntax Sintaxe\
+MW-Packages "Pacotes/etc"\
+MW-language Idioma\
+MW-size "Tamanho da fonte"\
+MW-english english\
+MW-bre brazilian\
+MW-german german\
+MW-indonesia indonesia\
+MW-language-msg "Não esqueça de salvar opções"\
+MW-SaveOptions "Salvar Opções"\
+MW-log "Ativar Logs"\
+LB-breakline "quebrar linhas"\
+LB-all "em todo o arquivo"\
+LB-section "em toda a seção"\
+LB-line "em toda linha"\
+LB-unall "desfazer em todo arquivo"\
+LB-unsection "desfazer tudo na seção"\
+LB-unline "desfazer tudo na linha"\
+ALLQUIT1 "Salvar antes de sair ?"\
+ALLQUIT2 "Salvar tudo ?"\
+ALLQUIT3 "Salvar este arquivo ?"\
+Save Salvar\
+SaveAs "Salvar como"\
+more mais\
+cancel Cancelar\
+quit Sair\
+Quit Sair\
+spell-1 "Adicionar\n\""\
+spell-2 "\"\npara lista de palavras conhecidas"\
+spell-3 "Corrija você mesmo"\
+FileUpToDate "File on Disk has been modified,\nreload it before continue ?"\
+]
+array set T $LISTE
+
+# (w* Fenster mit Namen *)
+# w*-Help -> Suchbegriff bei Hilfe
+# w*-titel -> Fenstertitel
+@
diff --git a/support/tcltexed/lib/RCS/umlaut.tcl,v b/support/tcltexed/lib/RCS/umlaut.tcl,v
new file mode 100644
index 0000000000..564d2f6414
--- /dev/null
+++ b/support/tcltexed/lib/RCS/umlaut.tcl,v
@@ -0,0 +1,130 @@
+head 1.3;
+access;
+symbols;
+locks
+ mys:1.3; strict;
+comment @# @;
+
+
+1.3
+date 2000.08.15.22.34.13; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 2000.04.11.19.09.28; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+
+1.3
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 2000 - Martin Strauss - under terms of GPL
+##############################################################
+# umlaut routine
+#
+proc umlaut LIST {
+ global FocusEditorFlag
+ global FocusEditor
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ foreach {FIND REPLACE} $LIST {
+ set FIND_L [string length "$FIND"]
+ if {$FIND != ""} then {
+ set modifiedflag 0
+ undo_switch $FocusEditor.te.edit1 Save
+ set startindex [$FocusEditor.te.edit1 index insert]
+ set nowindex 1.0
+ while {$nowindex != ""} {
+ $FocusEditor.te.edit1 mark set insert $nowindex
+ set NOW [$FocusEditor.te.edit1 get insert "insert + $FIND_L chars"]
+ if ![string compare $NOW $FIND] then {
+ # Ersetzt
+ $FocusEditor.te.edit1 delete insert "insert + $FIND_L chars"
+ $FocusEditor.te.edit1 insert insert $REPLACE
+ set modifiedflag 1
+ }
+ # Sucht
+ set nowindex [$FocusEditor.te.edit1 search -- $FIND insert end]
+ }
+ $FocusEditor.te.edit1 mark set insert $startindex
+ if $modifiedflag {
+ event generate $FocusEditor.te.edit1 <<Modified>>
+ }
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }
+ }
+ }
+}
+@
+
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@d22 1
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d1 36
+a36 40
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+##############################################################
+# umlaut routine
+#
+proc umlaut LIST {
+ global T
+ global FocusEditorFlag
+ global FocusEditor
+ if $FocusEditorFlag then {
+ focus $FocusEditor.te.edit1
+ foreach {FIND REPLACE} $LIST {
+ set FIND_L [string length "$FIND"]
+ if {$FIND != ""} then {
+ set modifiedflag 0
+ undo_switch $FocusEditor.te.edit1 Save
+ set startindex [$FocusEditor.te.edit1 index insert]
+ set nowindex 1.0
+ while {$nowindex != ""} {
+ $FocusEditor.te.edit1 mark set insert $nowindex
+ set NOW [$FocusEditor.te.edit1 get insert "insert + $FIND_L chars"]
+ if ![string compare $NOW $FIND] then {
+ # Ersetzt
+ undo_switch $FocusEditor.te.edit1 "{insert \"insert + $FIND_L chars\"} Delete UndoBegin"
+ $FocusEditor.te.edit1 insert insert $REPLACE
+ undo_switch $FocusEditor.te.edit1 UndoEnd
+ set modifiedflag 1
+ }
+ # Sucht
+ set nowindex [$FocusEditor.te.edit1 search -- $FIND insert end]
+ }
+ $FocusEditor.te.edit1 mark set insert $startindex
+ if $modifiedflag {
+ undo_switch $FocusEditor.te.edit1 Save
+ event generate $FocusEditor.te.edit1 <<Modified>>
+ }
+ event generate $FocusEditor.te.edit1 <<Position_tail>> -when tail
+ }
+ }
+ }
+}
+@
diff --git a/support/tcltexed/lib/RCS/undo.tcl,v b/support/tcltexed/lib/RCS/undo.tcl,v
new file mode 100644
index 0000000000..955a3da97f
--- /dev/null
+++ b/support/tcltexed/lib/RCS/undo.tcl,v
@@ -0,0 +1,311 @@
+head 1.3;
+access;
+symbols;
+locks
+ mys:1.3; strict;
+comment @# @;
+
+
+1.3
+date 2000.04.11.21.41.24; author mys; state Exp;
+branches;
+next 1.2;
+
+1.2
+date 2000.04.11.19.09.28; author mys; state Exp;
+branches;
+next 1.1;
+
+1.1
+date 99.11.09.21.32.05; author mys; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+1.3
+log
+@*** empty log message ***
+@
+text
+@# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+##################################################################
+# Undo function
+proc proc_undo {E} {
+ global UndoArray
+ event generate $E <<proc_undo>>
+ if {[llength $UndoArray($E)] != 0} then {
+ set liste [lindex $UndoArray($E) end]
+ set UndoArray($E) [lrange $UndoArray($E) 0 [expr [llength $UndoArray($E)] - 2]]
+ switch [lindex $liste 0] insert {
+ set ksp [$E index "insert linestart"]
+ $E insert [lindex $liste 1] "[lindex $liste 2]"
+ Syntax $E $ksp "insert lineend"
+ } delete {
+ $E delete [lindex $liste 1] [lindex $liste 2]
+ } UndoMul {
+ proc_undo $E
+ proc_undo $E
+ }
+ }
+}
+##########################
+# gliedert tag ein
+proc undo_tag E {
+ global UndoArray
+
+ set sel_flag 0
+ if {[$E tag nextrange undo 1.0 end] != ""} then {
+ set flag 0
+ foreach {A O} [$E tag ranges undo] {
+ if $flag {
+ if {[$E index $KO+1c] != $A} {
+ lappend UndoArray($E) "delete $KA $KO"
+ set KA $A
+ }
+ } {
+ set flag 1
+ set KA $A
+ }
+ set KO $O
+ }
+ lappend UndoArray($E) "delete $KA $KO"
+ $E tag remove undo 1.0 end
+ }
+}
+#########################
+# max laenge des undo Speichers
+proc undo_maxlength E {
+ global UndoArray max_undo
+ while {[string length $UndoArray($E)] > $max_undo} {
+ if {[llength $UndoArray($E)] != 0} then {
+ set UndoArray($E) [lrange $UndoArray($E) 1 end]
+ } else break
+ }
+}
+##########################
+#
+proc undo_switch {E L} {
+ global UndoArray undo_switch_sel_flag
+ foreach i $L {
+ switch $i UndoMax {
+ undo_maxlength $E
+
+ } Save {
+ # Text sammeln und sichern
+ undo_tag $E
+
+ } Delete {
+ # Delete speichern
+ lappend UndoArray($E) "insert [$E index [lindex $LIST 0]] [backslash [$E get [lindex $LIST 0] [lindex $LIST 1]]]"
+ $E delete [lindex $LIST 0] [lindex $LIST 1]
+
+ } UndoBegin {
+ # Textmarke setzen
+ $E mark set UndoBegin insert
+ $E mark gravity UndoBegin left
+
+ } UndoEnd {
+ # Texttag setzen
+ $E tag add undo UndoBegin insert
+
+ } SelSave {
+ if {[$E tag nextrange sel 1.0 end] != ""} then {
+ undo_tag $E
+ lappend UndoArray($E) "insert [$E index sel.first] [backslash [$E get sel.first sel.last]]"
+ set undo_switch_sel_flag 1
+ } {set undo_switch_sel_flag 0}
+ } SelMul {
+ if $undo_switch_sel_flag {
+ undo_tag $E
+ lappend UndoArray($E) UndoMul
+ $E mark set UndoBegin insert
+ $E mark gravity UndoBegin left
+ }
+ } BeginMark {
+ $E tag add undo BeginMark-1c BeginMark
+ } UndoMul {
+ lappend UndoArray($E) UndoMul
+ } DeleteKey {
+ if {$undo_switch_sel_flag == 0} then {
+ set ksp ""
+ if {[lindex $UndoArray($E) end] != ""} then {
+ if {[lindex [lindex $UndoArray($E) end] 0] == "insert"} then {
+ if {[lindex [lindex $UndoArray($E) end] 1] == [$E index insert]} then {
+ set ksp [lindex [lindex $UndoArray($E) end] 2]
+ set UndoArray($E) [lrange $UndoArray($E) 0 [expr [llength $UndoArray($E)] - 2]]
+ }
+ }
+ }
+ lappend UndoArray($E) "insert [$E index insert] [backslash $ksp][backslash [$E get insert]]"
+ }
+ } BackSpaceKey {
+ if {$undo_switch_sel_flag == 0} then {
+ set ksp ""
+ if {[lindex $UndoArray($E) end] != ""} then {
+ if {[lindex [lindex $UndoArray($E) end] 0] == "insert"} then {
+ if {[lindex [lindex $UndoArray($E) end] 1] == [$E index insert]} then {
+ set ksp [lindex [lindex $UndoArray($E) end] 2]
+ set UndoArray($E) [lrange $UndoArray($E) 0 [expr [llength $UndoArray($E)] - 2]]
+ }
+ }
+ }
+ lappend UndoArray($E) "insert [$E index insert-1c] [backslash [$E get insert-1c]][backslash $ksp]"
+ }
+ } default {
+ set LIST $i
+ }
+ }
+}
+@
+
+
+1.2
+log
+@*** empty log message ***
+@
+text
+@d1 129
+a129 129
+# Copyright (C) 1999 - Martin Strauss - under terms of GPL
+##################################################################
+# Undo function
+proc proc_undo {E} {
+ global UndoArray
+ event generate $E <<proc_undo>>
+ if {[llength $UndoArray($E)] != 0} then {
+ set liste [lindex $UndoArray($E) end]
+ set UndoArray($E) [lrange $UndoArray($E) 0 [expr [llength $UndoArray($E)] - 2]]
+ switch [lindex $liste 0] insert {
+ set ksp [$E index "insert linestart"]
+ $E insert [lindex $liste 1] "[lindex $liste 2]"
+ Syntax $E $ksp "insert lineend"
+ } delete {
+ $E delete [lindex $liste 1] [lindex $liste 2]
+ } UndoMul {
+ proc_undo $E
+ proc_undo $E
+ }
+ }
+}
+##########################
+# gliedert tag ein
+proc undo_tag E {
+ global UndoArray
+
+ set sel_flag 0
+ if {[$E tag nextrange undo 1.0 end] != ""} then {
+ set flag 0
+ foreach {A O} [$E tag ranges undo] {
+ if $flag {
+ if {[$E index $KO+1c] != $A} {
+ lappend UndoArray($E) "delete $KA $KO"
+ set KA $A
+ }
+ } {
+ set flag 1
+ set KA $A
+ }
+ set KO $O
+ }
+ lappend UndoArray($E) "delete $KA $KO"
+ $E tag remove undo 1.0 end
+ }
+}
+#########################
+# max laenge des undo Speichers
+proc undo_maxlength E {
+ global UndoArray max_undo
+ while {[string length $UndoArray($E)] > $max_undo} {
+ if {[llength $UndoArray($E)] != 0} then {
+ set UndoArray($E) [lrange $UndoArray($E) 1 end]
+ } else break
+ }
+}
+##########################
+#
+proc undo_switch {E L} {
+ global UndoArray undo_switch_sel_flag
+ foreach i $L {
+ switch $i UndoMax {
+ undo_maxlength $E
+
+ } Save {
+ # Text sammeln und sichern
+ undo_tag $E
+
+ } Delete {
+ # Delete speichern
+ lappend UndoArray($E) "insert [$E index [lindex $LIST 0]] [backslash [$E get [lindex $LIST 0] [lindex $LIST 1]]]"
+ $E delete [lindex $LIST 0] [lindex $LIST 1]
+
+ } UndoBegin {
+ # Textmarke setzen
+ $E mark set UndoBegin insert
+ $E mark gravity UndoBegin left
+
+ } UndoEnd {
+ # Texttag setzen
+ $E tag add undo UndoBegin insert
+
+ } SelSave {
+ if {[$E tag nextrange sel 1.0 end] != ""} then {
+ undo_tag $E
+ lappend UndoArray($E) "insert [$E index sel.first] [backslash [$E get sel.first sel.last]]"
+ set undo_switch_sel_flag 1
+ } {set undo_switch_sel_flag 0}
+ } SelMul {
+ if $undo_switch_sel_flag {
+ undo_tag $E
+ lappend UndoArray($E) UndoMul
+ $E mark set UndoBegin insert
+ $E mark gravity UndoBegin left
+ }
+ } BeginMark {
+ $E tag add undo BeginMark-1c BeginMark
+ } UndoMul {
+ lappend UndoArray($E) UndoMul
+ } DeleteKey {
+ if {$undo_switch_sel_flag == 0} then {
+ set ksp ""
+ if {[lindex $UndoArray($E) end] != ""} then {
+ if {[lindex [lindex $UndoArray($E) end] 0] == "insert"} then {
+ if {[lindex [lindex $UndoArray($E) end] 1] == [$E index insert]} then {
+ set ksp [lindex [lindex $UndoArray($E) end] 2]
+ set UndoArray($E) [lrange $UndoArray($E) 0 [expr [llength $UndoArray($E)] - 2]]
+ }
+ }
+ }
+ lappend UndoArray($E) "insert [$E index insert] [backslash $ksp][backslash [$E get insert]]"
+ }
+ } BackSpaceKey {
+ if {$undo_switch_sel_flag == 0} then {
+ set ksp ""
+ if {[lindex $UndoArray($E) end] != ""} then {
+ if {[lindex [lindex $UndoArray($E) end] 0] == "insert"} then {
+ if {[lindex [lindex $UndoArray($E) end] 1] == [$E index insert]} then {
+ set ksp [lindex [lindex $UndoArray($E) end] 2]
+ set UndoArray($E) [lrange $UndoArray($E) 0 [expr [llength $UndoArray($E)] - 2]]
+ }
+ }
+ }
+ lappend UndoArray($E) "insert [$E index insert-1c] [backslash [$E get insert-1c]][backslash $ksp]"
+ }
+ } default {
+ set LIST $i
+ }
+ }
+}
+@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d26 1
+@
+