home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume19 / xpt / part01 / xpt.h < prev   
Encoding:
C/C++ Source or Header  |  1993-04-28  |  10.3 KB  |  273 lines

  1. /**
  2.  *
  3.  * xpt -- An X Periodic Table
  4.  *
  5.  * xpt.h -- some necessary global variables, data types, and LOTS of info
  6.  *
  7.  * Written by Joel P. Lord 03/05/93
  8.  *
  9.  *    This software is available for free distribution,
  10.  * under the condition that this not be removed from the
  11.  * source code.
  12.  *
  13. **/
  14.  
  15. #include <X11/Intrinsic.h>
  16. #include <X11/StringDefs.h>
  17. #include <X11/Xaw/XawInit.h>
  18. #include <X11/Xaw/Simple.h>
  19. #include <X11/Xaw/Command.h>
  20. #include <X11/extensions/Xext.h>
  21. #include <X11/Xaw/Command.h>
  22. #include <X11/Xaw/Box.h>
  23. #include <X11/Xaw/Form.h>
  24. #include <X11/Xaw/Dialog.h>
  25. #include <X11/Xaw/Scrollbar.h>
  26. #include <X11/Xaw/List.h>
  27. #include <X11/Xaw/Label.h>
  28. #include "Xprogs.h"
  29. #include "fontlist.h"
  30.  
  31. struct element_stats {
  32.   double        atomic_radius;
  33.   double        covalent_radius;
  34.   unsigned      atomic_number;
  35.   double        atomic_mass;
  36.   char          symbol[4];
  37.   double    boiling_pt;
  38.   double    melting_pt;
  39.   double    density;
  40.   double    atomic_volume;
  41.   char        name[14];
  42. };
  43.  
  44. #ifdef MAIN
  45.  
  46. Widget toplevel, MainW;
  47. int done;
  48. Colormap default_cmap;
  49. unsigned long red, white, slate_grey;
  50. XFontStruct *BigFont;
  51. GC BigGC;
  52.  
  53. struct element_stats p_table[] = {
  54. 0.79, 0.32,   1, 1.00794    , "H  ", 20.268, 14.025 , 0.0899 , 14.4 ,
  55.   "Hydrogen     ",
  56. 0.49, 0.93,   2, 4.002602   , "He ", 4.215 , 0.95   , 0.1787 , 0.0  ,
  57.   "Helium       ",
  58. 2.05, 1.23,   3, 6.941      , "Li ", 1615  , 453.7  , 0.53   , 13.10,
  59.   "Lithium      ",
  60. 1.40, 0.90,   4, 9.012182   , "Be ", 2745  , 1560.0 , 1.85   , 5.0  ,
  61.   "Beryllium    ",
  62. 1.17, 0.82,   5, 10.811     , "B  ", 4275  , 2300.0 , 2.34   , 4.6  ,
  63.   "Boron        ",
  64. 0.91, 0.77,   6, 12.011     , "C  ", 4470.0, 4100.0 , 2.62   , 4.58 ,
  65.   "Carbon       ",
  66. 0.75, 0.75,   7, 14.00674   , "N  ", 77.35 , 63.14  , 1.251  , 17.3 ,
  67.   "Nitrogen     ",
  68. 0.65, 0.73,   8, 15.9994    , "O  ", 90.18 , 50.35  , 1.429  , 14.0 ,
  69.   "Oxygen       ",
  70. 0.57, 0.72,   9, 18.9984032 , "F  ", 84.95 , 53.48  , 1.696  , 17.1 ,
  71.   "Fluorine     ",
  72. 0.51, 0.71,  10, 20.1797    , "Ne ", 27.096, 24.553 , 0.901  , 16.7 ,
  73.   "Neon         ",
  74. 2.23, 1.54,  11, 22.989768  , "Na ", 1156  , 371.0  , 0.97   , 23.7 ,
  75.   "Sodium       ",
  76. 1.72, 1.36,  12, 24.3050    , "Mg ", 1363  , 922    , 1.74   , 13.97,
  77.   "Magnesium    ",
  78. 1.82, 1.18,  13, 26.981539  , "Al ", 2793  , 933.25 , 2.70   , 10.0 ,
  79.   "Aluminum     ",
  80. 1.46, 1.11,  14, 28.0855    , "Si ", 3540.0, 1685   , 2.33   , 12.1 ,
  81.   "Silicon      ",
  82. 1.23, 1.06,  15, 30.97362   , "P  ", 550.0 , 317.30 , 1.82   , 17.0 ,
  83.   "Phosphorus   ",
  84. 1.09, 1.02,  16, 32.066     , "S  ", 717.75, 388.36 , 2.07   , 15.5 ,
  85.   "Sulfur       ",
  86. 0.97, 0.99,  17, 35.4527    , "Cl ", 239.1 , 172.16 , 3.17   , 22.7 ,
  87.   "Chlorine     ",
  88. 0.88, 0.98,  18, 39.948     , "Ar ", 87.30 , 83.81  , 1.784  , 28.5 ,
  89.   "Argon        ",
  90. 2.77, 2.03,  19, 39.0983    , "K  ", 1032  , 336.35 , 0.86   , 45.46,
  91.   "Potassium    ",
  92. 2.23, 1.91,  20, 40.078     , "Ca ", 1757  , 1112   , 1.55   , 29.9 ,
  93.   "Calcium      ",
  94. 2.09, 1.62,  21, 44.955910  , "Sc ", 3104  , 1812   , 3.0    , 15.0 ,
  95.   "Scandium     ",
  96. 2.00, 1.45,  22, 47.88      , "Ti ", 3562  , 1943   , 4.50   , 10.64,
  97.   "Titanium     ",
  98. 1.92, 1.34,  23, 50.9415    , "V  ", 3682  , 2175   , 5.8    , 8.78 ,
  99.   "Vanadium     ",
  100. 1.85, 1.18,  24, 51.9961    , "Cr ", 2945  , 2130.0 , 7.19   , 7.23 ,
  101.   "Chromium     ",
  102. 1.79, 1.17,  25, 54.93085   , "Mn ", 2335  , 1517   , 7.43   , 1.39 ,
  103.   "Manganese    ",
  104. 1.72, 1.17,  26, 55.847     , "Fe ", 3135  , 1809   , 7.86   , 7.1  ,
  105.   "Iron         ",
  106. 1.67, 1.16,  27, 58.93320   , "Co ", 3201  , 1768   , 8.90   , 6.7  ,
  107.   "Cobalt       ",
  108. 1.62, 1.15,  28, 58.69      , "Ni ", 3187  , 1726   , 8.90   , 6.59 ,
  109.   "Nickel       ",
  110. 1.57, 1.17,  29, 63.546     , "Cu ", 2836  , 1357.6 , 8.96   , 7.1  ,
  111.   "Copper       ",
  112. 1.53, 1.25,  30, 65.39      , "Zn ", 1180.0, 692.73 , 7.14   , 9.2  ,
  113.   "Zinc         ",
  114. 1.81, 1.26,  31, 69.723     , "Ga ", 2478  , 302.90 , 5.91   , 11.8 ,
  115.   "Gallium      ",
  116. 1.52, 1.22,  32, 72.61      , "Ge ", 3107  , 1210.4 , 5.32   , 13.6 ,
  117.   "Germanium    ",
  118. 1.33, 1.20,  33, 74.92159   , "As ", 876   , 1081   , 5.72   , 13.1 ,
  119.   "Arsenic      ",
  120. 1.22, 1.16,  34, 78.96      , "Se ", 958   , 494    , 4.80   , 16.45,
  121.   "Selenium     ",
  122. 1.12, 1.14,  35, 79.904     , "Br ", 332.25, 265.90 , 3.12   , 23.5 ,
  123.   "Bromine      ",
  124. 1.03, 1.12,  36, 83.80      , "Kr ", 119.80, 115.78 , 3.74   , 38.9 ,
  125.   "Krypton      ",
  126. 2.98, 2.16,  37, 85.4678    , "Rb ", 961   , 312.64 , 1.53   , 55.9 ,
  127.   "Rubidium     ",
  128. 2.45, 1.91,  38, 87.62      , "Sr ", 1650.0, 1041   , 2.6    , 33.7 ,
  129.   "Strontium    ",
  130. 2.27, 1.62,  39, 88.90585   , "Y  ", 3611  , 1799   , 4.5    , 19.8 ,
  131.   "Yttrium      ",
  132. 2.16, 1.45,  40, 91.224     , "Zr ", 4682  , 2125   , 6.49   , 14.1 ,
  133.   "Zirconium    ",
  134. 2.09, 1.34,  41, 92.90638   , "Nb ", 5017  , 2740.0 , 8.55   , 10.87,
  135.   "Niobium      ",
  136. 2.01, 1.30,  42, 95.94      , "Mo ", 4912  , 2890.0 , 10.2   , 9.4  ,
  137.   "Molybdenum   ",
  138. 1.95, 1.27,  43, 98         , "Tc ", 4538  , 2473   , 11.5   , 8.5  ,
  139.   "Technetium   ",
  140. 1.89, 1.25,  44, 101.07     , "Ru ", 4423  , 2523   , 12.2   , 8.3  ,
  141.   "Ruthenium    ",
  142. 1.83, 1.25,  45, 102.90550  , "Rh ", 3970.0, 2236   , 12.4   , 8.3  ,
  143.   "Rhodium      ",
  144. 1.79, 1.28,  46, 106.42     , "Pd ", 3237  , 1825   , 12.0   , 8.9  ,
  145.   "Palladium    ",
  146. 1.75, 1.34,  47, 107.8682   , "Ag ", 2436  , 1234   , 10.5   , 10.3 ,
  147.   "Silver       ",
  148. 1.71, 1.48,  48, 112.411    , "Cd ", 1040.0, 594.18 , 8.65   , 13.1 ,
  149.   "Cadmium      ",
  150. 2.00, 1.44,  49, 114.82     , "In ", 2346  , 429.76 , 7.31   , 15.7 ,
  151.   "Indium       ",
  152. 1.72, 1.41,  50, 118.710    , "Sn ", 2876  , 505.06 , 7.30   , 16.3 ,
  153.   "Tin          ",
  154. 1.53, 1.40,  51, 121.75     , "Sb ", 1860.0, 904    , 6.68   , 18.23,
  155.   "Antimony     ",
  156. 1.42, 1.36,  52, 127.60     , "Te ", 1261  , 722.65 , 6.24   , 20.5 ,
  157.   "Tellurium    ",
  158. 1.32, 1.33,  53, 126.90447  , "I  ", 458.4 , 386.7  , 4.92   , 25.74,
  159.   "Iodine       ",
  160. 1.24, 1.31,  54, 131.29     , "Xe ", 165.03, 161.36 , 5.89   , 37.3 ,
  161.   "Xenon        ",
  162. 3.34, 2.35,  55, 132.90543  , "Cs ", 944   , 301.55 , 1.87   , 71.07,
  163.   "Cesium       ",
  164. 2.78, 1.98,  56, 137.327    , "Ba ", 2171  , 1002   , 3.5    , 39.24,
  165.   "Barium       ",
  166. 2.74, 1.69,  57, 138.9055   , "La ", 3730.0, 1193   , 6.7    , 20.73,
  167.   "Lanthanum    ",
  168. 2.16, 1.44,  72, 178.49     , "Hf ", 4876  , 2500.0 , 13.1   , 13.6 ,
  169.   "Hafnium      ",
  170. 2.09, 1.34,  73, 180.9479   , "Ta ", 5731  , 3287   , 16.6   , 10.90,
  171.   "Tantalum     ",
  172. 2.02, 1.30,  74, 183.85     , "W  ", 5828  , 3680.0 , 19.3   , 9.53 ,
  173.   "Tungsten     ",
  174. 1.97, 1.28,  75, 186.207    , "Re ", 5869  , 3453   , 21.0   , 8.85 ,
  175.   "Rhenium      ",
  176. 1.92, 1.26,  76, 190.2      , "Os ", 5285  , 3300.0 , 22.4   , 8.49 ,
  177.   "Osmium       ",
  178. 1.87, 1.27,  77, 192.22     , "Ir ", 4701  , 2716   , 22.5   , 8.54 ,
  179.   "Iridium      ",
  180. 1.83, 1.30,  78, 195.08     , "Pt ", 4100.0, 2045   , 21.4   , 9.10 ,
  181.   "Platinum     ",
  182. 1.79, 1.34,  79, 196.96654  , "Au ", 3130.0, 1337.58, 19.3   , 10.2 ,
  183.   "Gold         ",
  184. 1.76, 1.49,  80, 200.59     , "Hg ", 630.0 , 234.28 , 13.53  , 14.82,
  185.   "Mercury      ",
  186. 2.08, 1.48,  81, 204.3833   , "Tl ", 1746  , 577    , 11.85  , 17.2 ,
  187.   "Thallium     ",
  188. 1.81, 1.47,  82, 207.2      , "Pb ", 2023  , 600.6  , 11.4   , 18.17,
  189.   "Lead         ",
  190. 1.63, 1.46,  83, 208.98037  , "Bi ", 1837  , 544.52 , 9.8    , 21.3 ,
  191.   "Bismuth      ",
  192. 1.53, 1.46,  84, 209        , "Po ", 1235  , 527    , 9.4    , 22.23,
  193.   "Polonium     ",
  194. 1.43, 1.45,  85, 210.0      , "At ", 610.0 , 575    , 0.0    , 0.0  ,
  195.   "Astatine     ",
  196. 1.34, 1.43,  86, 222        , "Rn ", 211   , 202    , 9.91   , 50.5 ,
  197.   "Radon        ",
  198. 3.50, 2.50,  87, 223        , "Fr ", 950.0 , 300.0  , 0.0    , 0.0  ,
  199.   "Francium     ",
  200. 3.00, 2.40,  88, 226.025    , "Ra ", 1809  , 973    , 5      , 45.20,
  201.   "Radium       ",
  202. 3.20, 2.20,  89, 227.028    , "Ac ", 3473  , 1323   , 10.07  , 22.54,
  203.   "Actinium     ",
  204. 2.70, 1.65,  58, 140.115    , "Ce ", 3699  , 1071   , 6.78   , 20.67,
  205.   "Cerium       ",
  206. 2.67, 1.65,  59, 140.90765  , "Pr ", 3785  , 1204   , 6.77   , 20.8 ,
  207.   "Praseodymium ",
  208. 2.64, 1.64,  60, 144.24     , "Nd ", 3341  , 1289   , 7.00   , 20.6 ,
  209.   "Neodymium    ",
  210. 2.62, 1.63,  61, 145        , "Pm ", 3785  , 1204   , 6.475  , 22.39,
  211.   "Promethium   ",
  212. 2.59, 1.62,  62, 150.36     , "Sm ", 2064  , 1345   , 7.54   , 19.95,
  213.   "Samarium     ",
  214. 2.56, 1.85,  63, 151.965    , "Eu ", 1870.0, 1090.0 , 5.26   , 28.9 ,
  215.   "Europium     ",
  216. 2.54, 1.61,  64, 157.25     , "Gd ", 3539  , 1585   , 7.89   , 19.9 ,
  217.   "Gadolinium   ",
  218. 2.51, 1.59,  65, 158.92534  , "Tb ", 3496  , 1630.0 , 8.27   , 19.2 ,
  219.   "Terbium      ",
  220. 2.49, 1.59,  66, 162.50     , "Dy ", 2835  , 1682   , 8.54   , 19.0 ,
  221.   "Dysprosium   ",
  222. 2.47, 1.58,  67, 164.93032  , "Ho ", 2968  , 1743   , 8.80   , 18.7 ,
  223.   "Holmium      ",
  224. 2.45, 1.57,  68, 167.26     , "Er ", 3136  , 1795   , 9.05   , 18.4 ,
  225.   "Erbium       ",
  226. 2.42, 1.56,  69, 168.93421  , "Tm ", 2220.0, 1818   , 9.33   , 18.1 ,
  227.   "Thulium      ",
  228. 2.40, 1.74,  70, 173.04     , "Yb ", 1467  , 1097   , 6.98   , 24.79,
  229.   "Ytterbium    ",
  230. 2.25, 1.56,  71, 174.967    , "Lu ", 3668  , 1936   , 9.84   , 17.78,
  231.   "Lutetium     ",
  232. 3.16, 1.65,  90, 232.0381   , "Th ", 5061  , 2028   , 11.7   , 19.9 ,
  233.   "Thorium      ",
  234. 3.14, 0.0 ,  91, 231.03588  , "Pa ", 0.0   , 0.0    , 15.4   , 15.0 ,
  235.   "Protactinium ",
  236. 3.11, 1.42,  92, 238.0289   , "U  ", 4407  , 1405   , 18.90  , 12.59,
  237.   "Uranium      ",
  238. 3.08, 0.0 ,  93, 237.048    , "Np ", 0.0   , 910.0  , 20.4   , 11.62,
  239.   "Neptunium    ",
  240. 3.05, 0.0 ,  94, 244        , "Pu ", 3503  , 913    , 19.8   , 12.32,
  241.   "Plutonium    ",
  242. 3.02, 0.0 ,  95, 243        , "Am ", 2880.0, 1268   , 13.6   , 17.86,
  243.   "Americium    ",
  244. 2.99, 0.0 ,  96, 247        , "Cm ", 0.0   , 1340.0 , 13.511 , 18.28,
  245.   "Curium       ",
  246. 2.97, 0.0 ,  97, 247        , "Bk ", 0.0   , 0.0    , 0.0    , 0.0  ,
  247.   "Berkelium    ",
  248. 2.95, 0.0 ,  98, 251        , "Cf ", 0.0   , 900.0  , 0.0    , 0.0  ,
  249.   "Californium  ",
  250. 2.92, 0.0 ,  99, 252        , "Es ", 0.0   , 0.0    , 0.0    , 0.0  ,
  251.   "Einsteinium  ",
  252. 2.90, 0.0 , 100, 257        , "Fm ", 0.0   , 0.0    , 0.0    , 0.0  ,
  253.   "Fermium      ",
  254. 2.87, 0.0 , 101, 258        , "Md ", 0.0   , 0.0    , 0.0    , 0.0  ,
  255.   "Mendelevium  ",
  256. 2.85, 0.0 , 102, 259        , "No ", 0.0   , 0.0    , 0.0    , 0.0  ,
  257.   "Nobelium     ",
  258. 2.82, 0.0 , 103, 260.0      , "Lr ", 0.0   , 0.0    , 0.0    , 0.0  ,
  259.   "Lawrencium   "
  260. };
  261.  
  262. #else
  263.  
  264. extern Widget toplevel, MainW;
  265. extern Colormap default_cmap;
  266. extern unsigned long red, white, slate_grey;
  267. extern struct element_stats p_table[];
  268. extern int done;
  269. extern XFontStruct *BigFont;
  270. extern GC BigGC;
  271.  
  272. #endif
  273.