;+ ; Contains the kronosdp procedure ; and associated procedures ; ; :Author: ; Gaƫlle Boisnard ; ; :History: ; 2006/07/04: Created ; ; 2006/07/04: Last Edit ;- ; ;+ ; Describes the actions to be done when the user click on ; buttons in the main window (described in kronosdp.pro). ;- PRO kronosdp_event, ev common COM, m_r_but, m_dp_but, r_Wind, dp_Wind, mWind, mlist, m_dirpath_txt, m_workpath_txt, texts widget_control, ev.id, get_uvalue=uval case uval of 'uv_m_exit_but': begin ptr_free, mlist widget_control, ev.top, /destroy end 'uv_m_dp_but': begin dataprocess end 'uv_m_r_but': begin stop,'Not yet implemented. Aborting...' ;request end endcase end ;+ ; Describes the closure of the main window. This leads to ; the closure of every other window. ;- PRO m_exit, ev common COM ptr_free, mlist end ;+ ; Main routine of the application. Describes the initial ; window. ;- PRO kronosdp common COM, m_r_but, m_dp_but, r_Wind, dp_Wind, mWind, mlist, m_dirpath_txt, m_workpath_txt, texts abort=0 datapath=getenv('NAS_RPWS') texts=strarr(5) texts[0]='Error in the beginning of the time interval' texts[1]='Error in the end of the time interval' texts[2]='Bad time range' texts[3]='Starting to get files for ' texts[4]='Making files for ' r_wind=0 dp_wind=0 mlist=ptr_new(obj_new('datadir_list', datapath)) mWind=widget_base(/column, title='KRONOS', kill_notify='m_exit') m_but_base=widget_base(mWind, /row) m_dp_but=widget_button(m_but_base, value='Data processing', uvalue='uv_m_dp_but') m_r_but=widget_button(m_but_base, value='Request', uvalue='uv_m_r_but',sensitive=0) m_exit_but=widget_button(m_but_base, value='Exit', uvalue='uv_m_exit_but') widget_control, mWind, /realize xmanager, 'kronosdp', mWind end