;+ ; GBTIDL front end to IDL provided box_cursor to allow it to work with ; the gbtidl plotter. See the documentation for box_cursor for more ; information on these arguments. ; ; Some times after box_cursor returns (the right mouse button is ; clicked) the gbtidl plotter sees some middle mouse events (this is ; especially true if the right click coincided with movement). That ; may cause an unanticipated zoom. I'm not sure how to protect ; against that since I can't tell exactly what's happening there. ;- pro gbtbox_cursor, x0, y0, nx, ny, $ INIT = init, $ FIXED_SIZE = fixed_size, $ MESSAGE = message common gbtplot_common,mystate,xarray ok = gbtplot() if not ok then begin message,'No plotter! Check your DISPLAY environment variable setting.',/info return endif ; select the window wset, mystate.win_id label = "Click right mouse to exit box" oldLabel = '' widget_control, mystate.leftlabel, get_value=oldLabel, set_value=label ; expose it widget_control, mystate.main, /show ; disable the plotter from responding to events mystate.noPlotEvents = 1 ; invoke standard box_cursor box_cursor,x0,y0,nx,ny,init=init,fixed_size=fixed_size, message=message widget_control, mystate.leftlabel, set_value=oldLabel ; de-select the window wset, -1 ; enable it to respond to events mystate.noPlotEvents = 0 end