Changeset 7 for trunk/gui/apps/driver


Ignore:
Timestamp:
Mar 25, 2005 8:22:06 AM (16 years ago)
Author:
mmc
Message:

Created an initial EnergyLevels? viewer and MoleculeViewer?. The
MoleculeViewer? is integrated into the driver, but the EnergyLevels?
is not. The material library file contains some new properties
for the appearance of atoms, and the MoleculeViewer? uses this.
Both energyLevels.tcl and moleculeViewer.tcl still have some
driver code at the bottom of the files, so you can run them as
a single file, by themselves, for testing. This code should be
removed when we get further along.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/apps/driver

    r6 r7  
    150150set dfirst ""
    151151set dlist [$config children -type structure controls]
     152puts "device: $dlist"
    152153if {"" != $dlist} {
    153154    foreach dname $dlist {
    154155        set obj [$config element -flavor object controls.$dname]
    155156        set name [$obj get label]
     157puts " => $name = $obj"
    156158        set devs($name) $obj
    157159    }
     
    175177    set first [lindex $devlist 0]
    176178    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
     183puts "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    }
    179191    pack $w.device -expand yes -fill both
    180192
     
    198210    switch -glob -- $name {
    199211        parameters.ambient* - structure* {
    200             $win.input.device controls add $name
    201         }
    202     }
    203 }
     212##            $win.input.device controls add $name
     213        }
     214    }
     215}
Note: See TracChangeset for help on using the changeset viewer.