Changeset 2287 for branches/blt4/gui
- Timestamp:
- Jun 21, 2011, 3:41:22 PM (13 years ago)
- Location:
- branches/blt4/gui/scripts
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4/gui/scripts/datatable.tcl
r1941 r2287 144 144 package require blt_datatable_csv 145 145 $d0 import csv -data $csvdata 146 for { set row 1 } { $row <= [$d0 row length] } { incr row } {146 for { set row 1 } { $row <= [$d0 numrows] } { incr row } { 147 147 set child [$_tree insert 0] 148 148 set c 0 -
branches/blt4/gui/scripts/datatableresult.tcl
r2098 r2287 312 312 } 313 313 foreach col [$itk_component(treeview) column names] { 314 if { [string match "BLT TreeView*" $col] } {315 continue316 }317 314 $itk_component(treeview) column delete $col 318 315 } -
branches/blt4/gui/scripts/numberresult.tcl
r2173 r2287 875 875 set g $itk_component(plot) 876 876 set elem "" 877 877 878 878 # Peek inside of Blt_ZoomStack package to see if we're currently in the 879 879 # middle of a zoom selection. … … 882 882 } 883 883 set tip "" 884 set found 0 884 885 if {$state == "at"} { 885 if {[$g element closest $x $y info -interpolate yes]} { 886 set results [$g element closest $x $y -interpolate yes] 887 if { $results != "" } { 888 array set info $results 886 889 # for dealing with xy line plots 887 890 set elem $info(name) 891 888 892 # Some elements are generated dynamically and therefore will 889 # not have a data object associated with them.893 # not have a dataobj object associated with them. 890 894 set mapx [$g element cget $elem -mapx] 891 895 set mapy [$g element cget $elem -mapy] … … 896 900 # search again for an exact point -- this time don't interpolate 897 901 set tip "" 898 if {[$g element closest $x $y info -interpolate no] 899 && $info(name) == $elem} { 902 array unset info 903 set results [$g element closest $x $y -interpolate no] 904 array set info $results 905 906 if { [info exists info(name)] && $info(name) == $elem } { 907 set found 1 908 900 909 set x [$g axis transform $mapx $info(x)] 901 910 set y [$g axis transform $mapy $info(y)] 902 911 912 set tip "" 903 913 if {[info exists _elem2dataobj($elem)]} { 904 914 set dataobj $_elem2dataobj($elem) … … 917 927 } 918 928 } 919 set state 1 920 } elseif {[$g element closest $x $y info -interpolate no]} { 921 # for dealing with xy scatter plot 922 set elem $info(name) 923 foreach {mapx mapy} [GetAxes $_elem2dataobj($elem)] break 924 925 # search again for an exact point -- this time don't interpolate 926 set tip "" 927 if {$info(name) == $elem} { 929 } else { 930 set results [$g element closest $x $y -interpolate no] 931 if { $results != "" } { 932 set found 1 933 934 array unset info 935 array set info $results 936 # for dealing with xy scatter plot 937 set elem $info(name) 938 939 # Some elements are generated dynamically and therefore will 940 # not have a dataobj object associated with them. 941 set mapx [$g element cget $elem -mapx] 942 set mapy [$g element cget $elem -mapy] 943 if {[info exists _elem2dataobj($elem)]} { 944 foreach {mapx mapy} [GetAxes $_elem2dataobj($elem)] break 945 } 946 947 set tip "" 928 948 set x [$g axis transform $mapx $info(x)] 929 949 set y [$g axis transform $mapy $info(y)] 930 950 931 951 if {[info exists _elem2dataobj($elem)]} { 932 952 set dataobj $_elem2dataobj($elem) … … 945 965 } 946 966 } 947 set state 1 948 } else { 949 set state 0 950 } 951 } 952 953 if {$state} { 967 } 968 } 969 970 if { $found } { 954 971 # 955 972 # Highlight ON: … … 958 975 # - pop up tooltip about data 959 976 # 960 if { $_hilite(elem) != "" && $_hilite(elem) != $elem} {977 if { [$g element exists $_hilite(elem)] && $_hilite(elem) != $elem } { 961 978 $g element deactivate $_hilite(elem) 962 979 $g crosshairs configure -hide yes … … 966 983 set _hilite(elem) $elem 967 984 968 set dlist [$g element show] 969 set i [lsearch -exact $dlist $elem] 970 if {$i >= 0} { 971 set dlist [lreplace $dlist $i $i] 972 lappend dlist $elem 973 $g element show $dlist 974 } 975 976 foreach {mapx mapy} [GetAxes $_elem2dataobj($elem)] break 977 985 set mapx [$g element cget $elem -mapx] 986 set mapy [$g element cget $elem -mapy] 987 if {[info exists _elem2dataobj($elem)]} { 988 foreach {mapx mapy} [GetAxes $_elem2dataobj($elem)] break 989 } 978 990 set allx [$g x2axis use] 979 991 if {[llength $allx] > 0} { … … 1042 1054 # - take down tooltip 1043 1055 # 1044 if { "" != $_hilite(elem)} {1056 if { [$g element exists $_hilite(elem)] } { 1045 1057 $g element deactivate $_hilite(elem) 1046 1047 set allx [$g x2axis use] 1048 if {[llength $allx] > 0} { 1049 lappend allx x ;# fix main x-axis too 1050 foreach axis $allx { 1051 $g axis configure $axis -color $itk_option(-foreground) \ 1052 -titlecolor $itk_option(-foreground) 1053 } 1054 } 1055 1056 set ally [$g y2axis use] 1057 if {[llength $ally] > 0} { 1058 lappend ally y ;# fix main y-axis too 1059 foreach axis $ally { 1060 $g axis configure $axis -color $itk_option(-foreground) \ 1061 -titlecolor $itk_option(-foreground) 1062 } 1058 } 1059 set allx [$g x2axis use] 1060 if {[llength $allx] > 0} { 1061 lappend allx x ;# fix main x-axis too 1062 foreach axis $allx { 1063 $g axis configure $axis -color $itk_option(-foreground) \ 1064 -titlecolor $itk_option(-foreground) 1065 } 1066 } 1067 1068 set ally [$g y2axis use] 1069 if {[llength $ally] > 0} { 1070 lappend ally y ;# fix main y-axis too 1071 foreach axis $ally { 1072 $g axis configure $axis -color $itk_option(-foreground) \ 1073 -titlecolor $itk_option(-foreground) 1063 1074 } 1064 1075 } … … 1071 1082 } 1072 1083 1073 # there is no currently highlighted element1084 # There is no currently highlighted element 1074 1085 set _hilite(elem) "" 1075 1086 } … … 1539 1550 # ---------------------------------------------------------------------- 1540 1551 itcl::configbody Rappture::NumberResult::gridcolor { 1541 if {"" == $itk_option(-gridcolor)} { 1542 $itk_component(plot) grid off 1552 if { "" == $itk_option(-gridcolor) } { 1553 foreach axis [$itk_component(plot) axis names] { 1554 $itk_component(plot) axis configure $axis -grid off 1555 } 1543 1556 } else { 1544 $itk_component(plot) grid configure -color $itk_option(-gridcolor) 1545 $itk_component(plot) grid on 1546 } 1547 } 1557 foreach axis [$itk_component(plot) axis names] { 1558 $itk_component(plot) axis configure $axis \ 1559 -gridcolor $itk_option(-gridcolor) -grid on 1560 } 1561 } 1562 } -
branches/blt4/gui/scripts/resultviewer.tcl
r2242 r2287 350 350 set mode "number" 351 351 if {![info exists _mode2widget($mode)]} { 352 pset w $itk_interior.number352 set w $itk_interior.number 353 353 Rappture::NumberResult $w 354 354 set _mode2widget($mode) $w
Note: See TracChangeset
for help on using the changeset viewer.