casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DDDHandle.h
Go to the documentation of this file.
1 //# DDDHandle.h: class to draw handles on DDDObjects
2 //# Copyright (C) 1999,2000,2001
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_DDDHANDLE_H
29 #define TRIALDISPLAY_DDDHANDLE_H
30 
31 #include <casa/aips.h>
32 #include <casa/Exceptions.h>
33 #include <casa/Arrays/Vector.h>
34 #include <casa/Arrays/Matrix.h>
35 
36 namespace casa { //# NAMESPACE CASA - BEGIN
37 
38 // <summary>
39 // A class to draw and detect handles on a DDDObject
40 // </summary>
41 
42 // <synopsis> This class defines a square handle and it's
43 // behaviour. This can be used to interact with DDDObjects
44 // </synopsis>
45 
46  class DDDHandle {
47 
48  public:
49  // enum describing the size of the handle
51 
52  // Default constructor
53  DDDHandle();
54  // Constructor taking the position where to place the handle and it's size
56 
57  // Destructor.
58  virtual ~DDDHandle();
59 
60  // This function returns true when the input poistion is within the handle
62 
63  // give the handle a new size
64  virtual void resize(const DDDHandle::Size& size);
65  // move the handle to a new position
66  virtual void move(casacore::Double dx, casacore::Double dy);
67 
68  // <group>
69  // utility funtions to retrieve blc/trc of the handle or the handle corners
70  virtual casacore::Double blcX() const;
71  virtual casacore::Double blcY() const;
72  virtual casacore::Double trcX() const;
73  virtual casacore::Double trcY() const;
75  return itsCorners;
76  };
77  // </group>
78 
79  // set up the handle
80  // <group>
83  // </group>
84 
85  DDDHandle(const DDDHandle &);
86  void operator=(const DDDHandle &);
87 
88  private:
89  // the corners
91  // the size
93 
94  };
95 
96 
97 } //# NAMESPACE CASA - END
98 
99 #endif
casacore::Matrix< casacore::Double > getHandle() const
Definition: DDDHandle.h:74
A class to draw and detect handles on a DDDObject.
Definition: DDDHandle.h:46
virtual casacore::Bool underCursor(casacore::Double posx, casacore::Double posy) const
This function returns true when the input poistion is within the handle.
virtual void move(casacore::Double dx, casacore::Double dy)
move the handle to a new position
DDDHandle::Size itsSize
the size
Definition: DDDHandle.h:92
virtual casacore::Double blcX() const
utility funtions to retrieve blc/trc of the handle or the handle corners
virtual void resize(const DDDHandle::Size &size)
give the handle a new size
size_t size() const
virtual casacore::Double trcX() const
virtual casacore::Double blcY() const
virtual casacore::Double trcY() const
casacore::Matrix< casacore::Double > itsCorners
the corners
Definition: DDDHandle.h:90
DDDHandle()
Default constructor.
double Double
Definition: aipstype.h:55
void operator=(const DDDHandle &)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
Size
enum describing the size of the handle
Definition: DDDHandle.h:50
virtual ~DDDHandle()
Destructor.
void createHandle(casacore::Double x, casacore::Double y)
set up the handle