casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MultiPointToolImpl.h
Go to the documentation of this file.
1 //# MultiPointToolImpl.h: WorldCanvas event-based point region drawer
2 //# Copyright (C) 1999,2000,2001,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_MULTIPOINTTOOLIMPL_H
29 #define TRIALDISPLAY_MULTIPOINTTOOLIMPL_H
30 
31 //# aips includes
32 #include <casa/aips.h>
33 #include <casa/Arrays/Vector.h>
34 
35 //# trial includes
36 
37 //# display library includes
40 
41 namespace casa { //# NAMESPACE CASA - BEGIN
42 
43 // <summary>
44 // WorldCanvas event-based point region drawer
45 // </summary>
46 
47 // <use visibility=export>
48 
49 // <reviewed reviewer="" data="yyyy/mm/dd" tests="" demos="">
50 // </reviewed>
51 
52 // <prerequisites>
53 // <li> MWCPointTool
54 // </prerequisites>
55 
56 // <etymology>
57 // MultiPointToolImpl stands for MultiWorldCanvas Point Tool Region
58 // </etymology>
59 
60 // <synopsis>
61 // Why this "finalization" is required is beyond me... i.e. why not
62 // roll this functionality into the parent class??
63 // <drs> Thu Aug 18 20:13:53 UTC 2011
64 // ------------------------------------------------------------------------
65 // This class finalises the functionality in MWCPointTool to
66 // implement event-based drawing of elliptical regions on a
67 // WorldCanvas. casacore::Double clicking inside the constructed point
68 // emits the region, whilst pressing Escape cancels the region.
69 // </synopsis>
70 
71 // <example>
72 // </example>
73 
74 // <motivation>
75 // Elliptical regions are the most common regions, and constructing
76 // them visually can be very efficient.
77 // </motivation>
78 
79 // <todo asof="1999/02/10">
80 // <li> Nothing known
81 // </todo>
82 
84 
85  public:
86 
87  // Constructor
89 
90  // Destructor
91  virtual ~MultiPointToolImpl();
92 
93  // handle events, via new-style interface. Currently just for reset event.
94  virtual void handleEvent(DisplayEvent& ev);
95 
96  protected:
97 
98  // Handle double-click inside the point. Invokes regionReady().
99  virtual void doubleInside();
100 
101  // This function is called when a region is deliberately "finished"
102  // by the user. It can be implemented to do further actions, such
103  // as report the region to the application
104  virtual void regionReady() { };
105 
106  // get the world coords of the current elliptical region
108 
109  // get the linear coords of the current elliptical region
111 
112  };
113 
114 
115 } //# NAMESPACE CASA - END
116 
117 #endif
virtual void regionReady()
This function is called when a region is deliberately &quot;finished&quot; by the user.
Base class for MultiWorldCanvas event-based rectangle tools.
MultiPointToolImpl(viewer::RegionSourceFactory *rf, PanelDisplay *pd, Display::KeySym keysym=Display::K_Pointer_Button2)
Constructor.
void getLinearCoords(casacore::Vector< casacore::Double > &blc, casacore::Vector< casacore::Double > &trc)
get the linear coords of the current elliptical region
virtual void doubleInside()
Handle double-click inside the point.
virtual ~MultiPointToolImpl()
Destructor.
Class describing the most basic event information in the display classes.
Definition: DisplayEvent.h:82
void getWorldCoords(casacore::Vector< casacore::Double > &blc, casacore::Vector< casacore::Double > &trc)
get the world coords of the current elliptical region
WorldCanvas event-based point region drawer.
A class which creates and manages &quot;panelled&quot; displays.
Definition: PanelDisplay.h:79
KeySym
Keysyms for PixelCanvas keyboard events.
Definition: DisplayEnums.h:412
virtual void handleEvent(DisplayEvent &ev)
handle events, via new-style interface.