Changeset 3421 for trunk/gui/scripts/nanovisviewer.tcl
- Timestamp:
- Mar 3, 2013 12:52:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/nanovisviewer.tcl
r3407 r3421 77 77 public method limits { tf } 78 78 public method overmarker { m x } 79 public method sendto { string }80 79 public method parameters {title args} { 81 80 # do nothing … … 98 97 protected method ReceiveLegend { tf vmin vmax size } 99 98 protected method Rotate {option x y} 100 protected method SendCmd {string}101 99 protected method SendTransferFuncs {} 102 100 protected method Slice {option args} … … 124 122 private variable _arcball "" 125 123 private variable _useArcball 1 126 private variable _outbuf ;# buffer for outgoing commands127 124 128 125 private variable _dlist "" ;# list of data objects … … 149 146 private variable _activeTfs 150 147 private variable _first "" ;# This is the topmost volume. 151 private variable _buffering 0152 148 153 149 # This … … 190 186 $_dispatcher register !resize 191 187 $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list" 192 193 set _outbuf ""194 188 195 189 # … … 644 638 645 639 # disconnected -- no more data sitting on server 646 set _outbuf ""647 640 array unset _serverDatasets 648 641 } 649 650 #651 # sendto --652 #653 itcl::body Rappture::NanovisViewer::sendto { bytes } {654 SendBytes "$bytes\n"655 }656 657 #658 # SendCmd659 #660 # Send commands off to the rendering server. If we're currently661 # sending data objects to the server, buffer the commands to be662 # sent later.663 #664 itcl::body Rappture::NanovisViewer::SendCmd {string} {665 if { $_buffering } {666 append _outbuf $string "\n"667 } else {668 foreach line [split $string \n] {669 SendEcho >>line $line670 }671 SendBytes "$string\n"672 }673 }674 675 642 676 643 # ---------------------------------------------------------------------- … … 878 845 # be preempted by a server disconnect/reconnect (which automatically 879 846 # generates a new call to Rebuild). 880 set _buffering 1847 StartBufferingCommands 881 848 882 849 # Hide all the isomarkers. Can't remove them. Have to remember the … … 893 860 set _height [winfo height $itk_component(3dview)] 894 861 DoResize 895 if 1{862 if { $_reportClientInfo } { 896 863 # Tell the server the name of the tool, the version, and 897 864 # dataset that we are rendering. Have to do it here because … … 923 890 set data [$dataobj values $cname] 924 891 set nbytes [string length $data] 925 if 1{892 if { $_reportClientInfo } { 926 893 set info {} 927 894 lappend info "tool_id" [$dataobj hints toolId] … … 934 901 SendCmd "clientinfo [list $info]" 935 902 } 936 append _outbuf "volume data follows $nbytes $tag\n"903 SendCmd "volume data follows $nbytes $tag" 937 904 append _outbuf $data 938 905 set _recvdDatasets($tag) 1 … … 1000 967 } 1001 968 } 1002 set _buffering 0; # Turn off buffering.1003 969 # Actually write the commands to the server socket. If it fails, we don't 1004 970 # care. We're finished here. 1005 971 blt::busy hold $itk_component(hull) 1006 S endBytes $_outbuf;972 StopBufferingCommands 1007 973 blt::busy release $itk_component(hull) 1008 974 set _reset 0 1009 set _outbuf ""; # Clear the buffer.1010 975 } 1011 976
Note: See TracChangeset
for help on using the changeset viewer.