; $Id: dave_disptreat.pro,v 1.3 2005/02/03 18:04:12 azuah Exp $
;###############################################################################
; LICENSE:
;  The software in this file is written by an employee of 
;  National Institute of Standards and Technology 
;  as part of the DAVE software project.
;
;  The DAVE software package is not subject to copyright protection
;  and is in the public domain. It should be considered as an
;  experimental neutron scattering data reduction, visualization, and
;  analysis system. As such, the authors assume no responsibility
;  whatsoever for its use, and make no guarantees, expressed or
;  implied, about its quality, reliability, or any other
;  characteristic. The use of certain trade names or commercial
;  products does not imply any endorsement of a particular product,
;  nor does it imply that the named product is necessarily the best
;  product for the stated purpose. We would appreciate acknowledgment
;  if the DAVE software is used of if the code in this file is
;  included in another product.
;
;###############################################################################
;===============================================================================
; NAME:
;  DAVE_DISPTREAT:
; PURPOSE
;  Widget procedure that displays the contents of the data treatment pointer
;  if there are any.
; SYNTAX:
;  Put the call to this procedure in your widget definition module as shown
;  below.
;
;  button = widget_button(filemenu,value = 'Display Data Information',$
;								event_pro = 'dave_disptreat')
; INPUTS:
;   NONE....it assumes that the treatmentptr field is filled (otherwise it
;   gives you an error message) and it pulls it out and displays it.
;
; KEYWORDS:
;   NONE
;
; USES:
;   DISP_TREAT.PRO
;----------------
; R.M.Dimeo
; NCNR, NIST
; June 21 2002
;
;;;;;;;;;;;;
pro dave_disptreat,event
; Display file header info and the contents of the treatment
widget_control,event.top,get_uvalue = pState,/no_copy
if n_elements(*(*(*pState).dataStrPtr).commonStr.treatmentPtr) eq 0 then begin
  text = 'No data has been loaded'
  void = dialog_message(dialog_parent = event.top,text)
  widget_control,event.top,set_uvalue = pState,/no_copy
  return
endif
text = [*(*(*pState).dataStrPtr).commonStr.treatmentPtr]
void = disp_treat(group_leader = event.top,text)
widget_control,event.top,set_uvalue = pState,/no_copy
return
end
