casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
PCPositionEH.h
Go to the documentation of this file.
00001 //# PCPositionEH.h: PixelCanvas position event handler
00002 //# Copyright (C) 1993,1994,1995,1996,1999,2000
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id$
00027 
00028 #ifndef TRIALDISPLAY_PCPOSITIONEH_H
00029 #define TRIALDISPLAY_PCPOSITIONEH_H
00030 
00031 #include <casa/aips.h>
00032 #include <display/DisplayEvents/PCPositionEvent.h>
00033 
00034 namespace casa { //# NAMESPACE CASA - BEGIN
00035 
00036 class PixelCanvas;
00037 
00038 //
00039 // <summary>
00040 // PixelCanvas Event Handler for managing keyboard and mouse button
00041 // events
00042 // </summary>
00043 //
00044 // <prerequisite>
00045 // <li> <linkto class="PCPositionEvent">PCPositionEvent</linkto>
00046 // </prerequisite>
00047 //
00048 // <etymology>
00049 // PCPositionEH : PixelCanvas Position Event Handler
00050 // </etymology>
00051 //
00052 // <synopsis>
00053 // Designed for derivation, this class is the base class which
00054 // is communicated to when an X button or keyboard event is sent
00055 // to the PixelCanvas.  The application programmer should derive
00056 // from this class, add any data fields needed, and override
00057 // operator () to respond properly to keyboard and mouse button
00058 // events.
00059 // </synopsis>
00060 //
00061 // <motivation>
00062 // Wanted a standard method for event management.  It was felt
00063 // that a class might be more flexible than callback methods
00064 // because a class can contain data and other functions as
00065 // well.
00066 // </motivation>
00067 //
00068 // <example>
00069 // see the <linkto class="WorldCanvas">WorldCanvas</linkto> code
00070 // see the Display test directory
00071 // </example>
00072 //
00073 
00074 class PCPositionEH {
00075 
00076  public:
00077 
00078   // Default Constructor Required
00079   PCPositionEH();
00080 
00081   // Default just prints the event to cout
00082   virtual void operator ()(const PCPositionEvent & eh);    
00083 
00084   // Destructor
00085   virtual ~PCPositionEH();
00086 
00087 };
00088 
00089 
00090 } //# NAMESPACE CASA - END
00091 
00092 #endif
00093 
00094