Source
virtual casacore::Bool setOptions(const casacore::Record &rec, casacore::Record &updatedOptions);
//# WCCSAxisLabeller.h: labelling axes using a DisplayCoordinateSystem on a WC
//# Copyright (C) 1999,2000,2001,2002
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
//# $Id$
namespace casa { //# NAMESPACE CASA - BEGIN
// <summary>
// Base class for WorldCanvas axis labelling using a DisplayCoordinateSystem.
// </summary>
//
// <synopsis>
// This (base) class adds to the interface of WCAxisLabeller functions
// which support the use/provision of a DisplayCoordinateSystem to assist with
// axis labelling.
// </synopsis>
class WCCSAxisLabeller : public WCAxisLabeller {
public:
enum SpecAxisType { // taken from the casacore::FITS spectral coordinate type codes
FREQ,
VELO,
WAVE,
AWAV,
};
// Constructor
WCCSAxisLabeller();
// Destructor
virtual ~WCCSAxisLabeller();
// Install a DisplayCoordinateSystem.
//#dk note: See casacore::Bool useWCCS, below; in some cases the WorldCanvas's
//# own CS is now used to draw labels, although the CS set here is
//# still needed for certain things (default user interface, e.g.)
//# when the WC is unknown. (10/07)
virtual void setCoordinateSystem(const DisplayCoordinateSystem& coordsys);
// Get the DisplayCoordinateSystem.
virtual DisplayCoordinateSystem coordinateSystem() const {
return itsCoordinateSystem;
}
// Has a CS been set?
casacore::Bool hasCoordinateSystem() const {
return itsHasCoordinateSystem;
};
// Setting this true allows the labeller to use the WorldCanvas's
// own CS to draw labels (although itsCoordinateSystem is still
// needed for certain things at present). Default: false.
//#dk (See WCCSNLAxisLabeller::draw() and usage in PADD::setupElements()).
//#
//# (Kludge upon kludge, I know... all stemming from the original design
//# flaw: not realizing that WC needs its _own CS_ (related to but _not
//# the same_ as the Images'), and then trying to tack one on later...).
casacore::Bool useWCCS;
// install the default options for this labeller.
virtual void setDefaultOptions();