;+ ;NAME: ; thm_ui_windows ;PURPOSE: ; This routine handles multiple windows. It creates the new ; window structure and updates the pulldown menu ;CALLING SEQUENCE: ; info=thm_ui_windows(event, info) ;INPUT: ; event - the structure from the draw window event ; info - the main information structure from splash_gui ;OUTPUT: ; info - the updated main information structure ;HISTORY: ; ;$LastChangedBy: cgoethel $ ;$LastChangedDate: 2008-09-05 14:15:37 -0700 (Fri, 05 Sep 2008) $ ;$LastChangedRevision: 3454 $ ;$URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/thmsoc/tags/tdas_5_11/idl/themis/thm_ui_new/panels/thm_ui_windows.pro $ ;- Function thm_ui_windows, name, info If info.nWindows lt 2 Then Begin ;increment counter index = info.nWindows info.nWindows = info.nWindows + 1 ;capture draw window image in a pixmap for saving WINDOW, /FREE, xsize=info.drawWinSize[0], ysize=info.drawWinSize[1], /PIXMAP info.windows[index].winID = !D.window info.windows[index].name = name info.windows[index].id = info.nWindows WSET, !D.window DEVICE, COPY = [0,0,info.drawWinSize[0],info.drawWinSize[1],0,0,info.drawWin] ;update windows menu button_name = string(info.nWindows) + name ;window1_button = WIDGET_BUTTON(window_menu, value=button_name, uval='name') EndIf RETURN, info End