casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WCMotionEH.h
Go to the documentation of this file.
1 //# WCMotionEH.h: WorldCanvas motion 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_WCMOTIONEH_H
29 #define TRIALDISPLAY_WCMOTIONEH_H
30 
31 #include <casa/aips.h>
33 
34 namespace casa { //# NAMESPACE CASA - BEGIN
35 
36 //
37 // <summary>
38 // Base class for handling WorldCanvas motion events.
39 // </summary>
40 //
41 // <prerequisite>
42 // <li> <linkto class="WCMotionEvent">WCMotionEvent</linkto>
43 // <li> Understanding of Display library event-handling methodology
44 // </prerequisite>
45 //
46 // <etymology>
47 // WCMotionEH : WorldCanvas motion event-handler.
48 // </etymology>
49 //
50 // <synopsis>
51 // This is a base class intended to be derived from in applications. The user must
52 // write a derived class and override the operator() function. The operator() function
53 // is called whenever the pointer moves across the world canvas.
54 //
55 // This base class does have a concrete implementation, namely to report
56 // to stdout events it receives. To effect this behaviour, create an instance
57 // this class and register it as an event-handler on a WorldCanvas.
58 // </synopsis>
59 //
60 // <motivation>
61 // Provide the user with an object-oriented approach to event handling and
62 // include world-coordinate position information.
63 // </motivation>
64 //
65 // <example>
66 // see the test programs in Display/test.
67 // </example>
68 //
69 
70  class WCMotionEH {
71 
72  public:
73 
74  // Default Constructor Required
75  WCMotionEH();
76 
77  // default sends event to cout
78  virtual void operator ()(const WCMotionEvent & ev) = 0;
79 
80  // Destructor
81  virtual ~WCMotionEH();
82 
83  };
84 
85 
86 } //# NAMESPACE CASA - END
87 
88 #endif
89 
90 
virtual void operator()(const WCMotionEvent &ev)=0
default sends event to cout
Base class for handling WorldCanvas motion events.
Definition: WCMotionEH.h:70
virtual ~WCMotionEH()
Destructor.
Class which stores WorldCanvas motion event information.
Definition: WCMotionEvent.h:79
WCMotionEH()
Default Constructor Required.