casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MWCPositionVelocityTool.h
Go to the documentation of this file.
1 //# MWCPositionVelocityTool.h: MultiWorldCanvas position velocity tool
2 //# Copyright (C) 2012
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 
27 #ifndef VIEWER_MWCPOSITIONVELOCITYTOOL_H_
28 #define VIEWER_MWCPOSITIONVELOCITYTOOL_H_
29 
30 #include <casa/aips.h>
31 #include <casa/Arrays/Vector.h>
34 
35 namespace casa { //# NAMESPACE CASA - BEGIN
36 
37  class WorldCanvas;
38 
39  // <summary>
40  // Multi WorldCanvas event-based position velocity tool
41  // </summary>
42  //
43  // <use visibility=export>
44  //
45  // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
46  // </reviewed>
47  //
48  // <prerequisites>
49  // </prerequisites>
50  //
51  // <etymology>
52  // MWCPositionVelocityTool implements a position-velocity tool using the MultiWorldCanvas
53  // </etymology>
54  //
55  // <synopsis>
56  // </synopsis>
57  //
58  // <example>
59  // </example>
60  //
61  // <motivation>
62  // </motivation>
63  //
64  // <todo asof="">
65  // </todo>
66 
68 
69  public:
70  // Constructor
72 
73  // Destructor
74  virtual ~MWCPositionVelocityTool();
75 
76  // Reset to non-showing, non-active. Refreshes if necessary to erase
77  // (unless skipRefresh==true).
78  // (Does not unregister from WCs or disable future event handling).
79  virtual void reset(casacore::Bool skipRefresh=false);
80 
81  protected:
82  // Functions called by the base class mouse event handling operators -
83  // these maintain the state of the pan vector and order it to be drawn
84  // via refresh().
85  // <group>
86  virtual void keyPressed(const WCPositionEvent &/*ev*/);
87  virtual void keyReleased(const WCPositionEvent &/*ev*/);
88  virtual void moved(const WCMotionEvent &/*ev*/, const viewer::region::region_list_type & /*selected_regions*/);
89  // </group>
90 
91  // draw the distance vector on a PixelCanvas. (To be called only by the
92  // base class refresh event handler).
93  virtual void draw(const WCRefreshEvent&/*ev*/, const viewer::region::region_list_type & /*selected_regions*/);
94 
95  private:
96  // Should we respond to mouse movement and button release? Should
97  // we draw? Set when the button is pushed in one of the tool's WCs.
99 
100  // are the units in x and y identical?
102 
103  // pixel coordinates of the pan vector. 1 = anchor, 2 = new position.
105 
106  // axis index for RA and DEC
108  };
109 
110 
111 } //# NAMESPACE CASA - END
112 
113 #endif
114 
115 
virtual ~MWCPositionVelocityTool()
Destructor.
int Int
Definition: aipstype.h:50
Class which stores WorldCanvas refresh event information.
virtual void keyPressed(const WCPositionEvent &)
Functions called by the base class mouse event handling operators - these maintain the state of the p...
virtual void keyReleased(const WCPositionEvent &)
MWCPositionVelocityTool(Display::KeySym keysym=Display::K_Pointer_Button1, casacore::Bool scrollingAllowed=true)
Constructor.
Class which stores WorldCanvas motion event information.
Definition: WCMotionEvent.h:79
virtual void moved(const WCMotionEvent &, const viewer::region::region_list_type &)
virtual void draw(const WCRefreshEvent &, const viewer::region::region_list_type &)
draw the distance vector on a PixelCanvas.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Int itsX1
pixel coordinates of the pan vector.
casacore::Bool itsActive
Should we respond to mouse movement and button release? Should we draw? Set when the button is pushed...
Class providing draw style settings for visible DisplayTools.
Definition: DTVisible.h:95
casacore::Int itsRaIndex
axis index for RA and DEC
virtual void reset(casacore::Bool skipRefresh=false)
Reset to non-showing, non-active.
Class which stores WorldCanvas position event information.
Base class for MultiWorldCanvas event-based tools.
Definition: MultiWCTool.h:89
std::set< Region * > region_list_type
Definition: RegionEnums.h:14
KeySym
Keysyms for PixelCanvas keyboard events.
Definition: DisplayEnums.h:412
casacore::Bool itsEqualUnits
are the units in x and y identical?
Multi WorldCanvas event-based position velocity tool.