;+ ***********************************************************************
; NAME:
;	HESSI_NRH
;
; PURPOSE:
;	Cette procedure cree les WIDGETS de traitement des donnees
;	des fichiers contenant des series d'images 2D (HESSI NRH)
;
; CATEGORY:
;	WIDGET
;
; CALLING SEQUENCE:
;	HESSI_NRH
;
; INPUTS:
;
; COMMON BLOCKS:
;			SELECTION DE FICHIERS
;   COMMON FICRH, STR_FIC= {STR_FIC}
;			INFORMATIONS SUR LE FICHIER
;  COMMON INFO2D, NRH_STR_INFIC = {NRH_STR_INFIC}
;			LIMITES DE TRAITEMENT
;  COMMON LIMIT, NRH_STR_LIM = {NRH_STR_LIM}
;
;			PARAMETRES DE VISUALISATION D IMAGES
;  COMMON VISU_2D, NRH_STR_VISU= {NRH_STR_VISU,
;		 Polar :0,	traitement du parametre V si = 1, sinon I
;		 Coord:'H',	transformation de coordonnee si fichier I et
;					str_visu.coord= 'H'
;		 Print:0,	Sortie PS si = 1
;		 ind:0,		Indice de l'image a traiter
;		 dim: 256,	Nombre de pixels de l'image visualisee
;		 inc:1,		Increment d'image pour le balayage du fichier
;		 cont:5,	Nombre de contours du trace CONTOUR
;		 pcent:90,	% du max de l'image pour le contour maximum
;		 mcent:10}	% du max de l'image pour le contour minimum
;			PARAMETRES POUR DONNEES EXTERIEURES
; EXAMPLE:
;	HESSI_NRH
;
; MODIFICATION HISTORY:
;	Ecrit par: J Bonmartin le 21/10/97 (@obspm.fr)

;-*******************************************************************
PRO HESSI_NRH_EVENT, event
common ficrh, str_fic

state= {size_imx:0l, size_imy:0L, size_vis:0l}

widget_control, event.id, get_uvalue= ev

case ev of
	'Visualisation':	nrh_visu_2d, group = event.top

	'File': 	NRH_FILTER, Group=event.top

	'Super':	sun_image, group = event.top

	'Gr_images': 	gr_images,group = event.top

	'Anim':		nrh_anim,group = event.top

	'Project':	Nrh2_projection, Group=event.top

	'Reduc':	cw_pos, group=event.top

	'Help':	help_hessi_nrh

	'FHelp':	HSI_NRH_FHELP

	'Exit':	widget_control, event.top, /DESTROY
endcase

end

;******************************************************

PRO HESSI_NRH, GROUP = Group

NRH_ENVIRONNEMENT
IF N_ELEMENTS(Group) EQ 0 THEN Group = 0


base= widget_base(Title = 'HESSI - N R H - Main menu',/COLUMN,Xsize=250)
b  = widget_button( base,value = 'File Filter', Uvalue='File')
b1 = widget_button( base,value = 'Images',Uvalue = 'Visualisation')
b1 = widget_button( base,value = 'Compound View', Uvalue ='Gr_images')
b1 = widget_button( base,value = 'Superpose', Uvalue ='Super')
b1 = widget_button( base,value = 'Sources Tracking',Uvalue = 'Reduc')
b1 = widget_button( base,value = 'Animate', Uvalue ='Anim')
b1 = widget_button( base,value = '1D Projection', Uvalue= 'Project')
b1 = widget_button( base,value = 'Help', Uvalue ='Help')
b1 = widget_button( base,value = 'File Name Help', Uvalue ='FHelp')
b2 = widget_button( base,value = 'RETURN',Uvalue = 'Exit')

widget_control, base,/realize

XMANAGER, 'hessi_nrh',base, /NO_BLOCK

end
