casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlotEventHandler.h
Go to the documentation of this file.
1 //# PlotEventHandler.h: Class to handle different types of interaction events.
2 //# Copyright (C) 2008
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 #ifndef PLOTEVENTHANDLER_H_
28 #define PLOTEVENTHANDLER_H_
29 
31 
32 namespace casa {
33 
34 // Base class for a handler for PlotSelectEvent.
36 public:
38 
40 
41  // Handle the given event.
42  virtual void handleSelect(const PlotSelectEvent& event) = 0;
43 };
44 
45 // Base class for a handler for PlotClickEvent.
47 public:
49 
50  virtual ~PlotClickEventHandler() { }
51 
52  // Handle the given event.
53  virtual void handleClick(const PlotClickEvent& event) = 0;
54 };
55 
56 // Base class for a handler for PlotMousePressEvent.
58 public:
60 
62 
63  // Handle the given event.
64  virtual void handleMousePress(const PlotMousePressEvent& event) = 0;
65 };
66 
67 // Base class for a handler for PlotMouseReleaseEvent.
69 public:
71 
73 
74  // Handle the given event.
75  virtual void handleMouseRelease(const PlotMouseReleaseEvent& event) = 0;
76 };
77 
78 // Base class for a handler for PlotMouseDragEvent.
80 public:
82 
84 
85  // Handle the given event.
86  virtual void handleMouseDrag(const PlotMouseDragEvent& event) = 0;
87 };
88 
89 // Base class for a handler for a PlotMouseMoveEvent.
91 public:
93 
95 
96  // Handle the given event.
97  virtual void handleMouseMove(const PlotMouseMoveEvent& event) = 0;
98 };
99 
100 // Base class for a handler for PlotWheelEvent.
102 public:
104 
106 
107  // Handle the given event
108  virtual void handleWheel(const PlotWheelEvent& event) = 0;
109 };
110 
111 // Base class for a handler for PlotKeyEvent.
113 public:
115 
116  virtual ~PlotKeyEventHandler() { }
117 
118  // Handle the given event.
119  virtual void handleKey(const PlotKeyEvent& event) = 0;
120 };
121 
122 // Base class for a handler for PlotResizeEvent.
124 public:
126 
128 
129  // Handle the given event.
130  virtual void handleResize(const PlotResizeEvent& event) = 0;
131 };
132 
133 // Base class for a handler for PlotButtonEvent.
135 public:
137 
139 
140  // Handle the given event.
141  virtual void handleButton(const PlotButtonEvent& event) = 0;
142 };
143 
144 // Base class for a handler for PlotCheckboxEvent.
146 public:
148 
150 
151  // Handle the given event.
152  virtual void handleCheckbox(const PlotCheckboxEvent& event) = 0;
153 };
154 
155 
156 // Smart Pointer Definitions //
157 
170 
171 }
172 
173 #endif /*PLOTEVENTHANDLER_H_*/
Event for when the user selects a region on a plot canvas with the mouse.
Definition: PlotEvent.h:53
Convenience class for mouse presses.
Definition: PlotEvent.h:139
casacore::CountedPtr< PlotWheelEventHandler > PlotWheelEventHandlerPtr
Event for when a PlotCheckbox is clicked.
Definition: PlotEvent.h:337
casacore::CountedPtr< PlotMouseReleaseEventHandler > PlotMouseReleaseEventHandlerPtr
casacore::CountedPtr< PlotSelectEventHandler > PlotSelectEventHandlerPtr
Smart Pointer Definitions //.
virtual void handleSelect(const PlotSelectEvent &event)=0
Handle the given event.
casacore::CountedPtr< PlotButtonEventHandler > PlotButtonEventHandlerPtr
Base class for a handler for PlotKeyEvent.
Base class for a handler for PlotSelectEvent.
Convenience class for mouse moves.
Definition: PlotEvent.h:169
Base class for a handler for PlotClickEvent.
virtual void handleResize(const PlotResizeEvent &event)=0
Handle the given event.
Event for when the user scrolls the scroll wheel.
Definition: PlotEvent.h:183
Convenience class for mouse clicks.
Definition: PlotEvent.h:129
Base class for a handler for PlotMouseReleaseEvent.
Event for when the user makes a keyboard command when a canvas has focus.
Definition: PlotEvent.h:216
virtual void handleWheel(const PlotWheelEvent &event)=0
Handle the given event.
virtual void handleMouseMove(const PlotMouseMoveEvent &event)=0
Handle the given event.
Base class for a handler for a PlotMouseMoveEvent.
Base class for a handler for PlotMouseDragEvent.
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
casacore::CountedPtr< PlotKeyEventHandler > PlotKeyEventHandlerPtr
casacore::CountedPtr< PlotCheckboxEventHandler > PlotCheckboxEventHandlerPtr
Convenience class for mouse drags.
Definition: PlotEvent.h:159
Event for when a canvas or plotter is resized.
Definition: PlotEvent.h:278
casacore::CountedPtr< PlotMouseDragEventHandler > PlotMouseDragEventHandlerPtr
casacore::CountedPtr< PlotMousePressEventHandler > PlotMousePressEventHandlerPtr
casacore::CountedPtr< PlotResizeEventHandler > PlotResizeEventHandlerPtr
virtual void handleMouseRelease(const PlotMouseReleaseEvent &event)=0
Handle the given event.
virtual void handleKey(const PlotKeyEvent &event)=0
Handle the given event.
Base class for a handler for PlotResizeEvent.
Base class for a handler for PlotCheckboxEvent.
Base class for a handler for PlotMousePressEvent.
virtual void handleClick(const PlotClickEvent &event)=0
Handle the given event.
virtual void handleMousePress(const PlotMousePressEvent &event)=0
Handle the given event.
Base class for a handler for PlotButtonEvent.
casacore::CountedPtr< PlotClickEventHandler > PlotClickEventHandlerPtr
Base class for a handler for PlotWheelEvent.
Event for when a PlotButton is pressed.
Definition: PlotEvent.h:318
virtual void handleButton(const PlotButtonEvent &event)=0
Handle the given event.
casacore::CountedPtr< PlotMouseMoveEventHandler > PlotMouseMoveEventHandlerPtr
Convenience class for mouse releases.
Definition: PlotEvent.h:149
virtual void handleCheckbox(const PlotCheckboxEvent &event)=0
Handle the given event.
virtual void handleMouseDrag(const PlotMouseDragEvent &event)=0
Handle the given event.