casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DDDRectangle.h
Go to the documentation of this file.
1 //# DDDRectangle.h: implementation of rectangular DDDObject
2 //# Copyright (C) 1999,2000,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_DDDRECTANGLE_H
29 #define TRIALDISPLAY_DDDRECTANGLE_H
30 
31 #include <casa/aips.h>
32 #include <casa/Arrays/Vector.h>
33 #include <casa/Containers/Record.h>
35 
36 namespace casa { //# NAMESPACE CASA - BEGIN
37 
38 // <summary>
39 // Implementation of a rectangular object for DrawingDisplayData class.
40 // </summary>
41 
42 // <synopsis>
43 // This class implements the interface defined by DDDObject, to provide
44 // a rectangle object for registration with DrawingDisplayData objects.
45 // </synopsis>
46 
47  class DDDRectangle : public DDDObject {
48 
49  public:
50 
51  // Constructor taking a casacore::Record description. Fields in the record,
52  // on top of what is consumed by the DDDObject constructor, are:
53  // <src>blc</src> and <src>trc</src>.
55 
56  // Destructor.
57  virtual ~DDDRectangle();
58 
59 
60  // Draw this rectangle object for the given reason on the provided
61  // WorldCanvas.
62  virtual void draw(const Display::RefreshReason &reason,
63  WorldCanvas *worldcanvas);
64 
65  // Return a record describing this object.
66  virtual casacore::Record description();
67 
68  // Update this object based on the information in the provided
69  // Record.
70  virtual void setDescription(const casacore::Record &rec);
71 
72  // Event handlers. The parent DrawingDisplayData will distribute
73  // events as necessary to the various DDDObjects which comprise it.
74  // <group>
75  virtual void operator()(const WCRefreshEvent &/*ev*/) {
76  ;
77  };
78  virtual void operator()(const WCPositionEvent &ev);
79  virtual void operator()(const WCMotionEvent &ev);
80  // </group>
81 
82  protected:
83 
84  // (Required) default constructor.
85  DDDRectangle();
86 
87  // (Required) copy constructor.
88  DDDRectangle(const DDDRectangle &other);
89 
90  // (Required) copy assignment.
91  void operator=(const DDDRectangle &other);
92 
93  private:
94 
95  // Blc and trc of rectangle in world coordinates.
97 
98  // Handle coordinates.
100 
101  // Mode.
103 
104  // Store for movement bases.
106 
107  // is it a left handle? a bottom handle?
109 
110  };
111 
112 
113 } //# NAMESPACE CASA - END
114 
115 #endif
DrawingDisplayData * owner()
Return the owner of this object.
Definition: DDDObject.h:131
casacore::Vector< casacore::Double > itsBlc
Blc and trc of rectangle in world coordinates.
Definition: DDDRectangle.h:96
int Int
Definition: aipstype.h:50
casacore::Vector< casacore::Int > itsHY
Definition: DDDRectangle.h:99
virtual void operator()(const WCRefreshEvent &)
Event handlers.
Definition: DDDRectangle.h:75
Class which stores WorldCanvas refresh event information.
DisplayData which provides interactive drawing capabilities.
Implementation of a rectangular object for DrawingDisplayData class.
Definition: DDDRectangle.h:47
casacore::Bool itsBottomHandle
Definition: DDDRectangle.h:108
virtual void setDescription(const casacore::Record &rec)
Update this object based on the information in the provided Record.
casacore::Bool itsLeftHandle
is it a left handle? a bottom handle?
Definition: DDDRectangle.h:108
void operator=(const DDDRectangle &other)
(Required) copy assignment.
casacore::Vector< casacore::Int > itsHX
Handle coordinates.
Definition: DDDRectangle.h:99
casacore::Vector< casacore::Double > itsTrc
Definition: DDDRectangle.h:96
Class which stores WorldCanvas motion event information.
Definition: WCMotionEvent.h:79
virtual void draw(const Display::RefreshReason &reason, WorldCanvas *worldcanvas)
Draw this rectangle object for the given reason on the provided WorldCanvas.
DDDRectangle()
(Required) default constructor.
casacore::Int itsBaseMoveY
Definition: DDDRectangle.h:105
Base class describing interface for objects supported by DrawingDisplayData.
Definition: DDDObject.h:62
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual ~DDDRectangle()
Destructor.
RefreshReason
Callback reasons for PCRefreshEvent and WCRefreshEvent.
Definition: DisplayEnums.h:267
Class which stores WorldCanvas position event information.
Implementation of drawing in world coordinates on top of a PixelCanvas.
Definition: WorldCanvas.h:204
virtual casacore::Record description()
Return a record describing this object.
DDDObject::Mode itsMode
Mode.
Definition: DDDRectangle.h:102
casacore::Int itsBaseMoveX
Store for movement bases.
Definition: DDDRectangle.h:105