#*******************************************************************************
# E.S.O. - VLT project
#
# "@(#) $Id: rtdq4Zoom.tcl,v 1.14+ 1999/03/25 10:45:51 vltsccm Exp $"
#
# who       when      what
# --------  --------  ----------------------------------------------
# pbiereic  22/03/99  created

itk::usual rtdq4Zoom {}

class rtdq4Zoom {
    inherit rtd::RtdImageZoomView

    constructor {args} {
        eval RtdImageZoomView::constructor $args
    } {
        eval itk_initialize $args
    }

    method init {} {
        global ::$w_.dozoom
        global ::$w_.mag ::imageq4

	set $w_.dozoom 1
	zoom
    }
    
    # This method is called when the mouse ptr enters an RtdImage.
    # Set the target scale factor from the given rtdimage
    # redefines: rtd::RtdImageZoomView enter_image
    
    method enter_image {image} {
	set target_image_ $image
        lassign [$image scale] target_scale_
        if {$target_scale_ < 1} {
            set target_scale_ 1
        }
        zoom
        scale
    }

        
    # -- public vars --
}
