pro qView_Wall, state, event, wid_send=wid_send, send_event=send_event @compile_opt.pro ; On error, return to caller ;+ ; NAME: ; qView_Wall ; PURPOSE: ; Display as many images as possible using 'twin, /wall' ; CATEGORY: ; Widget qView ; CALLING SEQUENCE: ; qView_Wall, state ; INPUTS: ; state array[1]; type: structure ; qView state structure ; OUTPUTS: ; (none) ; CALLS: ; view, twin, qView_ImageInfo, qView_SetInfo, qView_GetInfo, MagnifyArray ; qImage_cw_MinMax, qImage_TriggerSend ; PROCEDURE: ; The user value of state.wid_wall is checked to see whether a wall view is active ; If not then as many image from the image cube are displayed as will fit the screen. ; If it is then all windows with images are destroyed. ; The last information send back from the qImage widget is used to decide what part of the ; image cube to display (this takes into account the area selection and the zoom factor). ; STATE INFO USED: ; widget_control, state.wid_wall, get_uvalue=wallview ; widget_control, state.wid_data, get_uvalue=data, /no_copy ; STATE INFO MODIFIED: ; widget_control, state.wid_data, set_uvalue=data, /no_copy ; widget_control, state.wid_wall, set_uvalue=1B-wallview ; MODIFICATION HISTORY: ; FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- ; Check whether wall paper on display already. If so, destroy and return twin, /wallpaper, /info, winwall=winwall wallview = winwall ne -1 if winwall ne -1 then begin twin, /wallpaper, /delete return endif status = qImage_TriggerSend(event, state.wid_view, state.wid_wall, wid_send, send_event) case status of 0B: ; No qImage widget exists (yet) 1B: return ; Return to event handler to send 'send_event' to 'wid_send' 2B: qView_SetInfo, state, event ; Process QIMAGE_SEND event endcase img = qView_ImageInfo(state, file=qView_ImageInfo(state, /active)) if qView_GetInfo(state, offset=offset, subdim=subdim, zoom=zoom, box=box, $ zhilo=zhilo, fixz=fixz, zlog=zlog) then begin box = ((box-offset#[1,1]) > 0) < (subdim-1)#[1,1] widget_control, state.wid_data, get_uvalue=data, /no_copy wall = MagnifyArray(data[box[0]:box[2], box[1]:box[3],img:*], zoom, dims=2) widget_control, state.wid_data, set_uvalue=data, /no_copy fake_state = [fixz, zlog, zhilo] endif else begin widget_control, state.wid_data, get_uvalue=data, /no_copy wall = data[*,*,img:*] widget_control, state.wid_data, set_uvalue=data, /no_copy fake_state = [0,0] endelse wall = qImage_cw_MinMax(fake_state, wall, /nostate) catch, ierror if ierror eq 0 then view, in=wall, /stretch, log_scale=zlog catch, /cancel return & end