1 # anm-view-nam.tcl --
2 #
3 # AnmView/Nam
4 # Viewer of (Network Animator) Nam Animations
5 #
6 # Copyright (c) 1993-2002 The Regents of the University of California.
7 # All rights reserved.
8 #
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions are met:
11 #
12 # A. Redistributions of source code must retain the above copyright notice,
13 # this list of conditions and the following disclaimer.
14 # B. Redistributions in binary form must reproduce the above copyright notice,
15 # this list of conditions and the following disclaimer in the documentation
16 # and/or other materials provided with the distribution.
17 # C. Neither the names of the copyright holders nor the names of its
18 # contributors may be used to endorse or promote products derived from this
19 # software without specific prior written permission.
20 #
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
22 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
25 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
32
33 #-----------------------------------------------
34 # AnmView/Nam --
35 # Viewer of (Network Animator) Nam Animations
36 #
37
38 Class AnmView/Nam -superclass AnmView
39
40 AnmView/Nam instproc init {{pathname {}}} {
41 DbgVar pathname
42 $self next $pathname
43 }
44
45 AnmView/Nam instproc attach_datasrc {datasrc} {
46 $self next $datasrc
47 }
48
49 AnmView/Nam instproc destroy {} {
50 $self next
51 }
52
53 AnmView/Nam instproc handle {eId event} {
54 $self instvar objects_ edges_
55
56 # (c.r. DataSrc/Local/Nam instproc convert_... for format of event)
57
58 set objType [removeFirst event]
59 # DbgOut "handle $eId $event"
60 # DbgVar event
61 if ![info exists objects_($eId)] {
62 set obj [eval new AnmObj/$objType $eId $event]
63 $self insert_AnmObj $obj
64 }
65 }
66
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.