Changeset 7
- Timestamp:
- Mar 25, 2005, 8:22:06 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/apps/driver
r6 r7 150 150 set dfirst "" 151 151 set dlist [$config children -type structure controls] 152 puts "device: $dlist" 152 153 if {"" != $dlist} { 153 154 foreach dname $dlist { 154 155 set obj [$config element -flavor object controls.$dname] 155 156 set name [$obj get label] 157 puts " => $name = $obj" 156 158 set devs($name) $obj 157 159 } … … 175 177 set first [lindex $devlist 0] 176 178 set dfirst $devs($first) 177 Rappture::DeviceViewer1D $w.device -device $devs($first) \ 178 -tool $tool -library $lib 179 set tags [$dfirst children] 180 set i [lsearch $tags label] 181 if {$i >= 0} {set tags [lreplace $tags $i $i]} 182 183 puts "first device: tags = $tags" 184 if {$tags == "molecule"} { 185 Rappture::MoleculeViewer $w.device -device $devs($first) \ 186 -library $lib 187 } else { 188 Rappture::DeviceViewer1D $w.device -device $devs($first) \ 189 -tool $tool -library $lib 190 } 179 191 pack $w.device -expand yes -fill both 180 192 … … 198 210 switch -glob -- $name { 199 211 parameters.ambient* - structure* { 200 $win.input.device controls add $name201 } 202 } 203 } 212 ## $win.input.device controls add $name 213 } 214 } 215 } -
trunk/lib/library.xml
r6 r7 28 28 </group> 29 29 </parameters> 30 <elements> 31 <atom id="H"> 32 <color>white</color> 33 <scale>0.7</scale> 34 </atom> 35 <atom id="C"> 36 <color>green</color> 37 <scale>1.0</scale> 38 </atom> 39 <atom id="O"> 40 <color>red</color> 41 <scale>1.0</scale> 42 </atom> 43 <atom id="N"> 44 <color>blue</color> 45 <scale>1.0</scale> 46 </atom> 47 <atom id="S"> 48 <color>yellow</color> 49 <scale>1.0</scale> 50 </atom> 51 </elements> 30 52 <materials> 31 53 <material name="GaAs"> -
trunk/tcl/scripts/library.tcl
r6 r7 57 57 } 58 58 59 # otherwise, try to open the file and create its LibraryObj 60 set fid [::open $fname r] 61 set info [read $fid] 62 close $fid 59 if {[regexp {^<\?[Xx][Mm][Ll]} $fname]} { 60 set info $fname 61 } else { 62 # otherwise, try to open the file and create its LibraryObj 63 set fid [::open $fname r] 64 set info [read $fid] 65 close $fid 66 } 63 67 64 68 set obj [Rappture::LibraryObj ::#auto $info]
Note: See TracChangeset
for help on using the changeset viewer.