first:
the print-command still doesn't save big background images (even with odd
sizes). As fare as I understand it this isn't really a bug in tkined but in tk4.0.
To handle this I changed the tk-objekttype of a background image from
image to bitmap. This is suggested in Objekts.tcl and you just have to turn
the switch in line 566 from "if {0} {" to "if {1 } {" .
second:
the sub-menu color doesn't appear in the icon menu. I handled this
taking out the "if {[$editor color]} {"-lines in Editor.tcl. (I Know this is really
ugly.)
diff Editor.tcl.orig Editor.tcl
474c474
< if {[$editor color]} {
---
> # if {[$editor color]} {
477c477
< }
---
> # }
611c611
< if {[$editor color]} {
---
> # if {[$editor color]} {
638c638
< }
---
> # }
Another strange thing is that the pagesize of the tkined editor depends on
the terminal I am working at. Using a SPARCstation with openwin3 as
Xterminal and login on the Linux machine, a DIN A4 page is bigger than
using the Linuxstation with FVWM. This means the same tki-file fitts on the
page sitting in front of the SPARCstation but it doesn't while sitting in front of
the Linux machine. Is the related to some fonts?
Futher on I made some maybe quite personal changes:
first:
I like to have an emacs-style backup of the old tki-file when saving a
tki-canvas. So I added some lines in Command.tcl.
diff Command.tcl.orig Command.tcl
110a126,140
>
> ## first mv $fname to $fname~. Geaendert Udo Buergel 30.8.95 {{{{{
> if {[file exists $fname]} {
> if {[catch {exec mv $fname $fname~} err]} {
> if {$err == ""} {
> Dialog::acknowledge $w.canvas \
> "Can not write to file [file tail $fname~]."
> } else {
> Dialog::acknowledge $w.canvas \
> "Can not write to file [file tail $fname~]:" "" $err
> }
> }
> }
> ## geaendert Udo Buergel }}}}}}}}}
>
second:
I would like to be asked wether I want to save the old file before I open
a new one. So I added some lines in Command.tcl.
diff Command.tcl.orig Command.tcl
61a62
> set oldfname "[$editor filename]"
69a71,84
> ## Ask to save old view before open new view. Geaendert Udo Buergel 30.8.95{{{
> if {$oldfname != "noname.tki"} {
> set res [Dialog::confirm $w.canvas "Save $oldfname before open new view?" \
> [list yes no cancel]]
> if { $res == "cancel" } {
> return
> } else {
> if { $res == "yes" } {
> Command::Save $editor
> }
> }
> }
> ## Ask to save old view before open new view. Geaendert Udo Buergel 30.8.95}}}
>
third:
I want to allow links with reference-objekts because I think this is useful to
show the way several tki-maps are related to, or connected with, each other.
Probablly this is very personel but anyway I tell you about the way I did it.
diff methods.c.orig methods.c.
504a505,507
> /* eingefuegt 14.8.95 Udo Buergel ((((*/
> case TKINED_REFERENCE:
> /* )))))eingefuegt 14.8.95 Udo Buergel */
1610a1614,1616
> /* eingefuegt 14.8.95 Udo Buergel ((((*/
> Tcl_AppendElement (interp, object->links);
> /* )))))eingefuegt 14.8.95 Udo Buergel */
1894a1901
> /* added REFERENCE object. 14.8.95 Udo Buergel */
1896c1903,1904
< if (object->type == TKINED_NODE || object->type == TKINED_NETWORK) {
---
> if (object->type == TKINED_NODE || object->type == TKINED_NETWORK
> || object->type == TKINED_REFERENCE) {
diff Tool.tcl.orig Tool.tcl
< set item [Tool::Find $c $x $y "NODE NETWORK"]
---
> # geaendert 14.8.95 Udo Buergel. DAmit man auch Objekte vom typ REFERENCE mit
> # einem link verbinden kann. {{{{{{
> set item [Tool::Find $c $x $y "NODE NETWORK REFERENCE"]
> # set item [Tool::Find $c $x $y "NODE NETWORK"]
> # geaendert 14.8.95 Udo Buergel. DAmit man auch Objekte vom typ REFERENCE mit
> # einem link verbinden kann. }}}}}}
1133,1134c1138,1145
< set dst_item [Tool::Find $c $x $y "NODE NETWORK"]
< set src_item [Tool::Find $c $sx $sy "NODE NETWORK"]
---
> # geaendert 14.8.95 Udo Buergel. DAmit man auch Objekte vom typ REFERENCE mit
> # einem link verbinden kann. {{{{{{
> set dst_item [Tool::Find $c $x $y "NODE NETWORK REFERENCE"]
> set src_item [Tool::Find $c $sx $sy "NODE NETWORK REFERENCE"]
> # set dst_item [Tool::Find $c $x $y "NODE NETWORK"]
> # set src_item [Tool::Find $c $sx $sy "NODE NETWORK"]
> # geaendert 14.8.95 Udo Buergel. DAmit man auch Objekte vom typ REFERENCE mit
> # einem link verbinden kann. }}}}}}
1142a1154,1158
> # geaendert 14.8.95 Udo Buergel. DAmit man auch Objekte vom typ REFERENCE mit
> # einem link verbinden kann. {{{{{{
> ($dst_type=="REFERENCE") ||
> # geaendert 14.8.95 Udo Buergel. DAmit man auch Objekte vom typ REFERENCE mit
> # einem link verbinden kann. }}}}}}
diff Command.tcl.orig Command.tcl
415c445,449
< if {($type == "NODE") || ($type == "NETWORK")} {
---
> # if {($type == "NODE") || ($type == "NETWORK")} {
> # || ($type == "REFERENCE") hinzugefuegt, damit man ein Objekt vom Typ
> # "REFERENCE" linken kann. Udo Buergel 14.8.95
> if {($type == "NODE") ||
> ($type == "NETWORK") || ($type == "REFERENCE")} {
That's all.
Udo