;+ ;thm_ui_draw_object method: inBounds ; ;returns true if the current cursor location is within the bounds of the panel past as an argument ;panelInfo(struct): struct that stores information for the draw object about the panel in question ;location(keyword, 2-element double): Overrides the default location stored in self.cursorLoc with the value in the keyword ; Default behavior uses self.cursorloc ; ;$LastChangedBy: pcruce $ ;$LastChangedDate: 2010-08-25 18:05:01 -0700 (Wed, 25 Aug 2010) $ ;$LastChangedRevision: 7774 $ ;$URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/thmsoc/tags/tdas_8_00/idl/themis/thm_ui_new/display/draw_object/thm_ui_draw_object__inbounds.pro $ ;- function thm_ui_draw_object::inBounds,panelInfo,location=location compile_opt idl2 if ~keyword_set(location) then location = self.cursorloc ;print,'x',panelInfo.xplotpos,'y',panelInfo.yplotpos return,location[0] ge panelInfo.xplotpos[0] && $ location[0] le panelInfo.xplotpos[1] && $ location[1] ge panelInfo.yplotpos[0] && $ location[1] le panelInfo.yplotpos[1] end