Changeset 4446 for branches/1.3/gui/scripts/visviewer.tcl
- Timestamp:
- Jun 27, 2014, 3:25:53 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/visviewer.tcl
r4391 r4446 42 42 #private variable _idleTimeout 5000; # 5 seconds 43 43 #private variable _idleTimeout 0; # No timeout 44 44 45 protected variable _maxConnects 100 45 46 protected variable _outbuf ; # buffer for outgoing commands … … 84 85 protected method Connect { servers } 85 86 protected method Disconnect {} 86 protected method EnableWaitDialog { bool}87 protected method EnableWaitDialog { timeout } 87 88 protected method Euler2XYZ { theta phi psi } 88 89 protected method Flush {} 90 protected method GetColormapList { args } 89 91 protected method HandleError { args } 90 92 protected method HandleOk { args } … … 388 390 # 389 391 # Helper routine called from a file event to send data when the 390 # connection is writable (i.e. not blocked). Sets a magic 391 # variable_done($this) when we're done.392 # connection is writable (i.e. not blocked). Sets a magic variable 393 # _done($this) when we're done. 392 394 # 393 395 itcl::body Rappture::VisViewer::SendHelper {} { … … 404 406 # 405 407 # Helper routine called from a file event to send data when the 406 # connection is writable (i.e. not blocked). Sends data in chunks 407 # of 8k (or less). Sets magic variable _done($this) to indicate408 # that we're either finished (success) or could not send bytes to409 # the server(failure).408 # connection is writable (i.e. not blocked). Sends data in chunks of 8k 409 # (or less). Sets magic variable _done($this) to indicate that we're 410 # either finished (success) or could not send bytes to the server 411 # (failure). 410 412 # 411 413 itcl::body Rappture::VisViewer::SendHelper.old {} { … … 504 506 # ReceiveHelper -- 505 507 # 506 # Helper routine called from a file event when the connection is 507 # readable (i.e. a command response has been sent by the rendering508 # server. Reads the incoming command and executes it in a safe509 # interpreter to handle theaction.508 # Helper routine called from a file event when the connection is readable 509 # (i.e. a command response has been sent by the rendering server. Reads 510 # the incoming command and executes it in a safe interpreter to handle the 511 # action. 510 512 # 511 513 # Note: This routine currently only handles command responses from … … 561 563 # Color2RGB -- 562 564 # 563 # Converts a color name to a list of r,g,b values needed for the 564 # engine.Each r/g/b component is scaled in the # range 0-1.565 # Converts a color name to a list of r,g,b values needed for the engine. 566 # Each r/g/b component is scaled in the # range 0-1. 565 567 # 566 568 itcl::body Rappture::VisViewer::Color2RGB {color} { … … 610 612 # 611 613 # Echoes received data to clients interested in this widget. If the 612 # -receivecommand option is set, then it is invoked in the global 613 # scope with the <channel> and <data> values as arguments. Otherwise,614 # thisdoes nothing.614 # -receivecommand option is set, then it is invoked in the global scope 615 # with the <channel> and <data> values as arguments. Otherwise, this 616 # does nothing. 615 617 # 616 618 itcl::body Rappture::VisViewer::ReceiveEcho {channel {data ""}} { … … 630 632 set inner [frame $itk_component(plotarea).view.splash] 631 633 $inner configure -relief raised -bd 2 632 label $inner.text1 -text " Rendering...\nPlease wait." \634 label $inner.text1 -text "Working...\nPlease wait." \ 633 635 -font "Arial 10" 634 636 label $inner.icon … … 873 875 } 874 876 877 itcl::body Rappture::VisViewer::GetColormapList { args } { 878 array set opts { 879 -includeDefault 0 880 -includeElementDefault 0 881 -includeNone 0 882 } 883 if {[llength $args] > 0} { 884 foreach opt $args { 885 set opts($opt) 1 886 } 887 } 888 set colormaps [list] 889 if {$opts(-includeDefault)} { 890 lappend colormaps "default" "default" 891 } 892 if {$opts(-includeElementDefault)} { 893 lappend colormaps "elementDefault" "elementDefault" 894 } 895 lappend colormaps \ 896 "BCGYR" "BCGYR" \ 897 "BGYOR" "BGYOR" \ 898 "blue-to-brown" "blue-to-brown" \ 899 "blue-to-orange" "blue-to-orange" \ 900 "blue-to-grey" "blue-to-grey" \ 901 "green-to-magenta" "green-to-magenta" \ 902 "greyscale" "greyscale" \ 903 "nanohub" "nanohub" \ 904 "rainbow" "rainbow" \ 905 "spectral" "spectral" \ 906 "ROYGB" "ROYGB" \ 907 "RYGCB" "RYGCB" \ 908 "white-to-blue" "white-to-blue" \ 909 "brown-to-blue" "brown-to-blue" \ 910 "grey-to-blue" "grey-to-blue" \ 911 "orange-to-blue" "orange-to-blue" 912 if {$opts(-includeNone)} { 913 lappend colormaps "none" "none" 914 } 915 return $colormaps 916 } 875 917 876 918 itcl::body Rappture::VisViewer::ColorsToColormap { colors } { … … 900 942 } 901 943 } 902 " blue" {944 "white-to-blue" { 903 945 return { 904 946 0.0 0.900 1.000 1.000
Note: See TracChangeset
for help on using the changeset viewer.