;
; This is the file that defines the menus in the main xop window.
; It may be customizable:
;    1) To add menus: use w[x) 20<x<100
;    2) to add calls: use wtmp=widget_...
;    3) To remove menus: comment the corresponding entry and ALL THE 
;       SUBSEQUENT CALLS
;    4) To remove a call: just comment it
;    5) To change a call from one menu to a different one: just change
;       the widget identifies w[x) in the corresponding call.
;    6) You may use temporarly variables named as a0,...,a9
; Modifications:
;    97/03/13 srio@esrf.fr  initial version
;    97/09/30 srio@esrf.fr  creates the font submenu, adds temporarly variables 
;
w[1] =  WIDGET_BUTTON(w[0], VALUE='Xop',/MENU)
w[2] =  WIDGET_BUTTON(w[0], VALUE='Source',/MENU)
w[3] =  WIDGET_BUTTON(w[0], VALUE='Optics',/MENU)
w[4] =  WIDGET_BUTTON(w[0], VALUE='Tools',/MENU)
w[5] =  WIDGET_BUTTON(w[0], VALUE='Help',/HELP)
  w[7]=WIDGET_BUTTON(w[2], VALUE='Undulator',/MENU)
  w[8]=WIDGET_BUTTON(w[2], VALUE='Wiggler',/MENU)
  w[9]=WIDGET_BUTTON(w[2], VALUE='Bending Magnet',/MENU)
  w[50]=WIDGET_BUTTON(w[2], VALUE='X-Ray tube generators',/MENU)
  w[51]=WIDGET_BUTTON(w[2], VALUE='Others',/MENU)
  ;w[10]=WIDGET_BUTTON(w[3], VALUE='Tables',/MENU)
  wtmp=WIDGET_BUTTON(w[3], VALUE='DABAX: Main interface', UVALUE='DABAX')
  w[11]=WIDGET_BUTTON(w[3], VALUE='Mirrors and Filters',/MENU,/SEPARATOR)
  w[12]=WIDGET_BUTTON(w[3], VALUE='Crystals',/MENU)
  w[13]=WIDGET_BUTTON(w[3], VALUE='Others ',/MENU)

  w[20]=WIDGET_BUTTON(w[1],VALUE='Load extension...', UVALUE='XOP_LOAD_EXTENSION')
  wtmp=WIDGET_BUTTON(w[1], VALUE='Load application input file...', UVALUE='XOP_INPUT_RUN')
  wtmp=WIDGET_BUTTON(w[1], VALUE='Show/Edit environment', UVALUE='XOP_ENVIRONMENT,/Edit',/SEPARATOR)
  wtmp=WIDGET_BUTTON(w[1], VALUE='Change color table', UVALUE='XLOADCT')
  wtmp=WIDGET_BUTTON(w[1], VALUE='Set default color table', UVALUE='XOP_LOAD_IMAGE,/Set_Default')
  w[19]=WIDGET_BUTTON(w[1],VALUE= 'Change Widget Font',/MENU)
      a0 = Xop_font_names(/return_list)
      if  sdep() EQ 'UNIX' then a0=[a0,'Other...']
      for a1=0,n_elements(a0)-1 do wtmp=WIDGET_BUTTON(w[19], VALUE= a0[a1],UVALUE="XOP_FONT,'"+a0[a1]+"'")
  wtmp=WIDGET_BUTTON(w[1], VALUE='Quit', UVALUE='XOP_QUIT',/SEPARATOR)
  wtmp=WIDGET_BUTTON(w[7], VALUE='XUS (Undulator Spectrum)', UVALUE='XUS')
  wtmp=WIDGET_BUTTON(w[7], VALUE='XTC (Undulator Tuning Curves)', UVALUE='XTC')
  wtmp=WIDGET_BUTTON(w[7], VALUE='XURGENT (Undulator Radiation)',UVALUE='XURGENT')
  wtmp=WIDGET_BUTTON(w[7], VALUE='XYAUP (Tapered Undulators)',UVALUE='XYAUP')
  wtmp=WIDGET_BUTTON(w[8], VALUE='WS (Wiggler Spectrum)', UVALUE="XOP_IFC,'ws'")
  wtmp=WIDGET_BUTTON(w[8], VALUE='XWIGGLER (Wiggler Radiation)', UVALUE='XWIGGLER')
  wtmp=WIDGET_BUTTON(w[9], VALUE='BM (Bending Magnet Radiation)', UVALUE="XOP_IFC,'bm'")
  wtmp=WIDGET_BUTTON(w[50],VALUE='Xtube_w (Tungsten x-ray tube)', UVALUE="XOP_IFC,'xtube_w'")
  wtmp=WIDGET_BUTTON(w[50],VALUE='Xtubes (Mo, Rh & W x-ray tubes)', UVALUE="XOP_IFC,'xtubes'")
