casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SlicePanelDisplay.h
Go to the documentation of this file.
1 //# PanelDisplay.h: A 3d casacore::Slice Application
2 //# Copyright (C) 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 
27 #ifndef TRIALDISPLAY_SLICEPANELDISPLAY_H
28 #define TRIALDISPLAY_SLICEPANELDISPLAY_H
29 
30 #include <casa/aips.h>
31 #include <list>
38 
39 namespace casa { //# NAMESPACE CASA - BEGIN
40 
41  class PixelCanvas;
42  class MultiWCHolder;
43  class PanelDisplay;
44 
45 // <summary>
46 // An event handler to negotiate between three different PanelDisplays
47 // </summary>
48 //
49 // <use visibility=export>
50 //
51 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
52 // </reviewed>
53 //
54 // <prerequisite>
55 // <li> EventHandlers
56 // <li> SlicePanelDisplay
57 // </prerequisite>
58 //
59 // <etymology>
60 // </etymology>
61 //
62 // <synopsis>
63 //
64 // </synopsis>
65 //
66 
67  class SliceEH : public WCMotionEH,public WCPositionEH, public DTVisible {
68  public:
69  SliceEH(PanelDisplay* mwch, casacore::uInt axis=0, casacore::uInt daxis=0);
70  virtual ~SliceEH();
71  virtual void draw(const WCMotionEvent &ev);
72  virtual void operator()(const WCMotionEvent &ev);
73  virtual void operator()(const WCPositionEvent &ev);
74  virtual void matchKey(Display::KeySym key);
75  private:
82  };
83 // <summary> An application provide displays of three axis
84 // combinations of data in a cube
85 // </summary>
86 //
87 // <use visibility=export>
88 //
89 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
90 // </reviewed>
91 //
92 // <prerequisite>
93 // <li> PanelDisplay
94 // </prerequisite>
95 //
96 // <etymology>
97 // </etymology>
98 //
99 // <synopsis>
100 //
101 // </synopsis>
102 //
103 // <example>
104 // </example>
105 //
106 // <motivation>
107 // Slicing is a handy tool to ananlyse data cubes
108 // </motivation>
109 //
110 // <todo>
111 // </todo>
112 //
113 
114  class SlicePanelDisplay : public WCMotionEH {
115  public:
116  SlicePanelDisplay(PixelCanvas* pcanvas);
117  virtual ~SlicePanelDisplay();
118 
119  virtual casacore::Record getOptions() const;
120  virtual casacore::Bool setOptions(const casacore::Record& rec, casacore::Record& updatedOptions);
121 
122  virtual void hold();
123  virtual void release();
124 
125  virtual void refresh(const Display::RefreshReason &reason = Display::UserCommand);
126 
127  virtual PanelDisplay* getPanelDisplay(const casacore::String& pdname);
128 
129  virtual void setToolKey(const casacore::String& toolname,
130  const Display::KeySym& keysym);
131  virtual void disableTools();
132  virtual void enableTools();
133 
134  virtual void operator()(const WCMotionEvent &ev);
136  return itsActivePD;
137  };
138 
139  virtual void precompute();
140 
141  private:
142  std::map<casacore::String, PanelDisplay* > itsPanelDisplays;
143  std::map<casacore::String, SliceEH* > itsSliceEHs;
145  void installEHs();
146  void removeEHs();
147  };
148 
149 
150 } //# NAMESPACE CASA - END
151 
152 #endif
SlicePanelDisplay(PixelCanvas *pcanvas)
virtual void precompute()
std::map< casacore::String, SliceEH * > itsSliceEHs
An application provide displays of three axis combinations of data in a cube.
An event handler to negotiate between three different PanelDisplays.
Display::KeyModifier itsMotionKey
casacore::uInt itsDrawAxis
virtual void disableTools()
Base class for handling WorldCanvas motion events.
Definition: WCMotionEH.h:70
virtual void enableTools()
virtual void matchKey(Display::KeySym key)
SliceEH(PanelDisplay *mwch, casacore::uInt axis=0, casacore::uInt daxis=0)
virtual void draw(const WCMotionEvent &ev)
casacore::uInt itsAxis
Base class defining interface to pixel-based output devices.
Definition: PixelCanvas.h:161
virtual ~SliceEH()
std::map< casacore::String, PanelDisplay * > itsPanelDisplays
virtual casacore::Bool setOptions(const casacore::Record &rec, casacore::Record &updatedOptions)
virtual void release()
Class which stores WorldCanvas motion event information.
Definition: WCMotionEvent.h:79
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 casacore::Record getOptions() const
MWCAnimator itsAni
KeyModifier
All events - modifier codes.
Definition: DisplayEnums.h:368
Display::KeySym itsPositionKey
virtual void operator()(const WCMotionEvent &ev)
default sends event to cout
Class providing draw style settings for visible DisplayTools.
Definition: DTVisible.h:95
virtual void operator()(const WCMotionEvent &ev)
default sends event to cout
virtual void refresh(const Display::RefreshReason &reason=Display::UserCommand)
RefreshReason
Callback reasons for PCRefreshEvent and WCRefreshEvent.
Definition: DisplayEnums.h:267
Class which stores WorldCanvas position event information.
virtual PanelDisplay * activePanelDisplay()
virtual PanelDisplay * getPanelDisplay(const casacore::String &pdname)
Animator for MultiWCHolder class.
Definition: MWCAnimator.h:64
A class which creates and manages &quot;panelled&quot; displays.
Definition: PanelDisplay.h:79
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Base class for handling WorldCanvas position events.
Definition: WCPositionEH.h:75
PanelDisplay * itsPD
KeySym
Keysyms for PixelCanvas keyboard events.
Definition: DisplayEnums.h:412
virtual void setToolKey(const casacore::String &toolname, const Display::KeySym &keysym)
unsigned int uInt
Definition: aipstype.h:51
User told PixelCanvas to refresh via PixelCanvas refresh()
Definition: DisplayEnums.h:269