casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WCRTZoomer.h
Go to the documentation of this file.
1 //# WCRTZoomer.h: WorldCanvas event-based zoomer
2 //# Copyright (C) 1999,2000
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef TRIALDISPLAY_WCRTZOOMER_H
29 #define TRIALDISPLAY_WCRTZOOMER_H
30 
31 //# aips includes
32 #include <casa/aips.h>
33 #include <casa/Arrays/Vector.h>
34 
35 //# trial includes
36 
37 //# display library includes
39 
40 namespace casa { //# NAMESPACE CASA - BEGIN
41 
42 // <summary>
43 // WorldCanvas event-based zoomer
44 // </summary>
45 
46 // <use visibility=export>
47 
48 // <reviewed reviewer="" data="yyyy/mm/dd" tests="" demos="">
49 // </reviewed>
50 
51 // <prerequisites>
52 // <li> WCRectTool
53 // </prerequisites>
54 
55 // <etymology>
56 // WCRTZoomer stands for WorldCanvas Rectangling Tool Zoomer
57 // </etymology>
58 
59 // <synopsis>
60 // This class finalises the functionality in WCRectTool to implement
61 // event-based zooming on a WorldCanvas. casacore::Double clicking inside the
62 // constructed rectangle results in zooming in; double clicking outside
63 // the rectangle gives zooming out.
64 // </synopsis>
65 
66 // <example>
67 // </example>
68 
69 // <motivation>
70 // Zooming is an essential tool for interacting with data displays.
71 // </motivation>
72 
73 // <todo asof="1999/02/10">
74 // <li> Nothing known
75 // </todo>
76 
77  class WCRTZoomer : public WCRectTool {
78 
79  public:
80 
81  // Constructor
82  WCRTZoomer(WorldCanvas *wcanvas,
84 
85  // Destructor
86  virtual ~WCRTZoomer();
87 
88  // Functions specific to the zooming - these are called by
89  // lower-level event handlers in the base classes
90  // <group>
91  virtual void doubleInside();
92  virtual void doubleOutside();
93  // </group>
94 
95  // This function is called when a zoom occurs. It is supplied
96  // with the linear coords of the new zoom box, and thus can be
97  // implemented to do further actions, or perhaps report the
98  // new zoom box to the application
99  virtual void zoomed(const casacore::Vector<casacore::Double> &linBlc,
100  const casacore::Vector<casacore::Double> &linTrc);
101 
102  private:
103 
104  // get the linear coords of the current zoom box
106 
107  };
108 
109 
110 } //# NAMESPACE CASA - END
111 
112 #endif
Base class for WorldCanvas event-based rectangle tools.
Definition: WCRectTool.h:88
WCRTZoomer(WorldCanvas *wcanvas, Display::KeySym keysym=Display::K_Pointer_Button1)
Constructor.
virtual void doubleOutside()
virtual void doubleInside()
Functions specific to the zooming - these are called by lower-level event handlers in the base classe...
virtual ~WCRTZoomer()
Destructor.
virtual void zoomed(const casacore::Vector< casacore::Double > &linBlc, const casacore::Vector< casacore::Double > &linTrc)
This function is called when a zoom occurs.
WorldCanvas event-based zoomer.
Definition: WCRTZoomer.h:77
Implementation of drawing in world coordinates on top of a PixelCanvas.
Definition: WorldCanvas.h:204
void getLinearCoords(casacore::Vector< casacore::Double > &blc, casacore::Vector< casacore::Double > &trc)
get the linear coords of the current zoom box
KeySym
Keysyms for PixelCanvas keyboard events.
Definition: DisplayEnums.h:412