casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
DSBasic.h
Go to the documentation of this file.
00001 //# DSBasic.h: Basically, a base class for any shape which can be drawn with 
00002 //# primitive lines.
00003 //# Copyright (C) 1998,1999,2000,2001,2002
00004 //# Associated Universities, Inc. Washington DC, USA.
00005 //#
00006 //# This library is free software; you can redistribute it and/or modify it
00007 //# under the terms of the GNU Library General Public License as published by
00008 //# the Free Software Foundation; either version 2 of the License, or (at your
00009 //# option) any later version.
00010 //#
00011 //# This library is distributed in the hope that it will be useful, but WITHOUT
00012 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00014 //# License for more details.
00015 //#
00016 //# You should have received a copy of the GNU Library General Public License
00017 //# along with this library; if not, write to the Free Software Foundation,
00018 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00019 //#
00020 //# Correspondence concerning AIPS++ should be addressed as follows:
00021 //#        Internet email: aips2-request@nrao.edu.
00022 //#        Postal address: AIPS++ Project Office
00023 //#                        National Radio Astronomy Observatory
00024 //#                        520 Edgemont Road
00025 //#                        Charlottesville, VA 22903-2475 USA
00026 //#
00027 //# $Id: 
00028 
00029 #ifndef TRIALDISPLAY_DSBASIC_H
00030 #define TRIALDISPLAY_DSBASIC_H
00031 
00032 #include <casa/aips.h>
00033 
00034 #include <display/DisplayShapes/DisplayShape.h>
00035 
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037 
00038 template <class T> class DParameterRange;
00039 
00040 // <summary>
00041 // Base class for all "basic" shapes
00042 // </summary>
00043 //
00044 // <prerequisite>
00045 // <li> <linkto class="DisplayShape">DisplayShape</linkto>
00046 // </prerequisite>
00047 //
00048 // <etymology>
00049 // DSBasic is a base for all basic classes, it manages linewidth.
00050 // </etymology>
00051 //
00052 // <synopsis>
00053 // DSBasic is a base class for any shape using basic lines to draw it self, 
00054 // i.e. shapes such as lines, circles and polygons should extend this class. 
00055 // More complex DisplayShapes, e.g. text should not. 
00056 //
00057 // <motivation>
00058 // A common interface for the setting of linewidths
00059 // </motivation>
00060 //
00061 // <example>
00062 // <srcblock>
00063 //
00064 // </srcblock>
00065 // </example>
00066 
00067 
00068 class DSBasic : public DisplayShape {
00069 
00070 public:
00071 
00072   // Default constructor
00073   DSBasic();
00074 
00075   // Copy constructor
00076   DSBasic(const DSBasic& other);
00077 
00078   // Destructor
00079   virtual ~DSBasic();
00080 
00081   // Manage line width
00082   // <group>
00083   virtual void setLineWidth(const Int pixels);
00084   virtual Int getLineWidth();
00085   // </group>
00086 
00087   // Standard fns
00088   // <group>
00089   virtual void draw(PixelCanvas* pc);
00090   virtual void rotateAbout(const Float& angle, const Float& aboutX, 
00091                              const Float& aboutY);
00092   virtual void move(const Float& dX, const Float& dY);
00093   virtual Record getOptions();
00094   virtual Bool setOptions(const Record& settings);
00095   // </group>
00096 
00097 private:
00098 
00099   DParameterRange<Int>* itsLineWidth;
00100 
00101 };
00102 
00103 
00104 } //# NAMESPACE CASA - END
00105 
00106 #endif
00107 
00108 
00109 
00110 
00111 
00112