casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DisplayEvents.h
Go to the documentation of this file.
1 //# DisplayEvents.h: The DisplayEvents module - display event handling
2 //# Copyright (C) 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_DISPLAYEVENTS_H
29 #define TRIALDISPLAY_DISPLAYEVENTS_H
30 
32 
33 namespace casa { //# NAMESPACE CASA - BEGIN
34 
35 // <module>
36 //
37 // <summary>
38 // A module providing event handling for the DisplayCanvases
39 // </summary>
40 //
41 // <use visibility=export>
42 //
43 // <reviewed reviewer="None yet" date="yyyy/mm/dd" demos="">
44 // </reviewed>
45 //
46 // <prerequisite>
47 // <li> DisplayCanvas
48 // </prerequisite>
49 //
50 // <etymology>
51 // The module provides various classes that are responsible for
52 // "handling" "events"
53 // </etymology>
54 //
55 // <synopsis>
56 // This module contains classes which are used to handle
57 // position, motion and refresh events that occur on PixelCanvases and
58 // WorldCanvases. Position events occur when the user presses or
59 // releases a keyboard key or a mouse button when the window input
60 // focus is over a PixelCanvas or WorldCanvas. Motion events occur
61 // when the user moves the mouse over a PixelCanvas or a WorldCanvas.
62 // Refresh events occur for a variety of reasons, and arise when
63 // PixelCanvases or WorldCanvases need to redraw their contents.
64 //
65 // The lowest level of event classes are those which describe the
66 // various events on the PixelCanvas. These comprise PCPositionEvent,
67 // PCMotionEvent and PCRefreshEvent. All of the information
68 // pertaining to a particular event will be stored in one of these
69 // classes. To receive these type of events, the programmer must
70 // register a class derived from PCPositionEH, PCMotionEH or
71 // PCRefreshEH (where the "EH" stands for Event Handler) with the
72 // appropriate PixelCanvas. Then any events of that type (Position,
73 // Motion or Refresh) will be distributed to the class that the
74 // programmer registered. The WorldCanvas has equivalent event
75 // storage classes in WCPositionEvent, WCMotionEvent and
76 // WCRefreshEvent, and equivalent event handling classes in
77 // WCPositionEH, WCMotionEH and WCRefreshEH.
78 //
79 // It is important to note that none of the event handlers "consume"
80 // events. This means that all PixelCanvas events occuring on a
81 // particular PixelCanvas wil be distributed to all the event handlers
82 // registered on that PixelCanvas. Likewise, all WorldCanvas events
83 // for a particular WorldCanvas are distributed to all WorldCanvas
84 // event handlers registered on that WorldCanvas.
85 //
86 // It is also critical for the programmer to be aware that in general,
87 // the WorldCanvas registers one instance of each of the PCPositionEH,
88 // PCMotionEH and PCRefreshEH type handler classes for its own use.
89 // These event handlers are responsible for constructing WorldCanvas
90 // event information objects (WCPositionEvent, WCMotionEvent and
91 // WCRefreshEvent) from the corresponding PixelCanvas events, and then
92 // call the appropriate handlers on the WorldCanvas. So the
93 // programmer must be careful that they handle each event once and
94 // only once - either on the PixelCanvas, or on the WorldCanvas, but
95 // not on both. There will be rare instances where handling events on
96 // both the WorldCanvas and its underlying PixelCanvas is necessary.
97 // </synopsis>
98 //
99 // <example>
100 // </example>
101 //
102 // <motivation>
103 // Any interactive display library must provide methods for the
104 // programmer to respond to user input. That is the reason for this
105 // module.
106 // </motivation>
107 //
108 // <todo asof="1999/02/10">
109 // <li> None known
110 // </todo>
111 //
112 // </module>
113 
114 
115 } //# NAMESPACE CASA - END
116 
117 #endif
118