casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WCRefreshEH.h
Go to the documentation of this file.
1 //# WCRefreshEH.h: WorldCanvas refresh event handler
2 //# Copyright (C) 1993,1994,1995,1996,1998,1999,2000,2002
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_WCREFRESHEH_H
29 #define TRIALDISPLAY_WCREFRESHEH_H
30 
31 #include <casa/aips.h>
34 
35 namespace casa { //# NAMESPACE CASA - BEGIN
36 
37 //
38 // <summary>
39 // Base class for handling WorldCanvas refresh events.
40 // </summary>
41 //
42 // <prerequisite>
43 // <li> <linkto class="WCRefreshEvent">WCRefreshEvent</linkto>
44 // <li> Understanding of Display library event-handling methodology
45 // <li> (Optional) Understanding of the
46 // <linkto class="PixelCanvas">PixelCanvas</linkto> caching mechanism.
47 // </prerequisite>
48 //
49 // <etymology>
50 // WCRefreshEH : WorldCanvas refresh event-handler
51 // </etymology>
52 //
53 // <synopsis>
54 // class designed for derivation to provide a standard way of redrawing the
55 // screen. To use, derive from this class and implement the () operator. For simple
56 // applications, the op () should redraw the screen, or rebuild and redraw all display
57 // lists if display lists were used.
58 
59 // More advanced applications should maintain display lists and perhaps cache information
60 // at other levels. These kinds of applications should examine the reason field to see
61 // what changed so they can minimize the computation needed to redraw the screen.
62 // The meanings of the reason field are as follows:
63 //
64 // <li>
65 // <ul> Display::UserCommand - This is generated only when the user calls
66 // refresh() on the canvas.
67 // <ul> Display::ColorTableChange - This is generated by a change in the
68 // colortable distribution.
69 // Normally all display lists with color information must be rebuilt and redrawn.
70 // <ul> Display::PixelCoordinateChange - The world canvas has been
71 // resized or repositioned with
72 // respect to the pixel canvas, or the pixelCanvas has changed size.
73 // <ul> Display::LinearCoordinateChange - linear coordinates changed, typically
74 // happens when the image is zoomed.
75 // <ul> Display::WorldCoordinateChange - world coordinates have changed, generally
76 // must redraw everything
77 // </li>
78 //
79 // This class has been modified to inherit interface for handling
80 // generic display events as well. (1/02)
81 // See <linkto class="DisplayEH">DisplayEH</linkto> for details.
82 // </synopsis>
83 //
84 // <motivation>
85 // Provide the user with an object-oriented approach to event handling.
86 // Allow the user to manage screen refresh in a simplistic way, yet
87 // providing information for sophisticated approaches like multi-layer caching.
88 // </motivation>
89 //
90 // <example>
91 // see the test programs in Display/test.
92 // </example>
93 //
94 
95  class WCRefreshEH : public DisplayEH {
96 
97  public:
98 
99  // Default Constructor Required
100  WCRefreshEH();
101 
102  // original handler interface (still used for WCRefreshEvents)
103  virtual void operator ()(const WCRefreshEvent & ev) = 0;
104 
105  // Destructor
106  virtual ~WCRefreshEH();
107 
108  };
109 
110 
111 } //# NAMESPACE CASA - END
112 
113 #endif
114 
115 
116 
Class which stores WorldCanvas refresh event information.
class for handling any type of DisplayEvent.
Definition: DisplayEH.h:100
Base class for handling WorldCanvas refresh events.
Definition: WCRefreshEH.h:95
WCRefreshEH()
Default Constructor Required.
virtual void operator()(const WCRefreshEvent &ev)=0
original handler interface (still used for WCRefreshEvents)
virtual ~WCRefreshEH()
Destructor.