casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WCInvisTool.h
Go to the documentation of this file.
1 //# WCInvisTool.h: Base class for WC event-based invisible position tools
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_WCINVISTOOL_H
29 #define TRIALDISPLAY_WCINVISTOOL_H
30 
31 #include <casa/aips.h>
33 
34 namespace casa { //# NAMESPACE CASA - BEGIN
35 
36 // <summary>
37 // Base implementation of WCTool for invisible (non-drawing) tools.
38 // </summary>
39 //
40 // <synopsis>
41 // This class implements some of WCTool, and adds additional interface
42 // to support invisible (ie. non-drawing) tools for WorldCanvases.
43 // </synopsis>
44 
45  class WCInvisTool : public WCTool {
46 
47  public:
48 
49  // constructor
50  WCInvisTool(WorldCanvas *wcanvas,
52 
53  // destructor
54  virtual ~WCInvisTool();
55 
56  // Functions called by the local event handling operators -
57  // these handle the drawing of the rectangle. In special
58  // conditions, namely double clicking the key, they will
59  // pass control on to the doubleInside and doubleOutside
60  // functions
61  // <group>
62  virtual void keyPressed(const WCPositionEvent &/*ev*/);
63  virtual void keyReleased(const WCPositionEvent &/*ev*/);
64  virtual void moved(const WCMotionEvent &/*ev*/, const viewer::region::region_list_type & /*selected_regions*/);
65  // </group>
66 
67  // casacore::Function called when a position is ready
68  virtual void positionReady() { };
69 
70  // Retrieve the position in linear WorldCanvas coordinates
71  virtual void get(casacore::Double &x, casacore::Double &y) const;
72 
73  // Retrieve the position in fractional linear WorldCanvas coordinates
74  virtual void getFractional(casacore::Double &x, casacore::Double &y) const;
75 
76  private:
77 
78  // are we actively marking positions?
80 
81  // have we moved
83 
84  // linear coordinates of the position
86 
87  };
88 
89 
90 } //# NAMESPACE CASA - END
91 
92 #endif
casacore::Double itsX
linear coordinates of the position
Definition: WCInvisTool.h:85
Base class for WorldCanvas event-based tools.
Definition: WCTool.h:141
virtual ~WCInvisTool()
destructor
Base implementation of WCTool for invisible (non-drawing) tools.
Definition: WCInvisTool.h:45
casacore::Bool itsMoved
have we moved
Definition: WCInvisTool.h:82
Class which stores WorldCanvas motion event information.
Definition: WCMotionEvent.h:79
virtual void positionReady()
casacore::Function called when a position is ready
Definition: WCInvisTool.h:68
double Double
Definition: aipstype.h:55
virtual void getFractional(casacore::Double &x, casacore::Double &y) const
Retrieve the position in fractional linear WorldCanvas coordinates.
casacore::Bool itsActive
are we actively marking positions?
Definition: WCInvisTool.h:79
virtual void keyReleased(const WCPositionEvent &)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
WCInvisTool(WorldCanvas *wcanvas, Display::KeySym keysym=Display::K_Pointer_Button1)
constructor
virtual void moved(const WCMotionEvent &, const viewer::region::region_list_type &)
virtual void keyPressed(const WCPositionEvent &)
Functions called by the local event handling operators - these handle the drawing of the rectangle...
Class which stores WorldCanvas position event information.
casacore::Double itsY
Definition: WCInvisTool.h:85
Implementation of drawing in world coordinates on top of a PixelCanvas.
Definition: WorldCanvas.h:204
std::set< Region * > region_list_type
Definition: RegionEnums.h:14
KeySym
Keysyms for PixelCanvas keyboard events.
Definition: DisplayEnums.h:412