;+
;adjust view
;+
PRO sesMouseTool::CreateView , currentXY = currentXY , zoom = zoom
	COMPILE_OPT IDL2
	oSystem = self.oSystem
	ImageClass = oSystem.CurrentPro
	type = self.type
	CASE type OF
		'zoomout':BEGIN
			Type = 'zoom'
			new = 'out'
		END
		'zoomin':BEGIN
			Type = 'zoom'
			new = 'in'
		END
		'pan':BEGIN
			Type = 'pan'
		END
	ELSE:
	ENDCASE
	oSystem.zoomState = Type
	ImageClass.oView->GetProperty, Location = oldLoc,dimensions = oldDim
	drawSize = [(oSystem.mainDraw).drawSize,ImageClass.imageX, ImageClass.imageY]

	sesViewSize, drawSize, Type = Type				 	       , $
						   ZoomRate = zoom			 	       , $
						   windowVD = windowVD		           , $
						   viewPlane = viewPlane	           , $
						   viewDim = viewDim		           , $
						   currentXY=currentXY                 , $
						   oDraw = (oSystem.mainDraw).drawID   , $
						   oView = ImageClass.oView            , $
						   oldDim = oldDim                     , $
						   new = new                           , $
						   oldLoc = oldLoc                     , $
						   viewLoc = viewLoc

	IF KeyWord_Set(viewDim) THEN ImageClass.oView->SetProperty, Dimensions = viewDim
	IF KeyWord_Set(viewLoc) THEN ImageClass.oView->SetProperty, Location = viewLoc
	IF KeyWord_Set(windowVD) THEN Widget_Control, (oSystem.mainDraw).drawID	, $
           Draw_XSize = windowVD[0], Draw_YSize = windowVD[1]

 	Widget_Control, (oSystem.mainDraw).drawID, Scr_XSize = (oSystem.mainDraw).drawSize[0], $
 						Scr_YSize = (oSystem.mainDraw).drawSize[1]

	ImageClass.oModel->Reset
	ImageClass.oModel->Scale, zoom, zoom, 1
	ImageClass.zoom = zoom
	ImageClass.oView->SetProperty, ViewPlane_Rect = viewPlane
	imageType = Size(image,/N_Dimensions)
	IF imageType EQ 2 THEN BEGIN
		ImageClass.oImage->Setproperty, Palette = ImageClass.oPalette
	ENDIF

	oSystem.oWindow -> Draw, oSystem.oScene


END
;+
;clean up
;+
PRO sesMouseTool::CleanUp
	COMPILE_OPT IDL2

END
;+
;initialize
;+
FUNCTION sesMouseTool::Init  , oSystem = oSystem , type = type

	COMPILE_OPT IDL2
	self.oSystem = oSystem
	self.mainBase = oSystem.mBase
	self.baseSize =  oSystem.baseSize
	self.type = type

	Return,1
END
;+
;Title class name
;+
PRO sesMouseTool__Define
	COMPILE_OPT IDL2
	void = { sesMouseTool                         , $
	         ;system parameter
	         mainBase           :    0L           , $
	         cBase              :    0L           , $
	         baseSize           :    [0,0]        , $
	         type               :    ''           , $
 			 ;system objct

	         oSystem            :    Obj_New()      $

	        }
END