casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
WCRefreshEH.h
Go to the documentation of this file.
00001 //# WCRefreshEH.h: WorldCanvas refresh event handler
00002 //# Copyright (C) 1993,1994,1995,1996,1998,1999,2000,2002
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_WCREFRESHEH_H
00029 #define TRIALDISPLAY_WCREFRESHEH_H
00030 
00031 #include <casa/aips.h>
00032 #include <display/DisplayEvents/WCRefreshEvent.h>
00033 #include <display/DisplayEvents/DisplayEH.h>
00034 
00035 namespace casa { //# NAMESPACE CASA - BEGIN
00036 
00037 //
00038 // <summary>
00039 // Base class for handling WorldCanvas refresh events.
00040 // </summary>
00041 //
00042 // <prerequisite>
00043 // <li> <linkto class="WCRefreshEvent">WCRefreshEvent</linkto>
00044 // <li> Understanding of Display library event-handling methodology
00045 // <li> (Optional) Understanding of the
00046 // <linkto class="PixelCanvas">PixelCanvas</linkto> caching mechanism.
00047 // </prerequisite>
00048 //
00049 // <etymology>
00050 // WCRefreshEH : WorldCanvas refresh event-handler
00051 // </etymology>
00052 //
00053 // <synopsis>
00054 // class designed for derivation to provide a standard way of redrawing the
00055 // screen.  To use, derive from this class and implement the () operator.  For simple
00056 // applications, the op () should redraw the screen, or rebuild and redraw all display
00057 // lists if display lists were used.  
00058 
00059 // More advanced applications should maintain display lists and perhaps cache information 
00060 // at other levels.  These kinds of applications should examine the reason field to see 
00061 // what changed so they can minimize the computation needed to redraw the screen.
00062 // The meanings of the reason field are as follows:
00063 //
00064 // <li>
00065 // <ul> Display::UserCommand - This is generated only when the user calls 
00066 //      refresh() on the canvas.
00067 // <ul> Display::ColorTableChange - This is generated by a change in the
00068 //      colortable distribution.  
00069 //      Normally all display lists with color information must be rebuilt and redrawn.
00070 // <ul> Display::PixelCoordinateChange - The world canvas has been 
00071 //      resized or repositioned with 
00072 //      respect to the pixel canvas, or the pixelCanvas has changed size.
00073 // <ul> Display::LinearCoordinateChange - linear coordinates changed, typically
00074 //      happens when the image is zoomed.
00075 // <ul> Display::WorldCoordinateChange - world coordinates have changed, generally
00076 //      must redraw everything
00077 // </li>
00078 //
00079 // This class has been modified to inherit interface for handling
00080 // generic display events as well. (1/02)
00081 // See <linkto class="DisplayEH">DisplayEH</linkto> for details.
00082 // </synopsis>
00083 //
00084 // <motivation>
00085 // Provide the user with an object-oriented approach to event handling.
00086 // Allow the user to manage screen refresh in a simplistic way, yet
00087 // providing information for sophisticated approaches like multi-layer caching.
00088 // </motivation>
00089 //
00090 // <example>
00091 // see the test programs in Display/test.
00092 // </example>
00093 //
00094 
00095 class WCRefreshEH : public DisplayEH {
00096 
00097  public:
00098 
00099   // Default Constructor Required
00100   WCRefreshEH();
00101 
00102   // original handler interface (still used for WCRefreshEvents)
00103   virtual void operator ()(const WCRefreshEvent & ev) = 0;
00104 
00105   // Destructor
00106   virtual ~WCRefreshEH();
00107 
00108 };
00109 
00110 
00111 } //# NAMESPACE CASA - END
00112 
00113 #endif
00114 
00115 
00116