casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WCPositionEH.h
Go to the documentation of this file.
1 //# WCPositionEH.h: WorldCanvas position event handler
2 //# Copyright (C) 1993,1994,1995,1996,1998,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_WCPOSITIONEH_H
29 #define TRIALDISPLAY_WCPOSITIONEH_H
30 
31 #include <casa/aips.h>
33 
34 namespace casa { //# NAMESPACE CASA - BEGIN
35 
36 //
37 // <summary>
38 // Base class for handling WorldCanvas position events.
39 // </summary>
40 //
41 //
42 // <prerequisite>
43 // <li> <linkto class="WCPositionEvent">WCPositionEvent</linkto>
44 // <li> Understanding of Display library event-handling methodology
45 // </prerequisite>
46 //
47 // <etymology>
48 // WCPositionEH : WorldCanvas Position Event-Handler
49 // </etymology>
50 //
51 // <synopsis>
52 // WCPositionEH is a base class. Its operator() function is called by mechanisms within
53 // the Display Library when a keyboard key or mouse button is pressed while within the
54 // area of the world canvas.
55 //
56 // Users must derive from this class and override the op () function to catch key
57 // and button presses. Positions in world, linear, and pixel coordinates are
58 // returned.
59 //
60 // This base class does have a concrete implementation, namely to report
61 // to stdout events it receives. To effect this behaviour, create an instance
62 // this class and register it as an event-handler on a WorldCanvas.
63 // </synopsis>
64 //
65 // <motivation>
66 // Provide the user with an object-oriented approach to event handling and
67 // include world-coordinate position information.
68 // </motivation>
69 //
70 // <example>
71 // see the test programs in Display/test.
72 // </example>
73 //
74 
75  class WCPositionEH {
76 
77  public:
78 
79  // Default Constructor Required
80  WCPositionEH();
81 
82  // Default just prints the event to cout
83  virtual void operator()(const WCPositionEvent & ev) = 0;
84 
85  // Destructor
86  virtual ~WCPositionEH();
87 
88  };
89 
90 
91 } //# NAMESPACE CASA - END
92 
93 #endif
94 
95 
WCPositionEH()
Default Constructor Required.
virtual void operator()(const WCPositionEvent &ev)=0
Default just prints the event to cout.
Class which stores WorldCanvas position event information.
Base class for handling WorldCanvas position events.
Definition: WCPositionEH.h:75
virtual ~WCPositionEH()
Destructor.