casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AniPosEH.h
Go to the documentation of this file.
1 //# AniPosEH.h: Animator position event handler for a WorldCanvas
2 //# Copyright (C) 1996,1997,1998,1999,2000
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_ANIPOSEH_H
29 #define TRIALDISPLAY_ANIPOSEH_H
30 
31 #include <casa/aips.h>
34 
35 namespace casa { //# NAMESPACE CASA - BEGIN
36 
37  class WorldCanvasHolder;
38  class Attribute;
39 
40 // <summary>
41 // WorldCanvas position event handler for Animator.
42 // </summary>
43 //
44 // <synopsis>
45 // </synopsis>
46 
47  class AniPosEH : public WCPositionEH {
48 
49  public:
50 
51  // Constructor
52  AniPosEH();
53 
54  // Destrutor
55  ~AniPosEH();
56 
57  // The operator that is given the position events and must process
58  // them
59  virtual void operator()(const WCPositionEvent& ev);
60 
61  // add/remove a WorldCanvasHolder to the handler
62  // <group>
63  virtual void addWorldCanvasHolder(WorldCanvasHolder *wcHolder);
64  virtual void removeWorldCanvasHolder(WorldCanvasHolder& wcHolder);
65  // </group>
66 
67  // reset the animator - this is typically called by the WorldCanvasHolder
68  // when DisplayDatas are registered or unregistered
69  virtual void resetAnimator() {
70  animator.reset();
71  }
72 
73  private:
74 
75  // the Animator we control
77 
78  // casacore::List of WorldCanvasHolders
79  std::list<void *> holderList;
80 
81  // set a restriction on the WorldCanvasHolders
82  void setRestriction(Attribute& att);
83 
84  // refresh the WorldCanvasHolders
85  void refresh();
86 
87  // cleanup the DisplayDatas on all WorldCanvasHolders
88  void cleanup();
89  };
90 
91 
92 } //# NAMESPACE CASA - END
93 
94 #endif
Animator animator
the Animator we control
Definition: AniPosEH.h:76
virtual void operator()(const WCPositionEvent &ev)
The operator that is given the position events and must process them.
WorldCanvas position event handler for Animator.
Definition: AniPosEH.h:47
AniPosEH()
Constructor.
Arbitrary name-value pairs used in the display classes.
Definition: Attribute.h:144
std::list< void * > holderList
casacore::List of WorldCanvasHolders
Definition: AniPosEH.h:79
void refresh()
refresh the WorldCanvasHolders
~AniPosEH()
Destrutor.
virtual void removeWorldCanvasHolder(WorldCanvasHolder &wcHolder)
virtual void reset()
Reset the Animator.
Animation controller for WorldCanvasHolders.
Definition: Animator.h:285
void cleanup()
cleanup the DisplayDatas on all WorldCanvasHolders
virtual void resetAnimator()
reset the animator - this is typically called by the WorldCanvasHolder when DisplayDatas are register...
Definition: AniPosEH.h:69
virtual void addWorldCanvasHolder(WorldCanvasHolder *wcHolder)
add/remove a WorldCanvasHolder to the handler
Class which stores WorldCanvas position event information.
A holder to interface between DisplayDatas and a WorldCanvas.
void setRestriction(Attribute &att)
set a restriction on the WorldCanvasHolders
Base class for handling WorldCanvas position events.
Definition: WCPositionEH.h:75