snapshot.tcl
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
源码类别:

通讯编程

开发平台:

Visual C++

  1. #
  2. # Copyright (C) 1998 by USC/ISI
  3. # All rights reserved.
  4. #
  5. # Redistribution and use in source and binary forms are permitted
  6. # provided that the above copyright notice and this paragraph are
  7. # duplicated in all such forms and that any documentation, advertising
  8. # materials, and other materials related to such distribution and use
  9. # acknowledge that the software was developed by the University of
  10. # Southern California, Information Sciences Institute.  The name of the
  11. # University may not be used to endorse or promote products derived from
  12. # this software without specific prior written permission.
  13. #
  14. # THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
  15. # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  16. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  17. #
  18. Animator instproc take_snapshot {} {
  19. $self instvar netModel
  20. $self testsuite_view $netModel nam
  21. }
  22. Animator instproc testsuite_view { viewobject windowname } {
  23. puts "take a snapshot here. "
  24. $viewobject testview testview
  25. }
  26. Animator instproc playing_backward {} {
  27. $self instvar netView running backward
  28. focus $netView
  29. if { $backward == 0 } {
  30. $self set_backward_dir 1
  31. if { $running != 1 } {
  32. $self play 1
  33. $self renderFrame
  34. }
  35. }
  36. set backward 1
  37. }
  38. Animator instproc playing_forward {} {
  39. $self instvar netView running direction
  40. focus $netView
  41. if { $direction == -1} {
  42. $self set_forward_dir 1
  43. if { $running != 1 } {
  44. $self play 1
  45. $self renderFrame
  46. }
  47. }
  48. }
  49. Animator instproc terminating_nam {} {
  50. destroy .
  51. }