MWCRTZoomer.h
Classes
- MWCRTZoomer -- Multi WorldCanvas event-based zoomer (full description)
Interface
- Public Members
- MWCRTZoomer(Display::KeySym keysym = Display::K_Pointer_Button1)
- virtual ~MWCRTZoomer()
- virtual void unzoom()
- virtual void zoom(const Vector<Double> &linBlc, const Vector<Double> &linTrc)
- Protected Members
- virtual void doubleInside()
- virtual void doubleOutside()
- virtual void zoomed(const Vector<Double> &linBlc, const Vector<Double> &linTrc)
- Private Members
- void getLinearCoords(Vector<Double> &blc, Vector<Double> &trc)
WCRectTool
Etymology
MWCRTZoomer stands for WorldCanvas Rectangling Tool Zoomer
Synopsis
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.
Example
Motivation
Zooming is an essential tool for interacting with data displays.
To Do
Member Description
Constructor
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
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.
virtual void zoomed(const Vector<Double> &linBlc, const Vector<Double> &linTrc)
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
get the linear coords of the current zoom box