;  wtmp=WIDGET_BUTTON(w[51],VALUE='Maxwell distribution (Maxwell neutron source)', UVALUE="XOP_IFC,'n_maxwell'")
  wtmp=WIDGET_BUTTON(w[51],VALUE='Black Body (Planck distribution)', UVALUE="XOP_IFC,'black_body'")

  ;wtmp=WIDGET_BUTTON(w[10], VALUE='DABAX: Main interface', UVALUE='DABAX')
  wtmp=WIDGET_BUTTON(w[11], VALUE='DABAX: xf1f2 (f1,f2 scat fact, refraction index, reflectivity)',UVALUE='XF1F2')
  wtmp=WIDGET_BUTTON(w[11], VALUE='DABAX: xCrossSec (Cross section/absorption)', UVALUE='XCROSSSEC')
  wtmp=WIDGET_BUTTON(w[11], VALUE= 'XXCOM (Photon Cross Sections)', UVALUE='XXCOM')
  wtmp=WIDGET_BUTTON(w[11], VALUE='XPOWER (Attenuation/Reflectivity in Media)', UVALUE='XPOWER')
  wtmp=WIDGET_BUTTON(w[12], VALUE='DABAX: xFh (Crystal Structure Factors)', UVALUE='XFH')
  wtmp=WIDGET_BUTTON(w[12], VALUE= 'XCRYSTAL (Flat Perfect and Mosaic)', UVALUE='XCRYSTAL')
  wtmp=WIDGET_BUTTON(w[12], VALUE= 'XINPRO (Flat Perfect)', UVALUE='XINPRO')
  wtmp=WIDGET_BUTTON(w[12], VALUE= 'XCRYSTAL_BENT (Bent Perfect, Bragg and Laue)', UVALUE='XCRYSTAL_BENT')
  wtmp=WIDGET_BUTTON(w[12], VALUE= 'MARE (Multiple beam diffraction)', UVALUE="MARE")
  wtmp=WIDGET_BUTTON(w[12], VALUE= 'XPOWDER (powder diffraction patterns)', UVALUE="XPOWDER")
  wtmp=WIDGET_BUTTON(w[12], VALUE='XPOWDER_FML (powder diffraction patterns)', UVALUE="XOP_IFC,'xpowder_fml'")
  wtmp=WIDGET_BUTTON(w[13], VALUE='MLAYER (Multilayers)', UVALUE="XOP_IFC,'mlayer'")
  wtmp=WIDGET_BUTTON(w[13], VALUE='CRL (Compound Refractive Lenses)', UVALUE="CRL")
  wtmp=WIDGET_BUTTON(w[13], VALUE='DABAX: xf0 (f0 scattering factor)', UVALUE='XF0')
  wtmp=WIDGET_BUTTON(w[4], VALUE='Xplot (Plots)', UVALUE='XPLOT',/SEPARATOR)
  wtmp=WIDGET_BUTTON(w[4], VALUE='EXODUS (Datasets)', UVALUE='EXODUS')
  wtmp=WIDGET_BUTTON(w[4], VALUE='FuFiFa (Fits)', UVALUE='FUFIFA')
  wtmp=WIDGET_BUTTON(w[4], VALUE='Xplot2d (Images)', UVALUE='XPLOT2D')
  wtmp=WIDGET_BUTTON(w[4], VALUE='XOP Macro', UVALUE='XOP_MACRO')
  w[15]=WIDGET_BUTTON(w[4], VALUE='IDL iTools', /MENU,/SEPARATOR)
    wtmp=WIDGET_BUTTON(w[15], VALUE='iPlot', UVALUE='IPLOT')
    wtmp=WIDGET_BUTTON(w[15], VALUE='iSurface', UVALUE='ISURFACE')
    wtmp=WIDGET_BUTTON(w[15], VALUE='iContour', UVALUE='ICONTOUR')
    wtmp=WIDGET_BUTTON(w[15], VALUE='iImage', UVALUE='IIMAGE')
    wtmp=WIDGET_BUTTON(w[15], VALUE='iVolume', UVALUE='IVOLUME')
  wtmp=WIDGET_BUTTON(w[4], VALUE='File Editor', UVALUE='EDITOR',/SEPARATOR)
  wtmp=WIDGET_BUTTON(w[4],VALUE= 'Display File... ', UVALUE='XOP_FILE_DISPLAY')
  wtmp=WIDGET_BUTTON(w[4], VALUE='Calculator', UVALUE='SCICALC')
  wtmp=WIDGET_BUTTON(w[4], VALUE='Shell terminal', UVALUE='SHELL',/SEPARATOR)
  wtmp= WIDGET_BUTTON(w[5], VALUE='About XOP', UVALUE='XOP_ABOUT')
  wtmp= WIDGET_BUTTON(w[5], VALUE='XOP Documentation', UVALUE='XOP_HELP,"xop23.htm"')
  ;wtmp= WIDGET_BUTTON(w[5], VALUE='XOP Documentation (pdf)', UVALUE='XOP_HELP,"xop23.pdf"')
  ;wtmp= WIDGET_BUTTON(w[5], VALUE='XOP Documentation (flash)', UVALUE='XOP_HELP,"xop23Flash.htm"')
  ;IF !version.os_family EQ 'Windows' THEN wtmp= WIDGET_BUTTON(w[5], VALUE='XOP Documentation (winhlp)', UVALUE='XOP_HELP,"xop23.chm"')
  wtmp=WIDGET_BUTTON(w[5], VALUE='XOP Tutorial', UVALUE='XOP_HELP,"tutorial.pdf"')

