casa
$Rev:20696$
|
00001 //# PCITFiddler.h: Colormap fiddling on the PixelCanvas 00002 //# Copyright (C) 1999,2000 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# $Id$ 00027 00028 #ifndef TRIALDISPLAY_PCITFIDDLER_H 00029 #define TRIALDISPLAY_PCITFIDDLER_H 00030 00031 #include <casa/aips.h> 00032 #include <display/DisplayEvents/PCInvisTool.h> 00033 00034 namespace casa { //# NAMESPACE CASA - BEGIN 00035 00036 // <summary> 00037 // Colormap fiddling on the PixelCanvas. 00038 // </summary> 00039 // 00040 // <synopsis> 00041 // This class provides colormap fiddling via an invisible 00042 // tool which gets registered with a specific PixelCanvas. 00043 // </synopsis> 00044 00045 class PCITFiddler : public PCInvisTool { 00046 00047 public: 00048 00049 enum FiddleType { 00050 StretchAndShift, 00051 BrightnessAndContrast 00052 }; 00053 00054 // Constructor. Requires a PixelCanvas to fiddle upon, and 00055 // optional specification of the fiddling type and key to 00056 // detect. 00057 PCITFiddler(PixelCanvas *pcanvas, 00058 const PCITFiddler::FiddleType &fiddletype = 00059 PCITFiddler::StretchAndShift, 00060 Display::KeySym keysym = Display::K_Pointer_Button1); 00061 00062 // Destructor. 00063 virtual ~PCITFiddler(); 00064 00065 // Set/get the fiddle type. 00066 // <group> 00067 virtual void setFiddleType(const PCITFiddler::FiddleType &fiddletype); 00068 virtual PCITFiddler::FiddleType getFiddleType() 00069 { return itsFiddleType; } 00070 // </group> 00071 00072 // This function is called when a new position is ready. We 00073 // implement it to fiddle the Colormap in this class. 00074 virtual void positionReady(); 00075 00076 private: 00077 00078 PCITFiddler::FiddleType itsFiddleType; 00079 00080 }; 00081 00082 00083 } //# NAMESPACE CASA - END 00084 00085 #endif