casa
$Rev:20696$
|
Multi WorldCanvas event-based zoomer. More...
#include <MWCRTZoomer.h>
Public Member Functions | |
MWCRTZoomer (Display::KeySym keysym=Display::K_Pointer_Button1) | |
Constructor. | |
virtual | ~MWCRTZoomer () |
Destructor. | |
virtual void | unzoom () |
This function resets the zoom. | |
virtual void | zoom (const Vector< Double > &linBlc, const Vector< Double > &linTrc) |
This function zooms with a given blc,trc. | |
virtual void | zoomIn (Double factor=2.) |
zoom in/out by given factor | |
virtual void | zoomOut (Double factor=2.) |
Protected Member Functions | |
virtual void | doubleInside () |
virtual void | doubleOutside () |
virtual void | zoomed (const Vector< Double > &linBlc, const Vector< Double > &linTrc) |
This function is called when a zoom occurs. | |
Private Member Functions | |
void | getLinearCoords (Vector< Double > &blc, Vector< Double > &trc) |
get the linear coords of the current zoom box |
Multi WorldCanvas event-based zoomer.
Public interface
<prerequisites> WCRectTool </prerequisites>
MWCRTZoomer stands for WorldCanvas Rectangling Tool Zoomer
This class finalises the functionality in WCRectTool to implement event-based zooming on a WorldCanvas. Double clicking inside the constructed rectangle results in zooming in; double clicking outside the rectangle gives zooming out.
Zooming is an essential tool for interacting with data displays.
Definition at line 72 of file MWCRTZoomer.h.
Constructor.
virtual casa::MWCRTZoomer::~MWCRTZoomer | ( | ) | [virtual] |
Destructor.
virtual void casa::MWCRTZoomer::doubleInside | ( | ) | [protected, virtual] |
Handle double-click inside or outside the rectangle; called by the base class when these events occur. They execute zoom-in/zoom-out on the tool's active WC's (which should all have indentical linear coordinates for their draw areas--they certainly will have, after a zoom). Then the routines invoke the zoomed() callback, below.
Reimplemented from casa::MWCRectTool.
virtual void casa::MWCRTZoomer::doubleOutside | ( | ) | [protected, virtual] |
Reimplemented from casa::MWCRectTool.
void casa::MWCRTZoomer::getLinearCoords | ( | Vector< Double > & | blc, |
Vector< Double > & | trc | ||
) | [private] |
get the linear coords of the current zoom box
virtual void casa::MWCRTZoomer::unzoom | ( | ) | [virtual] |
This function resets the zoom.
Referenced by casa::QtDisplayPanel::unzoom().
virtual void casa::MWCRTZoomer::zoom | ( | const Vector< Double > & | linBlc, |
const Vector< Double > & | linTrc | ||
) | [virtual] |
This function zooms with a given blc,trc.
Referenced by casa::QtDisplayPanel::zoom().
virtual void casa::MWCRTZoomer::zoomed | ( | const Vector< Double > & | linBlc, |
const Vector< Double > & | linTrc | ||
) | [protected, virtual] |
This function is called when a zoom occurs.
It is supplied with the linear coords of the new zoom box, and thus can be implemented to do further actions, such as reporting the new zoom box to the application
virtual void casa::MWCRTZoomer::zoomIn | ( | Double | factor = 2. | ) | [virtual] |
zoom in/out by given factor
Referenced by casa::QtDisplayPanel::zoomIn().
virtual void casa::MWCRTZoomer::zoomOut | ( | Double | factor = 2. | ) | [virtual] |
Referenced by casa::QtDisplayPanel::zoomOut().