casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Private Member Functions
casa::MWCRTZoomer Class Reference

Multi WorldCanvas event-based zoomer. More...

#include <MWCRTZoomer.h>

Inheritance diagram for casa::MWCRTZoomer:
casa::MWCRectTool casa::MultiWCTool casa::DTVisible casa::DisplayTool casa::WCPositionEH casa::WCMotionEH casa::WCRefreshEH casa::DisplayEH

List of all members.

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

Detailed Description

Multi WorldCanvas event-based zoomer.

Intended use:

Public interface

Review Status

<prerequisites> WCRectTool </prerequisites>

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

Definition at line 72 of file MWCRTZoomer.h.


Constructor & Destructor Documentation

Constructor.

virtual casa::MWCRTZoomer::~MWCRTZoomer ( ) [virtual]

Destructor.


Member Function Documentation

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]

The documentation for this class was generated from the following file: