Ignore:
Timestamp:
Dec 17, 2009 8:07:21 AM (14 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/periodictable.tcl

    r1627 r1629  
    5252        actinoid-background                             \#ff99cc
    5353        actinoid-foreground                             black
    54         alkali_metal-activebackground                   \#cd3434
    55         alkali_metal-activeforeground                   white
    56         alkali_metal-disabledbackground                 \#ff6666
    57         alkali_metal-disabledforeground                 \#D04747
    58         alkali_metal-background                         \#ff6666
    59         alkali_metal-foreground                         black
    60         alkaline_earth_metal-activebackground           \#cdac7b
    61         alkaline_earth_metal-activeforeground           white
    62         alkaline_earth_metal-disabledbackground         \#ffdead
    63         alkaline_earth_metal-disabledforeground         \#C19A64
    64         alkaline_earth_metal-background                 \#ffdead
    65         alkaline_earth_metal-foreground                 black
     54        alkali-metal-activebackground                   \#cd3434
     55        alkali-metal-activeforeground                   white
     56        alkali-metal-disabledbackground                 \#ff6666
     57        alkali-metal-disabledforeground                 \#D04747
     58        alkali-metal-background                         \#ff6666
     59        alkali-metal-foreground                         black
     60        alkaline-earth-metal-activebackground           \#cdac7b
     61        alkaline-earth-metal-activeforeground           white
     62        alkaline-earth-metal-disabledbackground         \#ffdead
     63        alkaline-earth-metal-disabledforeground         \#C19A64
     64        alkaline-earth-metal-background                 \#ffdead
     65        alkaline-earth-metal-foreground                 black
    6666        halogen-activebackground                        \#cdcd67
    6767        halogen-activeforeground                        white
     
    8282        metalloid-background                            \#cccc99
    8383        metalloid-foreground                            black
    84         noble_gas-activebackground                      \#8ecdcd
    85         noble_gas-activeforeground                      white
    86         noble_gas-disabledbackground                    \#c0ffff
    87         noble_gas-disabledforeground                    \#7FC1C1
    88         noble_gas-background                            \#c0ffff
    89         noble_gas-foreground                            black
    90         other_non_metal-activebackground                \#6ecd6e
    91         other_non_metal-activeforeground                white
    92         other_non_metal-disabledbackground              \#a0ffa0
    93         other_non_metal-disabledforeground              \#6ACD6A
    94         other_non_metal-background                      \#a0ffa0
    95         other_non_metal-foreground                      black
    96         post_transition_metal-activebackground          \#9a9a9a       
    97         post_transition_metal-activeforeground          white
    98         post_transition_metal-disabledbackground        \#cccccc
    99         post_transition_metal-disabledforeground        \#999999
    100         post_transition_metal-background                \#cccccc
    101         post_transition_metal-foreground                black
    102         transition_metal-activebackground               \#cd8e8e
    103         transition_metal-activeforeground               white
    104         transition_metal-disabledbackground             \#ffc0c0
    105         transition_metal-disabledforeground             \#C77E7E
    106         transition_metal-background                     \#ffc0c0
    107         transition_metal-foreground                     black
     84        noble-gas-activebackground                      \#8ecdcd
     85        noble-gas-activeforeground                      white
     86        noble-gas-disabledbackground                    \#c0ffff
     87        noble-gas-disabledforeground                    \#7FC1C1
     88        noble-gas-background                            \#c0ffff
     89        noble-gas-foreground                            black
     90        other-non-metal-activebackground                \#6ecd6e
     91        other-non-metal-activeforeground                white
     92        other-non-metal-disabledbackground              \#a0ffa0
     93        other-non-metal-disabledforeground              \#6ACD6A
     94        other-non-metal-background                      \#a0ffa0
     95        other-non-metal-foreground                      black
     96        post-transition-metal-activebackground          \#9a9a9a       
     97        post-transition-metal-activeforeground          white
     98        post-transition-metal-disabledbackground        \#cccccc
     99        post-transition-metal-disabledforeground        \#999999
     100        post-transition-metal-background                \#cccccc
     101        post-transition-metal-foreground                black
     102        transition-metal-activebackground               \#cd8e8e
     103        transition-metal-activeforeground               white
     104        transition-metal-disabledbackground             \#ffc0c0
     105        transition-metal-disabledforeground             \#C77E7E
     106        transition-metal-background                     \#ffc0c0
     107        transition-metal-foreground                     black
    108108        unknown-activebackground                        \#cdcdcd
    109109        unknown-activeforeground                        white
     
    114114    }
    115115    private common _tableData {
    116         Hydrogen        1  H  1.0079    1 1     other_non_metal
    117         Helium          2  He 4.0026    1 18    noble_gas
    118         Lithium         3  Li 6.941(2)  2 1     alkali_metal
    119         Beryllium       4  Be 9.0122    2 2     alkaline_earth_metal
     116        Hydrogen        1  H  1.0079    1 1     other-non-metal
     117        Helium          2  He 4.0026    1 18    noble-gas
     118        Lithium         3  Li 6.941(2)  2 1     alkali-metal
     119        Beryllium       4  Be 9.0122    2 2     alkaline-earth-metal
    120120        Boron           5  B  10.811(7) 2 13    metalloid
    121         Carbon          6  C  12.011    2 14    other_non_metal
    122         Nitrogen        7  N  14.007    2 15    other_non_metal
    123         Oxygen          8  O  15.999    2 16    other_non_metal
     121        Carbon          6  C  12.011    2 14    other-non-metal
     122        Nitrogen        7  N  14.007    2 15    other-non-metal
     123        Oxygen          8  O  15.999    2 16    other-non-metal
    124124        Fluorine        9  F  18.998    2 17    halogen
    125         Neon            10 Ne 20.180    2 18    noble_gas
     125        Neon            10 Ne 20.180    2 18    noble-gas
    126126       
    127         Sodium          11 Na 22.990    3 1     alkali_metal
    128         Magnesium       12 Mg 24.305    3 2     alkaline_earth_metal
    129         Aluminium       13 Al 26.982    3 13    post_transition_metal
     127        Sodium          11 Na 22.990    3 1     alkali-metal
     128        Magnesium       12 Mg 24.305    3 2     alkaline-earth-metal
     129        Aluminium       13 Al 26.982    3 13    post-transition-metal
    130130        Silicon         14 Si 28.086    3 14    metalloid
    131         Phosphorus      15 P  30.974    3 15    other_non_metal
    132         Sulfur          16 S  32.066(6) 3 16    other_non_metal
     131        Phosphorus      15 P  30.974    3 15    other-non-metal
     132        Sulfur          16 S  32.066(6) 3 16    other-non-metal
    133133        Chlorine        17 Cl 35.453    3 17    halogen
    134         Argon           18 Ar 39.948(1) 3 18    noble_gas
     134        Argon           18 Ar 39.948(1) 3 18    noble-gas
    135135       
    136         Potassium       19 K  39.098    4 1     alkali_metal
    137         Calcium         20 Ca 40.078(4) 4 2     alkaline_earth_metal
    138         Scandium        21 Sc 44.956    4 3     transition_metal
    139         Titanium        22 Ti 47.867(1) 4 4     transition_metal
    140         Vanadium        23 V  50.942(1) 4 5     transition_metal
    141         Chromium        24 Cr 51.996    4 6     transition_metal
    142         Manganese       25 Mn 54.938    4 7     transition_metal
    143         Iron            26 Fe 55.845(2) 4 8     transition_metal
    144         Cobalt          27 Co 58.933    4 9     transition_metal
    145         Nickel          28 Ni 58.693    4 10    transition_metal
    146         Copper          29 Cu 63.546(3) 4 11    transition_metal
    147         Zinc            30 Zn 65.39(2)  4 12    transition_metal
    148         Gallium         31 Ga 69.723(1) 4 13    post_transition_metal
     136        Potassium       19 K  39.098    4 1     alkali-metal
     137        Calcium         20 Ca 40.078(4) 4 2     alkaline-earth-metal
     138        Scandium        21 Sc 44.956    4 3     transition-metal
     139        Titanium        22 Ti 47.867(1) 4 4     transition-metal
     140        Vanadium        23 V  50.942(1) 4 5     transition-metal
     141        Chromium        24 Cr 51.996    4 6     transition-metal
     142        Manganese       25 Mn 54.938    4 7     transition-metal
     143        Iron            26 Fe 55.845(2) 4 8     transition-metal
     144        Cobalt          27 Co 58.933    4 9     transition-metal
     145        Nickel          28 Ni 58.693    4 10    transition-metal
     146        Copper          29 Cu 63.546(3) 4 11    transition-metal
     147        Zinc            30 Zn 65.39(2)  4 12    transition-metal
     148        Gallium         31 Ga 69.723(1) 4 13    post-transition-metal
    149149        Germanium       32 Ge 72.61(2)  4 14    metalloid
    150150        Arsenic         33 As 74.922    4 15    metalloid
    151         Selenium        34 Se 78.96(3)  4 16    other_non_metal
     151        Selenium        34 Se 78.96(3)  4 16    other-non-metal
    152152        Bromine         35 Br 79.904(1) 4 17    halogen
    153         Krypton         36 Kr 83.80(1)  4 18    noble_gas
     153        Krypton         36 Kr 83.80(1)  4 18    noble-gas
    154154       
    155         Rubidium        37 Rb 85.468    5 1     alkali_metal
    156         Strontium       38 Sr 87.62(1)  5 2     alkaline_earth_metal
    157         Yttrium         39 Y  88.906    5 3     transition_metal
    158         Zirconium       40 Zr 91.224(2) 5 4     transition_metal
    159         Niobium         41 Nb 92.906    5 5     transition_metal
    160         Molybdenum      42 Mo 95.94(1)  5 6     transition_metal
    161         Technetium      43 Tc [97.907]  5 7     transition_metal
    162         Ruthenium       44 Ru 101.07(2) 5 8     transition_metal
    163         Rhodium         45 Rh 102.906   5 9     transition_metal
    164         Palladium       46 Pd 106.42(1) 5 10    transition_metal
    165         Silver          47 Ag 107.868   5 11    transition_metal
    166         Cadmium         48 Cd 112.411(8) 5 12   transition_metal
    167         Indium          49 In 114.818(3) 5 13   post_transition_metal
    168         Tin             50 Sn 118.710(7) 5 14   post_transition_metal
     155        Rubidium        37 Rb 85.468    5 1     alkali-metal
     156        Strontium       38 Sr 87.62(1)  5 2     alkaline-earth-metal
     157        Yttrium         39 Y  88.906    5 3     transition-metal
     158        Zirconium       40 Zr 91.224(2) 5 4     transition-metal
     159        Niobium         41 Nb 92.906    5 5     transition-metal
     160        Molybdenum      42 Mo 95.94(1)  5 6     transition-metal
     161        Technetium      43 Tc [97.907]  5 7     transition-metal
     162        Ruthenium       44 Ru 101.07(2) 5 8     transition-metal
     163        Rhodium         45 Rh 102.906   5 9     transition-metal
     164        Palladium       46 Pd 106.42(1) 5 10    transition-metal
     165        Silver          47 Ag 107.868   5 11    transition-metal
     166        Cadmium         48 Cd 112.411(8) 5 12   transition-metal
     167        Indium          49 In 114.818(3) 5 13   post-transition-metal
     168        Tin             50 Sn 118.710(7) 5 14   post-transition-metal
    169169        Antimony        51 Sb 121.760(1) 5 15   metalloid
    170170        Tellurium       52 Te 127.60(3) 5 16    metalloid
    171171        Iodine          53 I  126.904   5 17    halogen
    172         Xenon           54 Xe 131.29(2) 5 18    noble_gas
     172        Xenon           54 Xe 131.29(2) 5 18    noble-gas
    173173       
    174         Cesium          55 Cs 132.905   6 1     alkali_metal
    175         Barium          56 Ba 137.327(7) 6 2    alkaline_earth_metal
     174        Cesium          55 Cs 132.905   6 1     alkali-metal
     175        Barium          56 Ba 137.327(7) 6 2    alkaline-earth-metal
    176176        Lanthanides     57-71 * *       6 3     lanthanoid
    177         Hafnium         72 Hf 178.49(2) 6 4     transition_metal
    178         Tantalum        73 Ta 180.948   6 5     transition_metal
    179         Tungsten        74 W  183.84(1) 6 6     transition_metal
    180         Rhenium         75 Re 186.207(1) 6 7    transition_metal
    181         Osmium          76 Os 190.23(3) 6 8     transition_metal
    182         Iridium         77 Ir 192.217(3) 6 9    transition_metal
    183         Platinum        78 Pt 195.084(9) 6 10   transition_metal
    184         Gold            79 Au 196.967 6 11      transition_metal
    185         Mercury         80 Hg 200.59(2) 6 12    transition_metal
    186         Thallium        81 Tl 204.383   6 13    post_transition_metal
    187         Lead            82 Pb 207.2(1) 6 14     post_transition_metal
    188         Bismuth         83 Bi 208.980   6 15    post_transition_metal
     177        Hafnium         72 Hf 178.49(2) 6 4     transition-metal
     178        Tantalum        73 Ta 180.948   6 5     transition-metal
     179        Tungsten        74 W  183.84(1) 6 6     transition-metal
     180        Rhenium         75 Re 186.207(1) 6 7    transition-metal
     181        Osmium          76 Os 190.23(3) 6 8     transition-metal
     182        Iridium         77 Ir 192.217(3) 6 9    transition-metal
     183        Platinum        78 Pt 195.084(9) 6 10   transition-metal
     184        Gold            79 Au 196.967 6 11      transition-metal
     185        Mercury         80 Hg 200.59(2) 6 12    transition-metal
     186        Thallium        81 Tl 204.383   6 13    post-transition-metal
     187        Lead            82 Pb 207.2(1) 6 14     post-transition-metal
     188        Bismuth         83 Bi 208.980   6 15    post-transition-metal
    189189        Polonium        84 Po [208.982] 6 16    metalloid
    190190        Astatine        85 At [209.987] 6 17    halogen
    191         Radon           86 Rn [222.018] 6 18    noble_gas
     191        Radon           86 Rn [222.018] 6 18    noble-gas
    192192       
    193         Francium        87 Fr [223.020] 7 1     alkali_metal
    194         Radium          88 Ra [226.0254] 7 2    alkaline_earth_metal
     193        Francium        87 Fr [223.020] 7 1     alkali-metal
     194        Radium          88 Ra [226.0254] 7 2    alkaline-earth-metal
    195195        Actinides       89-103 * * 7 3          actinoid
    196         Rutherfordium   104 Rf [263.113] 7 4    transition_metal
    197         Dubnium         105 Db [262.114] 7 5    transition_metal
    198         Seaborgium      106 Sg [266.122] 7 6    transition_metal
    199         Bohrium         107 Bh [264.1247] 7 7   transition_metal
    200         Hassium         108 Hs [269.134] 7 8    transition_metal
    201         Meitnerium      109 Mt [268.139] 7 9    transition_metal
    202         Darmstadtium    110 Ds [272.146] 7 10   transition_metal
    203         Roentgenium     111 Rg [272.154] 7 11   transition_metal
    204         Ununbium        112 Uub [277]   7 12    transition_metal
    205         Ununtrium       113 Uut [284] 7 13      post_transition_metal
    206         Ununquadium     114 Uuq [289] 7 14      post_transition_metal
    207         Ununpentium     115 Uup [288] 7 15      post_transition_metal
    208         Ununhexium      116 Uuh [292]  7 16     post_transition_metal
     196        Rutherfordium   104 Rf [263.113] 7 4    transition-metal
     197        Dubnium         105 Db [262.114] 7 5    transition-metal
     198        Seaborgium      106 Sg [266.122] 7 6    transition-metal
     199        Bohrium         107 Bh [264.1247] 7 7   transition-metal
     200        Hassium         108 Hs [269.134] 7 8    transition-metal
     201        Meitnerium      109 Mt [268.139] 7 9    transition-metal
     202        Darmstadtium    110 Ds [272.146] 7 10   transition-metal
     203        Roentgenium     111 Rg [272.154] 7 11   transition-metal
     204        Ununbium        112 Uub [277]   7 12    transition-metal
     205        Ununtrium       113 Uut [284] 7 13      post-transition-metal
     206        Ununquadium     114 Uuq [289] 7 14      post-transition-metal
     207        Ununpentium     115 Uup [288] 7 15      post-transition-metal
     208        Ununhexium      116 Uuh [292]  7 16     post-transition-metal
    209209        Ununseptium     117 Uus ? 7 17          unknown
    210210        Ununoctium      118 Uuo [294] 7 18      unknown
     
    242242        Lawrencium      103 Lr [262.110] 9 17   actinoid
    243243    }
     244    private common _types
     245    array set _types {
     246        actinoid {
     247            Actinides Actinium Americium Berkelium Californium Curium
     248            Einsteinium Fermium Mendelevium Neptunium Plutonium Protactinium
     249            Thorium Uranium Lawrencium Nobelium
     250        }
     251        alkali-metal {
     252            Cesium Francium Lithium Potassium Rubidium Sodium           
     253        }
     254        alkaline-earth-metal {
     255            Barium Beryllium Calcium Magnesium Radium Strontium
     256        }
     257        halogen {
     258            Astatine Bromine Chlorine Fluorine Iodine           
     259        }
     260        lanthanoid {
     261            Cerium Erbium Europium Gadolinium Holmium Lanthanides Lanthanum     
     262            Lutetium Neodymium Praseodymium Promethium Samarium Terbium
     263            Thulium Ytterbium Dysprosium       
     264        }
     265        metalloid {
     266            Arsenic Boron Germanium Polonium Silicon Tellurium Antimony
     267        }
     268        noble-gas {
     269            Argon Helium Krypton Neon Radon Xenon
     270        }
     271        other-non-metal {
     272            Carbon Hydrogen Nitrogen Sulfur Oxygen Phosphorus Selenium 
     273        }
     274        post-transition-metal {
     275            Aluminium Bismuth Gallium Indium Lead Thallium Tin Ununhexium
     276            Ununpentium Ununquadium Ununtrium   
     277        }
     278        transition-metal {
     279            Chromium Cobalt Copper Dubnium Gold Hafnium Hassium Iridium         
     280            Iron Manganese Meitnerium Mercury Molybdenum Nickel Niobium         
     281            Osmium Palladium Rhenium Rhodium Roentgenium Ruthenium
     282            Rutherfordium Scandium Seaborgium Silver Tantalum Technetium
     283            Titanium Tungsten Ununbium Vanadium Yttrium Zinc Zirconium
     284            Bohrium Cadmium Darmstadtium Platinum       
     285        }
     286        unknown {
     287            Ununoctium 
     288            Ununseptium
     289        }
     290    }
    244291}
    245292   
     
    311358        $c bind $elem <ButtonRelease-1> {}
    312359    }
     360    set arglist {}
     361    foreach arg $args {
     362        if { [info exists _types($arg)] } {
     363            set arglist [concat $arglist $_types($arg)]
     364        } else {
     365            lappend arglist $arg
     366        }
     367    }
     368    set args $arglist
    313369    foreach arg $args {
    314370        set elem [FindElement $arg]
     
    337393itcl::body Rappture::PeriodicTable::disable {args} {
    338394    set c $itk_component(table)
    339     foreach name [array names _table] {
    340         set _state($name) "normal"
     395    foreach elem [array names _table] {
     396        set _state($elem) "normal"
    341397        $c bind $elem <Enter> \
    342398            [itcl::code $this Activate %W $elem %X %Y]
     
    344400        $c bind $elem <ButtonRelease-1> [itcl::code $this value $elem]
    345401    }
     402    set arglist {}
     403    foreach arg $args {
     404        if { [info exists _types($arg)] } {
     405            set arglist [concat $arglist $_types($arg)]
     406        } else {
     407            lappend arglist $arg
     408        }
     409    }
     410    set args $arglist
    346411    foreach arg $args {
    347412        set elem [FindElement $arg]
     
    556621    return ""
    557622}
    558 
     623                                                               
Note: See TracChangeset for help on using the changeset viewer.