Re: animation?

Juergen Schoenwaelder (schoenw@cs.utwente.nl)
Tue, 25 Feb 1997 12:16:05 +0100

Brian Keck <b.keck@trl.telstra.com.au> said:

Brian> I've been trying to do some animation, & have a few questions.
Brian> The idea is to show packets moving around a network.

[...]

Brian> Is there a way of getting the coordinates of the endpoints of
Brian> a link? The method below uses the bounding box (ined size
Brian> ...), but has to mess around to figure out which 2 of the 4
Brian> corners are the endpoints.

I would suggest to call 'ined move' for the nodes/networks that are
connected by the link. Below is a sample command that shows link
coordinates.

proc "Show Links" list {
foreach comp $list {
if {[ined type $comp] != "LINK"} continue
puts "Link [ined id $comp]:"
puts [ined move [ined src $comp]]
puts [ined move [ined dst $comp]]
}
}

Brian> Is it possible to draw more than bitmaps (and graphs etc)?
Brian> (Here as elsewhere I'm hoping not to have to change tkined
Brian> itself.)

No, you have to change tkined for that.

Brian> Is it possible to make keyboard or mouse events on the main
Brian> canvas (if that's the right expression) notify my application?
Brian> I know my application can add a menu but I'd like more
Brian> flexibility.

No, you have to change tkined for that.

Brian> Can I add entries to the button-3 per-object menus that send
Brian> to my application?

You can define shortcuts for commands that are registered via a MENU
object in the tkined.defaults file:

tkined.Link: "Show Link"

This definition will invoke the "Show Link" command of the Link MENU
on the current object. Note that using a shortcut also means that you
invoke the comand on the current object instead of the set of selected
objects.
Juergen

-- 
Juergen Schoenwaelder schoenw@cs.utwente.nl http://www.cs.utwente.nl/~schoenw
Computer Science Department, University of Twente,   (Fax: +31-53-489-3247)
P.O. Box 217, NL-7500 AE Enschede, The Netherlands.  (Tel. +31-53-489-3678)
--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.